systematic-debugging
Skill0 starsChanged 8 days agoMITView on GitHub
Finds and proves the root cause of a failure before any fix; Use when a test, build, or flaky check fails, behavior is unexpected, a fix did not work, the user asks "why does this happen", or you are about to guess at a change.
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 repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- agent-handoverSkill
- brand-sweepSkill
- design-tokensSkill
- experiment-labSkill
- parity-checkSkill
- pitch-from-evidenceSkill
- plan-and-buildSkill
- platform-reachSkill
- product-kickoffSkill
- product-reconSkill
- quality-loopSkill
- repository-auditSkill
- review-miningSkill
- review-practiceSkill
- security-auditSkill
- stack-foundationSkill
- technical-reconSkill
- ux-qualitySkill
- web-qualitySkill
- agent-handoverSkill
- brand-sweepSkill
- design-tokensSkill
- experiment-labSkill
- parity-checkSkill
- pitch-from-evidenceSkill
- plan-and-buildSkill
- platform-reachSkill
- product-kickoffSkill
- product-reconSkill
- quality-loopSkill
- repository-auditSkill
- review-miningSkill
- review-practiceSkill
- security-auditSkill
- stack-foundationSkill
- systematic-debuggingSkill
- technical-reconSkill
- ux-qualitySkill
- web-qualitySkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 177 edited versions we read keep these.
7
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 31
Trace backward: when the error is deep in a call chain: symptom, the line that causes it, its caller, the value passed, who produced that …
- Distinctive: line 47
Write one sentence: "The cause is X because Y" (Y is an observation).
- Distinctive: line 48
Test it with the smallest change or probe.
- Distinctive: line 51
Not understood: say "I do not understand X", research, or ask.
- Distinctive: line 67
Defense in depth: when bad data caused it: after fixing the source, add validation at the layers the data crosses (entry validation, domain …
- Very specific: line 72
Add the ledger row and close out per operations.
- Distinctive: line 101
Never say fixed, passing, or done on "should", "probably", or an earlier run.
- Distinctive: line 102
Run the command now, read the whole output and exit code, then state the claim with that evidence.
“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
Iron law: no fix without a confirmed root cause. A symptom fix is a new bug.
The incident loop (observe, search the ledger, reproduce, diagnose, repair,
verify, reconcile) and the EL-### error ledger are owned by
docs/operations.md; this skill is
how to do its Diagnose and Repair steps well. Do not restate them.
Hurried, "obvious", or already-tried-something situations are exactly when this applies. Systematic is faster than thrash.
Phase 1: Investigate (no edits yet)
- Read the whole error: full stack, exit code, file:line, warnings above it. The message usually names the cause.
- Search first:
make where Q="<distinctive error text>". A knownEL-###row means the fix is recorded; use it. - Reproduce deterministically: exact command, input, environment. Cannot reproduce: gather more data (logs, versions, timing); do not guess a fix.
- Check what changed:
git diff,git log -p -- <path>, new dependency, config, environment. A regression:git bisect run <cmd>. - Multi-component flow (CI to build to deploy, API to service to store): instrument every boundary once (what enters, what leaves, which env/config arrived), run, and read where the data first goes wrong. Then dig into that one component.
- Trace backward when the error is deep in a call chain: symptom, the line
that causes it, its caller, the value passed, who produced that value;
repeat until you reach the original trigger. Fix there, never where it
surfaced. No visible chain: log
new Error().stackplus the inputs just before the failing call (to stderr; loggers may be silenced in tests). Test pollution (a stray file or state appears): run tests one at a time to find the polluter.
Phase 2: Pattern
Find similar working code in this repo. Read the reference completely, not a skim. List every difference between working and broken, however small. Name the assumptions and dependencies (config, env, ordering) each side relies on.
Phase 3: Hypothesis
- Write one sentence: "The cause is X because Y" (Y is an observation).
- Test it with the smallest change or probe; one variable at a time.
- Wrong: discard it, form a new one from the new evidence. Do not stack fixes on a failed one.
- Not understood: say "I do not understand X", research, or ask. Never pretend.
Separate in your notes: confirmed cause, contributing factors, hypotheses.
Phase 4: Fix
- Failing test first. The smallest automated reproduction (a script if there is no framework). Run it and watch it fail for the right reason (the bug, not a typo or setup error). A test that never failed proves nothing.
- One fix at the root cause. No "while I am here" cleanups, no bundled refactor.
- Green: the new test passes, the surrounding suite still passes.
- Prove the test guards the fix: revert only the fix, the test must fail; restore, it must pass.
- Defense in depth when bad data caused it: after fixing the source, add validation at the layers the data crosses (entry validation, domain invariant, environment guard that refuses the dangerous action, and a forensic log) so a different path cannot reintroduce it. Test that each layer catches the bypass.
- Add the ledger row and close out per
operations; verify the real
artifact per
docs/verification.md.
Three failed fixes: stop
Counting every attempt. At three, do not try a fourth. Signs of a structural problem: each fix exposes shared state or coupling elsewhere, a fix needs a large refactor, each fix creates a new symptom. Question the design (is this pattern sound, are we continuing from inertia?), write what you learned to the issue, and decide the redesign with the owner before more patches. That is a wrong architecture, not a bad hypothesis.
Flaky tests: wait for conditions, not time
A fixed sleep/setTimeout guesses at timing and fails under load. Poll the
real condition with a short interval (about 10 ms), a hard timeout, and an error
that names what was awaited; re-read state inside the loop, never cache it.
wait_for(lambda: job.state == "done", what="job done", timeout=5)A fixed delay is right only when testing real timing (debounce, throttle) or after the trigger condition fired and the interval is known; comment why. Also look for leaked shared state and order dependence (run the test alone).
Evidence before claims
Never say fixed, passing, or done on "should", "probably", or an earlier run. Run the command now, read the whole output and exit code, then state the claim with that evidence. Linter green is not build green; a changed line is not a fixed bug; a subagent's "success" is verified against the diff.
Red flags and the truth
| Thought | Reality |
| "Quick fix now, investigate later" | The first patch sets the pattern. Investigate first. |
| "Just try changing X and see" | Guessing; it hides which change mattered. |
| "It is simple, no process needed" | Simple bugs have root causes; the process is quick for them. |
| "Emergency, no time" | Thrash costs more than diagnosis. |
| "I see the problem, fixing it" | Seeing a symptom is not understanding the cause. |
| "I will add the test after it works" | Untested fixes regress; test first. |
| "Several fixes at once saves time" | You cannot tell which worked and you add bugs. |
| "One more attempt" (after two) | Three failures mean question the design. |
| "No root cause, it is environmental" | Usually an unfinished investigation; if truly external, document what you ruled out and add a retry/timeout and logging. |
| "I will adapt the reference without reading it all" | Partial understanding guarantees bugs. |
Any of these: stop, return to Phase 1.
Done
Cause confirmed with evidence, red-then-green test in the suite, one root-cause
change, make done fresh, real path observed, ledger and issue updated.
Superpowers (make upstream ID=superpowers-workflow): the long-form debugging guides this skill condenses. Pull root-cause-tracing for a deep call chain or find-polluter.sh for test pollution, only when the phase above stalls.
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.

