systematic-debugging
Skill1 starsChanged 5 months agoMITView on GitHub
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
191 other projects use a version of this, 82 of them edited.
Adopted by
Most recently taken up by
- NousResearch/hermes-agenttheir own version, 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/kamehadbtheir own version, 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 · 82
- obra/superpowers★ 314k11% same
- openai/plugins★ 7.3k11% same
- microsoft/FluidFramework★ 4.9k11% same
- pedronauck/skills★ 63311% same
- coco-research/coco★ 43710% same
- Ibrahim-3d/orchestrator-supaconductor★ 38012% same
- maslennikov-ig/claude-code-orchestrator-kit★ 25910% same
- julianromli/ai-skills★ 19210% same
- totvs/engpro-advpl-tlpp-skills★ 13811% same
- aaddrick/claude-pipeline★ 12911% same
72 more not listed
Wrote their own version · 109
- NousResearch/hermes-agent★ 267ksame name
- 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
99 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 repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- analyzing-over-engineeringSkill
- brainstormingSkill
- curating-docsSkill
- executing-plansSkill
- finishing-workSkill
- planningSkill
- reviewing-codeSkill
- test-driven-developmentSkill
- using-devflowSkill
- verifying-completionSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 173 edited versions we read keep these.
8
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 12
No automatic fixes: Never implement a fix without the user's explicit approval.
- Distinctive: line 13
No fixes without root cause investigation first: If you haven't completed Phase 1, you cannot propose fixes.
- Distinctive: line 43
Do not implement any fix yet: After root cause is confirmed, present to the user:
- Distinctive: line 49
Wait for the user's explicit approval: Only proceed to Phase 5 after the user says "go ahead", "approved", "implement it", or similar.
- Distinctive: line 62
If you catch yourself thinking any of these, stop and return to root cause investigation:
- Distinctive: line 80
If systematic investigation reveals the issue is truly environmental, timing-dependent, or external:
- Distinctive: line 81
Document what you investigated.
- Distinctive: line 83
Add monitoring/logging for future investigation.
“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
Find root cause before attempting fixes. Symptom fixes are failure.
Iron Law
- No automatic fixes. Never implement a fix without the user's explicit approval.
- No fixes without root cause investigation first. If you haven't completed Phase 1, you cannot propose fixes.
The Five Phases
Complete each phase before proceeding to the next.
Phase 1: Root Cause Investigation
- Read error messages carefully — stack traces, line numbers, error codes. Don't skip past warnings.
- Reproduce consistently — exact steps. If not reproducible, gather more data; don't guess.
- Check recent changes — git diff, recent commits, new dependencies, config changes.
- Trace data flow — where does the bad value originate? Trace backward through the call stack until you find the source. Fix at source, not at symptom.
- Multi-component systems — for each component boundary, add diagnostic instrumentation to log what enters and exits, then run once to see where it breaks.
Phase 2: Pattern Analysis
- Find working examples — locate similar working code in the same codebase.
- Compare against references — if implementing a pattern, read the reference implementation completely.
- Identify differences — list every difference between working and broken, however small.
- Understand dependencies — what other components, configs, or assumptions does this depend on?
Phase 3: Hypothesis and Testing
- Form a single hypothesis — "I think X is the root cause because Y." Be specific.
- Test minimally — smallest possible change, one variable at a time.
- Verify — did it work? Yes → Phase 4. No → form NEW hypothesis. Don't pile on more fixes.
- When you don't know — say "I don't understand X." Don't pretend.
Phase 4: Present Before Acting
Do not implement any fix yet. After root cause is confirmed, present to the user:
- Conclusion — What is the root cause, with clear evidence.
- Fix plan — What specific changes will be made, where, and why.
- Impact assessment — What else might be affected by this change.
Wait for the user's explicit approval. Only proceed to Phase 5 after the user says "go ahead", "approved", "implement it", or similar.
Phase 5: Implementation (only after user approval)
- Create a failing test that reproduces the bug (use the
test-driven-developmentskill for the bug-fix TDD flow). - Implement a single fix — address the root cause, one change at a time. No "while I'm here" extras.
- Verify — test passes? No other tests broken? Issue resolved?
- If fix doesn't work — stop. Count attempts:
- < 3: Return to Phase 1 with new information.
- ≥ 3: STOP. Question the architecture. Each fix revealing new problems in different places signals a fundamental architectural issue. Discuss with the user before attempting more fixes.
Red Flags — Return to Phase 1
If you catch yourself thinking any of these, stop and return to root cause investigation:
- "Quick fix for now, investigate later" — random fixes create new bugs
- "Just try changing X and see" — guessing is not debugging
- "It's probably X, let me fix that" — probability is not root cause
- "Let me just fix it directly" — never implement a fix without presenting the conclusion and fix plan to the user first
- "One more fix attempt" (after 2+ failures) — 3+ failures signals an architectural problem, not a debugging one
Gotchas
- Caching masks the real state. Build caches (Vite/Webpack), module caches (
node_modules,__pycache__,.gradle), Docker layers, and browser caches can serve stale code — making a fix look ineffective or a bug appear intermittent. After a fix that "didn't work," rule out a stale cache before forming a new hypothesis. - Flaky locally, consistent in CI (or vice versa) usually means a race or an environment delta. Suspect: timing/ordering between tests, different dependency versions, missing env vars, or a test polluter that runs earlier in the CI shard.
- A green test does not prove the code works. Over-mocked tests assert the mock's behavior, not the system's. A bug can hide behind a passing test — check that the test exercises real behavior.
- Silent failures are worse than loud ones. Swallowed exceptions, caught-and-ignored promises, and
|| defaultValuefallthroughs erase the evidence. Re-surface them temporarily to find the source. - Log to stderr, not the app logger, when debugging in tests. Application loggers are often muted in test runs; use
console.error/stderr so output appears. When a call chain can't be traced by reading code, capturenew Error().stackbefore the operation to name the triggering caller.
When Process Reveals No Root Cause
If systematic investigation reveals the issue is truly environmental, timing-dependent, or external:
- Document what you investigated.
- Implement appropriate handling (retry, timeout, error message).
- Add monitoring/logging for future investigation.
After Debugging
Once the root cause is identified and the fix is verified, return to the workflow step that was interrupted. If debugging was triggered by a subagent failure in executing-plans, re-dispatch the implementer with the root cause analysis to apply the fix. If debugging was triggered by a user directly asking about a bug, report the findings and fix.
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.

