No slash command · from Compound
Find the cause of a bug that resists — intermittent, mysterious, or a regression between two known-good states. Use when it is not yet clear why something breaks; once the cause is known and reproducible, tdd writes the test.
Ships in Compound. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Hard bugs are lost by guessing. The discipline is refusing to theorise until you can make the bug happen on demand, then changing one thing at a time.
The thing to get first is a tight loop: a single command, fast enough to run over and over, that goes red on this bug. Everything downstream depends on it — without one you are editing code and hoping, and hoping is how a session burns an hour and lands on a fix nobody can explain.
tdd covers the bug you already understand. This is for the one you do not.
Reproduce it. Not something like it — it. Same symptom, same error, same conditions.
Take whatever gets there: a test, a script, a curl, a sequence of commands. Speed matters more than elegance, because you are about to run it many times.
Intermittent? Then the tight loop is one that fails often enough to measure — run it in a loop of fifty and count. A bug that appears one time in ten is reproducible; you just need the loop to say "3/50" so you can tell whether a change moved it.
Cannot reproduce it at all? That is the whole task now. Say so, and go after conditions: version, data, timing, environment, concurrency, order. Do not start fixing code you have never seen fail.
Completion criterion: one command, its red output in front of you, and you know how often it fails.
Cut everything the bug does not need — inputs, config, steps, layers — checking after each cut that it still goes red.
Each thing you remove is a thing that cannot be the cause. What survives is usually so small that the cause is visible without further work, and it becomes the regression test almost as-is.
Completion criterion: nothing further can be removed without the loop going green.
State what you believe is happening, specifically enough to be wrong: "the token is refreshed after the expiry check, so a request in that window sees a stale value."
Then instrument to find out — log the value, print the timing, dump the state at the boundary. Measure, don't reason. The cause of a bug that has resisted this long is usually somewhere your model of the system says it cannot be.
Change one thing per run. Two changes and a green loop tells you nothing about which mattered.
When a hypothesis is wrong, say so and write down what it ruled out. A dead end you can name is progress; a dead end you forget gets retried in an hour.
Completion criterion: you can explain the mechanism — what happens, in what order, and why that produces this symptom. Not "it works now".
Fix the mechanism you just described, not the symptom that led you there.
A try/except around the error, a retry, a null check at the crash site, a widened type —
each makes the loop go green while the mechanism stays live, and it will resurface
somewhere with less context around it. Where you genuinely must patch the symptom because
the real fix is out of scope, say that plainly and say what the real fix would be.
Completion criterion: the tight loop goes green, the full suite passes, and you can say which line caused the behaviour.
Turn the minimised reproduction into a regression test and keep it. It is the part of this work that outlives the fix — and for an intermittent bug, run the loop of fifty again and confirm 0/50.
Then run capture. A root cause is the highest-value thing the wiki can hold: the next
person meets the explanation instead of the bug. File the mechanism, the dead ends, and the
test that pins it.
Completion criterion: a regression test exists that fails without the fix, and the cause is filed.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mthanhlm/compound --plugin compound12 skills in this plugin
/captureFile a decision, root cause, or discovery into the repo wiki. Use once something has been settled, diagnosed, or learned that the next session would want./goStart a piece of work properly — interview the user one question at a time until its shape is settled, before anything gets built. Use when a request could reasonably be built several different ways, or when asked to clarify, pin down, or grill out what is actually wanted./guardrailsThe reasoning behind surgical diffs, minimum code, and surfaced assumptions. Use when a scope or simplicity call needs arguing, or the user asks why so much changed./handoffSave mid-task progress — what is done, what is next, what already failed — so a session resumes work in flight. Use when building has started; for a settled plan, use to-spec./implementExecute an agreed spec or slice end to end: consult the wiki, define the check, build, review the diff, file what was learned. Use once what to build is settled./setupConfigure this repo for compounding engineering — working agreement, knowledge base, and the commands the agent should use. Run once per repo.