debug-mode
Skill0 starsChanged 3 months agoMITView on GitHub
Structured debugging workflow for any stack — reproduce, isolate, diagnose, fix, in that order. Replaces trial-and-error guessing (changing things and re-testing until something works) with a documented investigation, so the actual root cause gets found and recorded instead of just the first change that happened to help.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- doraemonkeys/claude-code-debug-modetheir own version, first seen Oct 24, 2026
- liush2yuxjtu/pi-debug-modetheir own version, first seen Oct 17, 2026
- wangnan0916/runtime-debug-toolkittheir own version, first seen Oct 15, 2026
- kaushik912/my-claude-skillstheir own version, first seen Sep 28, 2026
- heiets/universal-debug-mode-skilltheir own version, first seen Sep 14, 2026
- vanenshi/skillstheir own version, first seen Aug 5, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- doraemonkeys/claude-code-debug-mode★ 120same name
- liush2yuxjtu/pi-debug-mode★ 4same name
- vanenshi/skills★ 2same name
- kaushik912/my-claude-skills★ 1same name
- duniecdawid/ultra-claude★ 0same name
- heiets/universal-debug-mode-skill★ 0same name
- khanashes/claude-skills★ 0same name
- wangnan0916/runtime-debug-toolkit★ 0same name
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 repository8 other files it gives its agents.
- assignment-modeSkill
- codegraphSkill
- commit-disciplineSkill
- health-reviewSkill
- learning-guardSkill
- teacherSkill
- assignment-defendSkill
- spikeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 14 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
14
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 14
Follow the four stages below, in order.
- Distinctive: line 27
If it can't be reproduced yet, that's the current task — don't skip ahead to guessing fixes for a failure that hasn't been pinned down.
- Distinctive: line 42
If there are multiple plausible explanations, say so and pick the cheapest one to test next, rather than the first one that comes to mind.
- Distinctive: line 47
Only now propose a change.
- Distinctive: line 50
Prefer the smallest change that addresses the actual cause over a broader change that happens to also make the symptom go away.
- Distinctive: line 51
Verify the fix against the reproduction from step 1, not just "it looks right."
- Distinctive: line 52
If the fix works but the mechanism from step 3 doesn't actually explain why, say so explicitly — an unexplained fix is a hypothesis that …
- Distinctive: line 58
If isolation or diagnosis stalls (several hypotheses ruled out, no clear next one):
- Distinctive: line 62
Ask the human, or suggest a specific next narrowing step, instead of trying random changes hoping one sticks.
- Distinctive: line 92
Do not skip to Fix before Isolate and Diagnose are actually done.
- Distinctive: line 93
Do not change more than one variable per test when isolating.
- Distinctive: line 94
Do not accept "it works now" as diagnosis — state the mechanism.
- Distinctive: line 95
Prefer the smallest change that addresses the diagnosed cause.
- Distinctive: line 96
When stuck, say so and narrow further rather than guessing.
“Common” is measured: kept by at least 6 in 10 of the 8 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 Mode
Core Philosophy
Debugging is an investigation, not a series of guesses.
The failure mode this exists to prevent: changing something, re-running, seeing it's still broken (or seeming fixed for the wrong reason), changing something else, repeating across several sessions, until eventually something works — without ever knowing why it was broken or why the fix worked. That's expensive (it eats sessions) and fragile (the same class of bug comes back, because the actual cause was never found).
Follow the four stages below, in order. Do not propose a fix before Isolate and Diagnose are done — a fix proposed before the cause is known is a guess, not a fix, even if it happens to work.
The Four Stages
1. Reproduce
Get a reliable way to trigger the failure before touching anything.
- State the exact steps, command, or trigger.
- Note whether it's consistent or intermittent — intermittent bugs need more repro attempts before concluding anything.
- Capture the actual observed output/error, not a paraphrase of it.
- If it can't be reproduced yet, that's the current task — don't skip ahead to guessing fixes for a failure that hasn't been pinned down.
2. Isolate
Narrow down where the problem is, not yet why.
- Bisect: remove/disable/mock pieces until the failure stops, or add pieces back until it starts. Binary search over "does the bug still happen" beats guessing which piece is at fault.
- Change exactly one variable at a time. Changing several things between test runs makes it impossible to know which change mattered.
- Note what's been ruled out, not just what's left — a shrinking list of suspects is real progress even without a fix yet.
3. Diagnose
Explain why it fails, in terms of the isolated component from step 2.
- State the actual mechanism (race condition, off-by-one, stale cache, wrong assumption about an API, environment difference, etc.) — not just "it's something in X."
- If there are multiple plausible explanations, say so and pick the cheapest one to test next, rather than the first one that comes to mind.
- A diagnosis should let you predict something else about the bug (e.g. "if that's the cause, it should also happen when Y") — check that prediction before moving on if it's cheap to check.
4. Fix
Only now propose a change.
- The fix should map directly to the diagnosis from step 3 — if it doesn't obviously address the stated cause, the diagnosis was probably wrong or incomplete; go back to step 3.
- Prefer the smallest change that addresses the actual cause over a broader change that happens to also make the symptom go away.
- Verify the fix against the reproduction from step 1, not just "it looks right."
- If the fix works but the mechanism from step 3 doesn't actually explain why, say so explicitly — an unexplained fix is a hypothesis that got lucky, not a closed investigation, and probably deserves a comment noting the uncertainty.
When Stuck
If isolation or diagnosis stalls (several hypotheses ruled out, no clear next one):
- Say so explicitly rather than reaching for another guess.
- Summarize what's been ruled out and what's still unknown — this is often what surfaces the answer on its own.
- Ask the human, or suggest a specific next narrowing step, instead of trying random changes hoping one sticks.
Session Log
For anything that takes more than a couple of exchanges to resolve, keep a running short log across the session:
- what was tried
- what it ruled out or confirmed
- current leading hypothesis
This is what actually prevents re-litigating the same dead end twice in one session, and it's the raw material for the summary below.
On Resolution
Once fixed, state in a few lines:
- root cause (the mechanism from step 3, not just the symptom)
- the fix and why it addresses that mechanism
- whether anything else in the codebase likely has the same class of bug
This is worth keeping somewhere durable (a commit message, a code comment near the fix, or project memory if this agent has one) — the goal is that the same root cause doesn't need to be rediscovered next time it resurfaces.
Rules
- Do not skip to Fix before Isolate and Diagnose are actually done.
- Do not change more than one variable per test when isolating.
- Do not accept "it works now" as diagnosis — state the mechanism.
- Prefer the smallest change that addresses the diagnosed cause.
- When stuck, say so and narrow further rather than guessing.
- Respect learning-guard where it applies — in a learning project, guide the human through these stages rather than performing them unilaterally.
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.

