systematic-debugging
Skill1 starsChanged 3 months agoApache-2.0View on GitHub
Find the root cause of a defect before changing anything. Load when something crashes, hangs, returns the wrong value, fails intermittently, or broke after a change, and the cause is not yet known. Drives reproduce, localize by bisection, explain the mechanism, then fix with a failing-first regression test. Replaces guess-and-check editing.
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 repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-loop-designSkill
- ai-supply-chain-securitySkill
- anti-slop-pr-and-writingSkill
- authoring-portable-skillsSkill
- brainstormingSkill
- cross-language-portSkill
- giving-code-reviewSkill
- handoffSkill
- incident-responseSkill
- pr-review-and-releaseSkill
- receiving-code-reviewSkill
- refactoring-safelySkill
- test-driven-developmentSkill
- using-agtmlsSkill
- verification-before-completionSkill
- vetting-a-skill-before-installSkill
- web-research-and-source-triageSkill
- writing-plansSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 177 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 41
Do not skip forward. Each phase has an exit condition.
- Distinctive: line 49
Not a paraphrase — the literal text.
- Very specific: line 53
Run it three times. If it fails 3/3, continue.
- Distinctive: line 56
If you cannot reproduce it, say so and stop.
- Distinctive: line 79
Verify the boundary: When you think you have found the transition point, confirm both sides: correct just before, incorrect just after.
- Distinctive: line 113
Run the full suite. A fix that breaks two other things is not a fix.
- Very specific: line 114
Check the explanation for siblings: if split(':') was wrong here, is the same pattern wrong in the three other places it appears?
“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
Trigger. Something is broken and you do not yet know why: a crash, a wrong result, a hang, a flake, a test that fails only in CI, a regression after an upgrade. Also load it when you catch yourself about to change code in the hope that it helps.
Reference material (localization techniques per symptom class, intermittent-failure playbook, and the instrumentation recipes): see
reference.mdin this directory.
The rule
No edit before an explanation. You must be able to say this input reaches this line, which does this wrong thing, which produces this symptom — before you touch the code.
Guess-and-check feels faster and is not. Each speculative edit changes the system you are trying to understand, and a "fix" that removes a symptom without an explanation has usually moved the bug somewhere less visible.
Four phases
Do not skip forward. Each phase has an exit condition; if you cannot meet it, you are still in that phase.
Phase 1 — Reproduce
Exit condition: one command that fails, reliably, on demand.
- Get the exact failure: full error, stack trace, exit code, wrong output. Not a paraphrase — the literal text.
- Establish the environment: branch, commit, dependency versions, config, platform. Bugs that "only happen for them" are usually environment deltas.
- Reduce the trigger to the smallest input and shortest command you can.
- Run it three times. If it fails 3/3, continue. If it fails 1/3, you have
an intermittent bug — see
reference.md§intermittent before proceeding.
If you cannot reproduce it, say so and stop. Debugging a failure you cannot observe is writing fiction. Ask for the input, the logs, the version.
Phase 2 — Localize
Exit condition: the smallest region of code where correct input goes in and incorrect output comes out.
Bisection is the workhorse — over anything ordered:
| Axis | Method |
| Time | git bisect between a known-good and known-bad commit |
| Call stack | Assert or log the invariant at the top, middle, and bottom |
| Input | Halve the input until the failure disappears |
| Config | Disable half the flags/plugins; repeat on the failing half |
| Data | Halve the dataset; find the minimal failing record |
The discipline is the same every time: form a binary question, answer it by observation, halve the space. Ten halvings cover a thousand candidates.
Two rules that keep this honest:
- Verify the boundary. When you think you have found the transition point, confirm both sides: correct just before, incorrect just after.
- Instrument, don't infer. Print the actual value. A variable you
believe holds
3is the reason the bug survived this long.
Phase 3 — Explain
Exit condition: a written sentence that connects cause to symptom, which predicts something you have not yet tested.
Write it out:
When
parse()receives a key containing:, the split on line 88 takes the first segment only, so the map is built with a truncated key, so the lookup on line 140 misses and returns the default.
Then test the prediction. A correct explanation predicts more than the one failure you have: it says which other inputs fail, and which superficially similar ones do not. Check one of each. If the prediction is wrong, your explanation is wrong — return to Phase 2.
This is the step people skip, and skipping it is how you get a fix that works on the reported input and nothing else.
Phase 4 — Fix and pin
Exit condition: a regression test observed failing before the fix and passing after.
- Write the test first, from the explanation, and watch it fail with the
real symptom — not
ImportError, not a missing fixture. - Make the smallest change the explanation calls for. If the explanation does not call for it, it is not part of the fix.
- Watch the test pass.
- Run the full suite. A fix that breaks two other things is not a fix.
- Check the explanation for siblings: if
split(':')was wrong here, is the same pattern wrong in the three other places it appears?
Anti-patterns
- Shotgun editing. Changing several things at once, then testing. If it works you have learned nothing; if it does not, you have a bigger space.
- Fixing the symptom. Wrapping the crash in try/except, clamping the bad value, adding a retry. Legitimate only when the explanation says the condition is genuinely expected — and then it is not a bug fix.
- Blaming the platform. The compiler, the runtime, the standard library. Occasionally right; assume it last, and only with a minimal reproduction.
- Trusting the comment. Comments describe intent at writing time. Read the code.
- Stopping at "it stopped happening." Especially for intermittent bugs. Absence of a symptom over ten runs is weak evidence about a race.
- Rewriting to make the bug go away. Now you have an unexplained bug and a large diff.
When not to use
- The project has a symptom-indexed triage playbook for its own subsystems — use that first; it will localize faster than a generic bisection.
- You already know the cause and are just making the change.
- The task is adding new behaviour, not restoring intended behaviour — that
is
test-driven-development.
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.

