systematic-debugging
Skill4 starsChanged 3 months agoMITView on GitHub
Use when investigating any technical issue, including test failures, bugs, unexpected behavior, performance problems, or build failures, especially under time pressure or after failed fixes.
191 other projects use a version of this, 107 of them edited.
Adopted by
Most recently taken up by
- NousResearch/hermes-agentedited, first seen Nov 13, 2026
- andreymudri/fleetmatestheir own version, first seen Oct 5, 2026
- fmind/dottheir own version, first seen Oct 5, 2026
- Integralist/agent-skillstheir own version, first seen Oct 4, 2026
- asta-nguyen/kamehadbedited, first seen Oct 4, 2026
- LayneChai/superpowers-dshedited, first seen Oct 3, 2026
Used with
Projects with it also use diagnosing-superpowers, building-chatgpt-apps 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.
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 6 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
MorningStar0709Skillchinese-git-workflow
Configure Git for domestic platforms and manage branching strategies suitable for Chinese teams. Use when the user asks to configure remotes, set up SSH, or manage Git workflows for Gitee, Coding, Jihu GitLab, or CNB, including requests like "配置国内 Git", "设置 Gitee 远程仓库", "推荐适合小团队的 Git 流程".
Also in 4 projects that use this
- +8 more from mjunaidca
Other versions191 projects use a version of this.
Word for word · 0
None found.
Edited · 107
- obra/superpowers★ 314k18% same
- NousResearch/hermes-agent★ 267k10% same
- openai/plugins★ 7.3k18% same
- microsoft/FluidFramework★ 4.9k18% same
- pedronauck/skills★ 63318% same
- coco-research/coco★ 43717% same
- Ibrahim-3d/orchestrator-supaconductor★ 38017% same
- maslennikov-ig/claude-code-orchestrator-kit★ 25917% same
- aivrar/portable-hermes-agent★ 23210% same
- graniet/kheish★ 22115% same
97 more not listed
Wrote their own version · 84
- open-metadata/OpenMetadata★ 15ksame name
- jnMetaCode/superpowers-zh★ 8.3ksame name
- ChrisWiles/claude-code-showcase★ 6.1ksame name
- compozy/compozy★ 2.8ksame name
- GanyuanRan/Aegis★ 1.3ksame name
- SethGammon/Citadel★ 922same name
- sangrokjung/claude-forge★ 847same name
- taracodlabs/aiden★ 846same name
- Archive228/loopkit★ 756same name
- KbWen/agentic-os★ 206same name
74 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 repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- writing-skillsSkill
- brainstorm-featureSkill
- context-handoffSkill
- document-wikiSkill
- estimate-featureSkill
- implement-taskSkill
- lean-auditSkill
- plan-featureSkill
- read-codebase-contextSkill
- review-and-verifySkill
- setup-codebaseSkill
- setup-openezSkill
- using-devkitSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 1 is common, 10 are distinctive, and 5 are very specific to this project.
1
Common
Most of the 173 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
If you have not completed Phase 1, you cannot propose fixes.
- Distinctive: line 19
Use for any technical issue: test failures, bugs, unexpected behavior, performance problems, build failures, integration issues.
- Distinctive: line 41
Read stack traces completely.
- Distinctive: line 83
Ask for help or research more.
- Very specific: line 87
Classify the bug: Before any fix or verify plan, use the shared Bounded and Architectural labels from brainstorm-feature.
- Distinctive: line 108
When in doubt between two, take the heavier one.
- Very specific: line 112
Establish expected behavior: Use source, tests, and current wiki pages.
- Very specific: line 113
If they do not establish the intended behavior, stop and tell the user to invoke brainstorm-feature to get approval before changing …
- Distinctive: line 115
Write the verify plan: Before writing a regression check or production fix, list the observable conditions that prove the bug is fixed.
- Very specific: line 145
Call the available Skill entry whose local name is review-and-verify to review the diff against the verify plan from step 3 and run fresh …
- Very specific: line 153
Do not create commits during debugging.
- Common: line 158
If you catch yourself thinking:
- Distinctive: line 175
If 3+ fixes have failed, question the architecture.
- Distinctive: line 180
If systematic investigation reveals the issue is truly environmental, timing-dependent, or external:
- Distinctive: line 183
Document what you investigated.
- Distinctive: line 187
If handling such as a retry, timeout, error message, or monitoring change is needed, return to Phase 4: classify the change, establish …
“Common” is measured: kept by at least 6 in 10 of the 173 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 FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRSTIf you have not completed Phase 1, you cannot propose fixes. Symptom fixes are failure.
When to use
Use for any technical issue: test failures, bugs, unexpected behavior, performance problems, build failures, integration issues.
Especially when:
- Under time pressure (emergencies make guessing tempting)
- "Just one quick fix" seems obvious
- Previous fix did not work
- You do not fully understand the issue
Do not skip when:
- Issue seems simple (simple bugs have root causes too)
- You are in a hurry (rushing guarantees rework)
The four phases
You must complete each phase before proceeding to the next.
Phase 1: Root cause investigation
Before attempting any fix:
- Read error messages carefully — do not skip past errors or warnings. Read stack traces completely. Note line numbers, file paths, error codes.
- Reproduce consistently — can you trigger it reliably? What are the exact steps? If not reproducible, gather more data; do not guess.
- Check recent changes —
git diff, recent commits, new dependencies, config changes, and environmental differences. Use the caller-tracing procedure inreview-and-verifyto list changed symbols, check staged and unstaged tracked changes plus untracked paths withgit status --short, and trace callers and string/route/config variants using FFF multi-pattern grep orrg. Name the traced callers so Phase 4 can verify each one. - Gather evidence in multi-component systems — when a system has multiple components (API → service → database), add diagnostic logging at each component boundary before proposing fixes. Log what enters and exits each layer. Run once to see where it breaks. Treat added logs as temporary diagnostics: remove them after the trace, before reporting a Diagnostic investigation result or entering Phase 4. Do not leave temporary logging in the final diff unless the approved fix requires it.
- Trace data flow — where does the bad value originate? What called this with the bad value? Keep tracing up until you find the source. Fix at the source, not at the symptom.
Phase 2: Pattern analysis
- Find working examples — locate similar working code in the same codebase. What works that is similar to what is broken?
- Compare against references — if implementing a pattern, read the reference implementation completely. Do not skim.
- Identify differences — list every difference between working and broken, however small. Do not assume "that can't matter".
- Understand dependencies — what settings, config, environment, or assumptions does this need?
Phase 3: Hypothesis and testing
- Form a single hypothesis — state clearly: "I think X is the root cause because Y". Be specific.
- Test minimally — make the smallest possible change to test the hypothesis. One variable at a time. Do not fix multiple things at once. Revert experimental code changes after observing the result so Phase 4 starts from the failing baseline.
- Verify before continuing — did it work? Yes → Phase 4. No → form a new hypothesis. Do not add more fixes on top.
- When you do not know — say "I don't understand X". Do not pretend. Ask for help or research more.
Phase 4: Implementation
Classify the bug. Before any fix or verify plan, use the shared
BoundedandArchitecturallabels frombrainstorm-feature. A bug-focused investigation-only request uses the distinctDiagnostic investigationcategory:- Diagnostic investigation — the real question is "is this actually a
bug?" or "what is happening?", not "fix it." Output is an answer with
reproduction evidence; do not write production code. Report the evidence
and stop. If the answer reveals a real fix is needed, re-classify as
Bounded or Architectural before proceeding. This is distinct from
brainstorm-feature's feasibilitySpike. - Bounded — the fix stays within an existing flow and does not change a shared interface, contract, or component boundary. File count alone does not classify the bug. Proceed to step 2.
- Architectural — the fix changes a shared interface, contract, or
component boundary, or spans multiple components. Stop. Tell the user to
invoke
brainstorm-featureto produce a spec, thenplan-featurefor an execution plan, before any fix. Do not patch an architectural bug as if it were bounded; the verify plan in step 3 cannot cover cross-component regression surface that was never spec'd.
When in doubt between two, take the heavier one. Hidden complexity discovered mid-fix upgrades the path — stop, say so, step up. Nothing downgrades mid-fix.
- Diagnostic investigation — the real question is "is this actually a
bug?" or "what is happening?", not "fix it." Output is an answer with
reproduction evidence; do not write production code. Report the evidence
and stop. If the answer reveals a real fix is needed, re-classify as
Bounded or Architectural before proceeding. This is distinct from
- Establish expected behavior. Use source, tests, and current wiki pages.
If they do not establish the intended behavior, stop and tell the user to
invoke
brainstorm-featureto get approval before changing behavior. Write the verify plan. Before writing a regression check or production fix, list the observable conditions that prove the bug is fixed. State each as a checkable claim:
- The original symptom no longer occurs (reproduction steps from Phase 1).
- A repeatable check of the original symptom passes.
- Traced callers and relevant existing tests do not regress (name the
callers and checks from Phase 1, using
review-and-verify's caller- tracing procedure; record any uncovered caller as a verification limit). - Any contract the fix touches still holds (state the contract and how it is checked).
- Any caller or contract without automated coverage is named with a direct check or reported as a verification limitation.
This list is the definition of "fixed" for this bug. Step 9 checks the diff against it;
review-and-verify's "Bug fixed" row requires it. Without a written verify plan, "fixed" is a feeling, not a fact — do not proceed to step 4 until it is written.- Choose a repeatable regression check that reproduces the original symptom. Use an existing test runner when it gives a meaningful test. When none exists, use an available CLI, self-check, or recorded manual procedure with an expected result. Do not set up a unit-test runner solely for this fix.
- Verify the check fails without the fix.
- Apply the smallest root-cause fix. Reuse the verified working pattern from Phase 2 when it fits. A smaller-looking symptom patch is not minimal if sibling callers remain broken.
- Verify the same check passes with the fix.
- Run relevant existing tests and checks for regressions. The final
review-and-verifygate runs repository-mandated full commands when they exist; do not invent a test suite. - Call the available Skill entry whose local name is
review-and-verifyto review the diff against the verify plan from step 3 and run fresh verification. Tell the user to invokedocument-wikiafter verification only when the fix changes observable behavior or reveals stale wiki documentation. An existing page that contradicts the fix remains a blocker until refreshed. Do not update the wiki when it already correctly describes the intended behavior and the fix only restores code to that behavior. - Do not create commits during debugging. Even when the user requests a
commit, wait until final
review-and-verifypasses.
Red flags — stop and return to Phase 1
If you catch yourself thinking:
- "Quick fix for now, investigate later"
- "Just try changing X and see if it works"
- "Add multiple changes, run tests"
- "It's probably X, let me fix that"
- "I don't fully understand but this might work"
- "I'll know it's fixed when I see it" (no written verify plan)
- "It's just a bug, no need to classify" (skipping Diagnostic investigation/Bounded/Architectural)
- "The fix touches one file, so it's bounded" (file count is not the test — interface/contract impact is)
- Proposing solutions before tracing data flow
- "One more fix attempt" (when already tried 2+)
- Each fix reveals a new problem in a different place
All of these mean: stop. Return to Phase 1.
If 3+ fixes have failed, question the architecture. The pattern is wrong, not the implementation.
When process reveals "no root cause"
If systematic investigation reveals the issue is truly environmental, timing-dependent, or external:
- Document what you investigated.
- Record the evidence supporting that conclusion. If the request is a Diagnostic investigation, report the evidence and stop without changing production behavior.
- If handling such as a retry, timeout, error message, or monitoring change is
needed, return to Phase 4: classify the change, establish expected behavior,
and write the verify plan before changing production code. These changes
alter observable behavior. If current sources do not establish the intended
behavior, tell the user to invoke
brainstorm-featureand wait for approval.
But: 95% of "no root cause" cases are incomplete investigation.
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.

