debug
Skill4 starsChanged 3 months agoMITView on GitHub
Systematic bug investigation workflow. Tool-agnostic but MCP-aware — test cases and MCP tools are evidence sources, not prerequisites. Applies to any stack (frontend, backend, CLI, mobile, distributed systems).
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 repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- clarify-scopeSkill
- create-pr-descriptionSkill
- implement-tddSkill
- plan-tasksSkill
- review-prSkill
- setup-ai-contextSkill
- shipSkill
- sync-ai-contextSkill
- write-specSkill
- write-test-scenariosSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 13 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
13
Distinctive
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
- Distinctive: line 51
If a use case / test case already exists → run it and confirm it fails
- Distinctive: line 52
If no test exists → create a minimal reproduction first, then proceed
- Distinctive: line 53
If the bug is intermittent → reproduce it at least 3 times before continuing
- Distinctive: line 62
Remove unrelated inputs, routes, or modules one by one
- Distinctive: line 90
Do not commit to a hypothesis during this step.
- Distinctive: line 105
Start with the layer closest to the symptom, then work outward
- Distinctive: line 118
Do not move to Fix until all alternatives are eliminated and one hypothesis stands alone.
- Distinctive: line 131
If you cannot fill in all three fields, you have not found the root cause yet — return to Observe or Experiment.
- Distinctive: line 135
Goal: remove the root cause with the smallest possible change.
- Distinctive: line 139
If the fix touches > 3 files, question whether you have correctly identified the root cause
- Distinctive: line 140
If there was no test covering this case → add one now (the reproduction from Step 1 becomes the regression test)
- Distinctive: line 141
Do not change unrelated behavior
- Distinctive: line 156
Only after all checks pass: declare the bug fixed.
“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
Debug
Debugging is an investigation, not a guessing game. Every step produces evidence that either confirms or eliminates a hypothesis. Do not write a single line of fix code until the root cause is confirmed.
Workflow
Bug report
│
▼
1. REPRODUCE → establish ground truth
│
▼
2. REDUCE → isolate the minimal case
│
▼
3. OBSERVE → collect evidence
│
▼
4. HYPOTHESIZE → form ranked candidates
│
▼
5. EXPERIMENT → eliminate candidates one by one
│
▼
6. ROOT CAUSE → confirm with evidence, not intuition
│
▼
7. FIX → smallest change that removes the root cause
│
▼
8. VERIFY → rerun the original reproduction, confirm cleanStep-by-step
1. Reproduce
Goal: establish a reliable way to trigger the bug before touching any code.
Priority order:
- If a use case / test case already exists → run it and confirm it fails
- If no test exists → create a minimal reproduction first, then proceed
- If the bug is intermittent → reproduce it at least 3 times before continuing
A bug you cannot reproduce reliably is a bug you cannot verify you fixed.
2. Reduce
Goal: strip the reproduction down to the smallest input / fewest steps that still triggers the bug.
Techniques:
- Remove unrelated inputs, routes, or modules one by one
- Isolate a single HTTP request, function call, or UI interaction
- Comment out surrounding code until the bug disappears, then add back the minimum
- Binary-search the commit history (
git bisect) if the regression is recent
A reduced case makes the root cause obvious and the fix precise.
3. Observe
Goal: collect raw evidence without interpretation yet.
Collect what is relevant to the bug's layer:
| Layer | Evidence sources |
| UI / browser | console errors, network tab, DOM state, screenshots, layout |
| API / HTTP | request/response payload, status codes, headers, timing |
| Server / backend | application logs, stack traces, slow query logs |
| Data | database state before/after, cache contents |
| System | memory usage, CPU, file descriptors, environment variables |
Tool-agnostic collection — use whatever is available in the current environment:
- Playwright MCP, Chrome DevTools MCP, or browser devtools → UI/network evidence
- Server log tailing,
curl,httpie→ API evidence - Database client, ORM query logging → data evidence
console.log/ structured logging → runtime state
Do not commit to a hypothesis during this step. Collect first, interpret later.
4. Hypothesize
Goal: form a ranked list of candidate root causes based on the evidence.
Format:
H1 (most likely): [cause] — because [evidence that points here]
H2: [cause] — because [evidence]
H3: [cause] — because [evidence]Rules:
- Each hypothesis must be falsifiable (you can design an experiment to disprove it)
- Start with the layer closest to the symptom, then work outward
- A hypothesis that cannot be tested is not a hypothesis — it is a guess
5. Experiment
Goal: eliminate hypotheses one by one, starting from H1.
For each hypothesis:
- Design the smallest possible experiment that would disprove it
- Run it
- Record the result — confirmed or eliminated
- Move to the next hypothesis
Do not move to Fix until all alternatives are eliminated and one hypothesis stands alone.
6. Root Cause
Goal: state the root cause with supporting evidence, not intuition.
Required format before writing any fix:
Root cause: [precise statement]
Evidence: [the specific observation that confirms it]
Layer: [where in the stack the defect lives]If you cannot fill in all three fields, you have not found the root cause yet — return to Observe or Experiment.
7. Fix
Goal: remove the root cause with the smallest possible change.
Rules:
- Fix only the root cause — do not refactor surrounding code unless it is part of the cause
- If the fix touches > 3 files, question whether you have correctly identified the root cause
- If there was no test covering this case → add one now (the reproduction from Step 1 becomes the regression test)
- Do not change unrelated behavior
8. Verify
Goal: confirm the bug is gone and nothing else broke.
Checklist:
[ ] Original reproduction: now passes (or no longer triggers the bug)
[ ] Regression test (if added): green
[ ] Full test suite: green
[ ] Adjacent behavior: manually spot-checked for side effects
[ ] Evidence collected in Step 3: all anomalies are now explained or resolvedOnly after all checks pass: declare the bug fixed.
Anti-patterns
| Anti-pattern | Why it fails |
| Fix before reproducing | You cannot verify a fix for a bug you cannot trigger |
| Skip Reduce | Large reproduction hides the real cause; fix is often wrong |
| Skip Hypothesize | Random code changes waste time and may introduce new bugs |
| "I think it's probably X" without evidence | Intuition without evidence is noise |
| Fix symptoms instead of root cause | Bug comes back |
| Declare done before verifying | Bug ship rate increases |
Quick reference
Can I reproduce it? → No: find reproduction first
Can I reduce it further? → Yes: keep reducing
Do I have a hypothesis? → No: observe more
Is my hypothesis falsifiable? → No: rephrase or discard it
Is the root cause confirmed? → No: experiment more
Is my fix minimal? → No: trim it
Is the original repro green? → No: you are not doneDoes 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.

