agentleFS
theRizwantheRizwan/skills/skills/engineering/minimal-repro/SKILL.md

minimal-repro

Skill1 starsChanged 3 months agoMITView on GitHub

Shrink a failing case to the smallest reproduction that still fails — for a bug report, a maintainer, or your own debugging. Use when a bug only appears in a large app, when filing an upstream issue, or when the user says they cannot work out what is causing something.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before you delete anything, confirm you can trigger the failure reliably.

    line 11
  2. Distinctive:

    If it is intermittent, make it deterministic first: fix the seed, pin the clock, force the race with an artificial delay.

    line 15
  3. Distinctive:

    Remove half of what remains.

    line 24
  4. Distinctive:

    Stop when nothing more can be removed without the failure disappearing.

    line 28
  5. Distinctive:

    No dependencies beyond the one you are reporting against.

    line 36
  6. Distinctive:

    No build step, or the standard one for that ecosystem.

    line 37
  7. Distinctive:

    Before filing: does the minimal case fail for the *same reason* as the original?

    line 42

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

A minimal reproduction is the highest-value artifact in debugging. It converts an unbounded search into a bounded one, and it is the difference between a bug report a maintainer acts on and one they close.

Start from something that definitely fails

Before you delete anything, confirm you can trigger the failure reliably. An intermittent failure cannot be bisected — you will delete something harmless, see it pass by luck, and go down a false path.

If it is intermittent, make it deterministic first: fix the seed, pin the clock, force the race with an artificial delay.

Delete, do not rewrite

The instinct is to build a small example from scratch. Resist it — you will reproduce your assumptions rather than the bug. Instead, copy the failing thing and cut it in half.

  1. Remove half of what remains.
  2. Does it still fail?
    • Yes — keep the deletion. Repeat.
    • No — restore it, remove the other half instead.
  3. Stop when nothing more can be removed without the failure disappearing.

This is bisection on code rather than on history, and it converges in roughly log2(n) steps.

What counts as small enough

  • One file, if possible.
  • No dependencies beyond the one you are reporting against.
  • No build step, or the standard one for that ecosystem.
  • Someone can run it in under a minute without asking you a question.

Check the reproduction proves what you think

Before filing: does the minimal case fail for the same reason as the original? It is easy to shrink your way into a different, simpler bug. Confirm the error message and the stack match.

Write down what you removed

The things you deleted that did not matter are information. "Fails without the router, without state management, and on a fresh project" tells the maintainer where not to look, and it is the part of a bug report that saves the most time.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.