debug
Skill1 starsChanged 32 days agoMITView on GitHub
Root-cause diagnosis for a bug whose cause is UNKNOWN: reproduce, gather evidence before theorizing, kill falsifiable hypotheses one experiment at a time, and confirm a cause that explains every observation. No fixing; hands the confirmed cause to /tdd. Fire on "why is this happening", "works on X but not Y", "started failing and nobody knows why". NOT /tdd (cause already known).
- Installs packages
192 other projects use a version of this.
Adopted by
Most recently taken up by
- PeanutGT/NutsSkillstheir own version, first seen Nov 8, 2026
- jskswamy/skillstheir own version, first seen Nov 8, 2026
- Firzus/agent-skillstheir own version, first seen Nov 8, 2026
- domengabrovsek/agent-configtheir own version, first seen Nov 8, 2026
- domengabrovsek/claudetheir own version, first seen Nov 8, 2026
- microsoft/veronatheir own version, first seen Nov 8, 2026
Used with
Projects with it also use add-discord, add-slack and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkilladd-discord
Add Discord bot channel integration via Chat SDK.
Also in 11 projects that use this
MicrosoftSkilladd-slack
Add Slack channel integration via Chat SDK.
Also in 11 projects that use this
- +10 more from microsoft
Other versions192 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 192
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- anthropics/knowledge-work-plugins★ 35ksame name
- gavrielc/nanoclaw★ 31ksame name
- nanocoai/nanoclaw★ 31ksame name
- qwibitai/nanoclaw★ 31ksame name
- openai/symphony★ 27ksame name
- FalkorDB/FalkorDB★ 10ksame name
- NVIDIA/TensorRT-Model-Optimizer★ 5.6ksame name
- NVIDIA/Model-Optimizer★ 5.6ksame name
182 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository56 other files it gives its agents.
- autopilotSkill
- before-afterSkill
- bigpictureSkill
- blast-radiusSkill
- brainstormSkill
- compoundSkill
- confidence-checkSkill
- contextualizeSkill
- create-ship-skillSkill
- create-skillSkill
- curateSkill
- deep-researchSkill
- devtoolsSkill
- distillSkill
- done-checkSkill
- doneSkill
- double-checkSkill
- envsetSkill
- explainSkill
- fortifySkill
- goSkill
- handoffSkill
- harness-auditSkill
- interviewSkill
- matrixSkill
- mockupSkill
- mutateSkill
- notesSkill
- postmortemSkill
- presentSkill
- qaSkill
- readableSkill
- recommendSkill
- reportSkill
- retireSkill
- review-planSkill
- scoutSkill
- sec-reviewSkill
- setup-ticketingSkill
- setup-worktreesSkill
- spec-checkSkill
- specSkill
- stepsSkill
- successionSkill
- super-reviewSkill
- tangentSkill
- tddSkill
- tend-memorySkill
- testSkill
- ticketSkill
- tldrSkill
- triageSkill
- waitSkill
- workSkill
- worth-itSkill
- wrap-upSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
Read the actual error and surrounding logs end to end — not the first line, the whole trace.
- Very specific: line 68
Keep it light — this runs inline and usually feeds /tdd next.
- Distinctive: line 81
Attack the leading hypothesis: Look for the observation that would *refute* it, not more observations consistent with it.
- Distinctive: line 82
Time-box guessing: If two rounds of experiments haven't discriminated between hypotheses, switch modes: bisect, minimize the repro, or …
“Common” is measured: kept by at least 6 in 10 of the 175 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
You are diagnosing, not fixing. The output of this skill is a confirmed root cause; the fix belongs to /tdd, which takes the cause as its step-1 hypothesis. Keeping the two separate is the point — a fix written against an unconfirmed cause is a guess, and on old/shared code, a guess that plants regressions.
Why diagnose-first
Shotgun debugging — edit something plausible, rerun, repeat — sometimes works and always teaches nothing. Worse, it can appear to work: the symptom moves, the cause keeps generating new symptoms, and now the diff contains three unrelated edits nobody can explain. The discipline below replaces "what might fix it?" with "what would I observe if hypothesis X were true?" — every experiment either kills a hypothesis or confirms one, so even a failed experiment is progress.
When this fires vs. its siblings
/debug— the cause is unknown; produce a confirmed diagnosis. ← here/tdd— the cause is known or hypothesized; write the red test that proves it, then fix./devtools— the browser primitive this skill drives for UI evidence and repros.
The loop
1. Pin the symptom — observable facts only
What happens, what should happen, when it started, and — often the best discriminator — where it does NOT happen (works in dev but not stage; fails for this user but not that one; only on the second click). Negative space constrains the hypothesis set more than the failure itself.
2. Reproduce
Get the cheapest reliable repro: a failing test beats a script beats a /devtools browser walk. If you can't reproduce it, don't theorize from vibes — go gather more evidence (step 3) until you can, or say plainly that this will be an evidence-only diagnosis with lower confidence.
If the natural trigger is expensive — a reboot, a deploy, a nightly cron — synthesize the CONDITION instead of waiting for the cycle. One attempt per reboot caps you at a handful of experiments a day, and the dead time between them is spent theorizing, which is precisely the failure mode this skill exists to prevent. Ask what state the slow event actually leaves behind, then produce that state directly: pkill -9 for the unclean-exit flag a hard poweroff leaves, a hand-written cache row for the 3am job's output, a skewed clock for the expiry path. (Example: a boot-time bug that resisted many reboot-per-round attempts settled in two experiments once its trigger — an unclean-exit flag — could be reproduced on demand in seconds.)
3. Gather evidence before theorizing
- Read the actual error and surrounding logs end to end — not the first line, the whole trace.
- "My fix changed nothing" is usually a LOADING problem, not a logic problem. Before you re-theorize, prove the artifact you edited is the one actually executing:
python -c 'import pkg; print(pkg.__file__)',node -e "console.log(require.resolve('pkg'))", and look for a non-editable install shadowing your source (pip install .leaves a copy in site-packages), a stalebuild/, a cached image layer, a running process holding the old code. The tell is a test that fails byte-identically after your change — that is not a stubborn bug, that's dead code. (Example: every edit tosrc/was inert because the venv held a copy;pip install -e .made the edits live, and only then did the real bug appear.) - Regressions have a birthday.
git logthe implicated paths for recent changes; if a known-good commit exists,git bisectis usually cheaper than reading code. - Inspect real runtime state (actual payloads, actual config, actual DB rows), not the state you assume. The bug is frequently the gap between those two. When several users are affected, inspect each one's state — including per-user overrides and hand-applied workaround rows. A fix derived from the reporter's account can be silently defeated on another account by a per-account setting or an old workaround, so verify the fix against every affected account, not just the first.
- Browser-shaped bug? Reach for
/devtoolsearly. Console errors, the network waterfall (status codes, payloads, timing), and live DOM/state inspection are primary evidence — and the default debugging instrument. Drive the real browser; don't reason about what it probably does.
4. Rank falsifiable hypotheses
Enumerate candidate causes. Each one must name its discriminating observation — what you'd see if it were true that you wouldn't see otherwise. "Something async, probably" is not a hypothesis; "the second request reuses the first request's cached session, so the stale user id appears in the second response" is. Rank by likelihood × cheapness-to-test.
5. Kill them one experiment at a time
One experiment per hypothesis, cheapest-discriminating first: targeted logging, a debugger breakpoint, a bisect, a minimized input, toggling exactly one variable — or, for browser behavior, a /devtools experiment (replay the request, tweak live state, block one script), often the cheapest discriminator of all. Change one thing per experiment — two changes per run means the result tells you nothing. Instrumentation (log lines, temporary flags) is fine; fixes are not — and track every instrumentation edit so it's reverted before handoff. Update the ranking after every result; a killed hypothesis is progress, not failure.
6. Confirm the root cause
The bar for "confirmed":
- It explains all observations from step 1 — including the negative space. A cause that explains the failure but not why prod is unaffected is incomplete.
- It predicts: perturb the cause and the behavior changes exactly as predicted.
- You made one honest attempt to refute it. Stopping at the first plausible cause is the classic trap — the leading hypothesis earns confirmation by surviving an attack, not by being likeable.
- A setting that is present is not a setting that fired.
brave://policy,printenv, a green check in an admin UI — each proves the value was read, never that it took effect. App-level heuristics, precedence rules and safety overrides silently win, and they leave the config looking perfectly correct. Verify the behaviour the setting is supposed to cause, not its presence. (Example: a session-restore policy showedOKwhile a crash-recovery heuristic overrode it, so the real defect — "the restore never actually fires" — stayed hidden behind a green check.)
7. Hand off to /tdd
The confirmed cause becomes /tdd's step-1 hypothesis, and its red-for-the-right-reason gate is the independent proof of this diagnosis. If a red test can't be produced from the cause, the diagnosis is wrong — come back to step 4 with that as new evidence, don't force the fix.
Close-out
Keep it light — this runs inline and usually feeds /tdd next; don't end on a heavy terminal block that reads as "stop here":
- Symptom: what was observably wrong.
- Hypotheses killed: each, with the experiment that killed it (one line apiece).
- Root cause: the confirmed cause + what confirmed it (the prediction that held).
- Instrumentation: reverted ✓ (or list what remains and why).
- Next:
/tddwith this cause — or, for an evidence-only diagnosis, the confidence level and what repro is still missing.
Guardrails
- Diagnose, don't fix. The moment you're editing source to solve rather than to observe, you've left this skill — stop and route through
/tdd. - Revert instrumentation. Temporary logs and flags must be gone before handoff; a diagnosis that leaves debris becomes someone else's mystery bug.
- One variable per experiment. Compound experiments produce uninterpretable results — slower than two clean ones.
- Attack the leading hypothesis. Look for the observation that would refute it, not more observations consistent with it.
- Time-box guessing. If two rounds of experiments haven't discriminated between hypotheses, switch modes: bisect, minimize the repro, or widen evidence gathering. Deeper guessing from the same evidence is the failure mode.
- No commits or pushes. Diagnosis produces knowledge, not commits.
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
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.

