systematic-debugging
Skill9 starsChanged 2 months agoMITView on GitHub
Finds the actual cause of a defect by reproducing it, narrowing the search space by bisection, and proving the diagnosis before changing code. Use for a crash, a stack trace, a flaky or intermittently failing suite, or behaviour that differs from expectation and resists an obvious fix. Refuses to change code before the cause is proven.
190 other projects use a version of this.
Adopted by
Most recently taken up by
- DemonDamon/AgenticXtheir own version, first seen Nov 9, 2026
- chrysogonus/power-agentstheir own version, first seen Nov 8, 2026
- willy92wins/DayZ-Modding-Knowledge-Packtheir own version, first seen Nov 8, 2026
- roundpilot/superpowers-antigravitytheir own version, first seen Nov 8, 2026
- REPOZY/superpowers-optimizedtheir own version, first seen Nov 8, 2026
- lingyired/status-triotheir own version, first seen Nov 8, 2026
Used with
Projects with it also use chinese-code-review, chinese-commit-conventions 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.
Leodorareluctant259Skillchinese-code-review
中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈
Also in 8 projects that use this
Leodorareluctant259Skillchinese-commit-conventions
中文 Git 提交规范 — 适配国内团队的 commit message 规范和 changelog 自动化
Also in 8 projects that use this
obraSkilldiagnosing-superpowers
Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.
Also in 20 projects that use this
mjunaidcaSkillbuilding-chatgpt-apps
Guides creation of ChatGPT Apps with interactive widgets using OpenAI Apps SDK and MCP servers. Use when building ChatGPT custom apps with visual UI components, embedded widgets, or rich interactive experiences. Covers widget architecture, MCP server setup with FastMCP, response metadata, and Developer Mode configuration. NOT when building standard MCP servers without widgets (use building-mcp-servers skill instead).
Also in 4 projects that use this
mjunaidcaSkillbuilding-chat-interfaces
Build AI chat interfaces with custom backends, authentication, and context injection. Use when integrating chat UI with AI agents, adding auth to chat, injecting user/page context, or implementing httpOnly cookie proxies. Covers ChatKitServer, useChatKit, and MCP auth patterns. NOT when building simple chatbots without persistence or custom agent integration.
Also in 4 projects that use this
- +2 more from Leodorareluctant259
- +5 more from mjunaidca
Other versions190 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 190
- obra/superpowers★ 314ksame name
- NousResearch/hermes-agent★ 262ksame name
- open-metadata/OpenMetadata★ 16ksame name
- jnMetaCode/superpowers-zh★ 8.4ksame name
- vudovn/ag-kit★ 8.2ksame name
- vudovn/antigravity-kit★ 8.2ksame name
- openai/plugins★ 7.8ksame name
- ChrisWiles/claude-code-showcase★ 6.1ksame name
- farm-fe/farm★ 5.6ksame name
- microsoft/FluidFramework★ 4.9ksame name
180 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 repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- api-designSkill
- architecture-decisionSkill
- autonomous-relaySkill
- browser-verificationSkill
- code-review-passSkill
- data-analysisSkill
- data-modelingSkill
- data-pipelineSkill
- data-qualitySkill
- documentationSkill
- firmware-buildSkill
- frontend-buildSkill
- incident-responseSkill
- incremental-deliverySkill
- ml-lifecycleSkill
- performance-passSkill
- release-and-rollbackSkill
- requirements-interviewSkill
- security-hardeningSkill
- simplification-passSkill
- spec-writingSkill
- tdd-loopSkill
- team-escalationSkill
- using-agent-dev-teamSkill
- work-breakdownSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 177 edited versions we read keep these.
4
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 26
If it is intermittent, make it deterministic: pin the seed, freeze the clock, force the interleaving, inject the fault, shrink the data.
- Distinctive: line 30
If you truly cannot reproduce it, say so explicitly and switch to adding observability so the next occurrence is diagnosable.
- Distinctive: line 50
In time: when did it last work? git bisect on a reliable reproduction is the fastest tool available and is chronically underused.
- Distinctive: line 85
Every one of these means the bug is still there, in a form that will return later and be harder to find.
“Common” is measured: kept by at least 6 in 10 of the 177 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
Systematic Debugging
The expensive failure mode is changing code before understanding the bug. It sometimes makes the symptom go away, which is worse than not fixing it, because now nobody will look again.
No code changes until you can state the cause and predict the fix's effect.
Process
1. Reproduce
A bug you cannot reproduce is a bug you cannot prove you fixed. Get to a single command, or a written sequence of steps, that produces the failure reliably.
If it is intermittent, make it deterministic: pin the seed, freeze the clock, force the interleaving, inject the fault, shrink the data. The work to make it reproducible is almost always less than the work of debugging it while it flickers.
If you truly cannot reproduce it, say so explicitly and switch to adding observability so the next occurrence is diagnosable. That is a legitimate outcome; a speculative fix is not.
2. Read the evidence you already have
The stack trace, the assertion message, the log line, the error text. Read all of it, in order, including the parts that look like boilerplate. The cause chain of an error names the real failure more often than the top message does.
Quote the decisive line. Do not paraphrase an error.
3. State what you expected and what happened
In one sentence each. The gap between them is the search space. Most of the time this step alone reveals a wrong assumption.
4. Narrow
Bisect the space, do not sweep it.
- In time: when did it last work?
git bisecton a reliable reproduction is the fastest tool available and is chronically underused. - In the stack: is the input to this layer correct? Check the middle first, then halve again. Three checks beat twenty guesses.
- In the data: which input triggers it? Shrink the failing case to the smallest one that still fails.
- In the environment: does it fail in a clean checkout, another machine, another version?
Change one thing at a time. Two changes and you have learned nothing about either.
5. Form a hypothesis that predicts something
A useful hypothesis says: "if this is the cause, then X will be true." Then check X. A hypothesis that explains the failure but predicts nothing new cannot be tested, only believed.
6. Prove it
Confirm the cause before fixing: add a temporary assertion, log the value, break at the line, or construct the input that must fail if you are right.
7. Fix the cause
Then re-run the reproduction. Then run the full suite. Then write the regression test that would have caught this, named after the bug.
Signals you have not found it
- The fix is a retry, a sleep, a lock added because it helped, or a try/catch around the symptom.
- You cannot explain why the bug appeared when it did.
- The fix works but you do not know why.
- You changed three things and it started working.
Every one of these means the bug is still there, in a form that will return later and be harder to find.
Output
## Diagnosis: <symptom>
- **Reproduction:** <the command or steps>
- **Expected / actual:** <one sentence each>
- **Narrowed by:** <what you bisected and how>
- **Cause:** `path:line` — <the mechanism, not the symptom>
- **Proof:** <what you observed that confirms it>
- **Fix:** <the change>
- **Regression test:** <path, and the run>
- **Why it was not caught:** <the gap>Red flags
| Thought | Reality |
| "I'll try changing this and see" | That is guessing. Narrow first. |
| "It works now" | Why? If you cannot say, it will return. |
| "It is probably a race" | Probably is not a diagnosis. Name the two operations and the order. |
| "I cannot reproduce it, but I know the fix" | You know a fix for a bug you have not seen. |
| "Adding a delay fixed it" | You moved the timing. The race is still there. |
| "The stack trace is just framework noise" | Read it. The cause chain is usually below the noise. |
| "I'll add a try/catch for now" | You have hidden the evidence for the next person, who is you. |
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.

