systematic-debugging
Skill847 starsChanged 7 months agoMITView on GitHub
Structured debugging methodology — use before proposing fixes for any error or failure. Covers: code bugs, build errors, deploy failures, config conflicts, dependency issues, infra problems. Also use when previous fix attempts failed or root cause is unclear.
191 other projects use a version of this, 1 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-dshtheir own version, 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 · 1
- itseffi/agentic-os★ 11511% same
Wrote their own version · 190
- obra/superpowers★ 314ksame name
- NousResearch/hermes-agent★ 267ksame name
- open-metadata/OpenMetadata★ 15ksame name
- jnMetaCode/superpowers-zh★ 8.3ksame name
- openai/plugins★ 7.3ksame name
- ChrisWiles/claude-code-showcase★ 6.1ksame name
- microsoft/FluidFramework★ 4.9ksame name
- compozy/compozy★ 2.8ksame name
- GanyuanRan/Aegis★ 1.3ksame name
- SethGammon/Citadel★ 922same 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 repository32 other files it gives its agents.
- blind-spot-passSkill
- build-systemSkill
- cache-componentsSkill
- cc-dev-agentSkill
- continuous-learning-v2Skill
- debugging-strategiesSkill
- dependency-upgradeSkill
- eval-harnessSkill
- evaluating-code-modelsSkill
- evaluating-llms-harnessSkill
- extract-errorsSkill
- frontend-code-reviewSkill
- harness-dietSkill
- humanize-koreanSkill
- korean-character-countSkill
- korean-spell-checkSkill
- loop-forgeSkill
- manage-skillsSkill
- prompts-chatSkill
- relaySkill
- review-loopSkill
- security-complianceSkill
- security-pipelineSkill
- session-wrapSkill
- skill-factorySkill
- strategic-compactSkill
- stride-analysis-patternsSkill
- summarizeSkill
- team-orchestratorSkill
- using-superpowersSkill
- verification-engineSkill
- verify-implementationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 1 is common, 13 are distinctive, and 0 are very specific to this project.
1
Common
Most of the 173 edited versions we read keep these.
13
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 32
Test failures, build errors, deploy errors
- Distinctive: line 50
Run immediately when an error occurs.
- Distinctive: line 54
After recent dependency/version change?
- Distinctive: line 55
Only fails in specific code path?
- Distinctive: line 61
All Iron Law conditions met → Fix in Phase 0
- Common: line 70
Don't skip errors/warnings
- Distinctive: line 71
Read the entire stack trace
- Distinctive: line 76
Every time? If intermittent, collect more data
- Distinctive: line 85
Read official docs for the failure mechanism
- Distinctive: line 86
Check release notes for breaking changes
- Distinctive: line 91
Run once to find where it breaks
- Distinctive: line 109
Verify clean state (git status)
- Distinctive: line 110
If not clean: git stash or save checkpoint
- Distinctive: line 139
Should we refactor the architecture instead of fixing symptoms?
“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
Overview
Guessing fixes wastes time and creates new bugs. Quick patches hide root problems.
Core principle: Never fix before finding the root cause. Symptom fixing is failure.
Iron Law
Never propose a fix without root cause investigation.Phase 0 or Phase 1 must be completed before any fix is proposed. Phase 0 fixes are ONLY allowed when ALL of these are true:
- External research found an official solution or known issue for this exact error
- Change is single file, single point (config value, import, typo)
- No logic changes
When to Use
All technical problems:
- Test failures, build errors, deploy errors
- Config conflicts, dependency issues
- Infrastructure/environment problems
- Unexpected behavior, performance issues
Especially when:
- Under time pressure (urgency breeds guessing)
- "Let me just quickly fix this" comes to mind
- Multiple fix attempts have already been tried
- Previous fixes didn't work
- You don't fully understand the problem
The Phases
Each Phase must complete before proceeding to the next.
Phase 0: Quick Assessment
Run immediately when an error occurs. Before any fix attempt.
- Classify the error — read the error message/symptoms:
- Same code works in different environment? → Environment issue
- After recent dependency/version change? → Dependency issue
- Only fails in specific code path? → Code issue
- External research (exact match, 5 min max) — check official docs and GitHub Issues for known issues. Don't rely on self-knowledge alone.
- See:
references/external-research-guide.md
- See:
- Branch decision:
- All Iron Law conditions met → Fix in Phase 0
- Any condition unmet → Enter Phase 1 full process
- Phase 0 quick-fix fails: Undo (git checkout/undo), enter Phase 1. This attempt counts in the fix counter.
Phase 1: Root Cause Investigation
Before any fix attempt:
- Read the error carefully
- Don't skip errors/warnings
- Read the entire stack trace
- Record line numbers, file paths, error codes
- Reproduce consistently
- Get exact reproduction steps
- Every time? If intermittent, collect more data
- Check recent changes
- git diff, recent commits
- New dependencies, config changes
- Environment differences (env vars, Node/runtime version, OS)
- Research external sources (deep read)
- Based on Phase 0 exact match results, investigate further
- Read official docs for the failure mechanism
- Check release notes for breaking changes
- See:
references/external-research-guide.md
- Collect evidence in multi-component systems
- Log data in/out at each component boundary
- Run once to find where it breaks
- Then deep-dive into that component
- Trace data flow
- Where does the wrong value originate?
- Trace the call stack backwards to the source
- See:
references/root-cause-tracing.md
Phase 2: Pattern Analysis
- Find similar working code in the same codebase
- Compare with reference implementations — read the full reference docs, don't skim
- Identify all differences between working and broken — don't assume "that's irrelevant"
- Map dependencies — what config, environment, other components are needed
Phase 3: Hypothesis and Testing
Before entering Phase 3:
- Verify clean state (git status)
- If not clean: git stash or save checkpoint
- On hypothesis failure: rollback to safe point, try new hypothesis (no cumulative fixes)
- Form a single hypothesis: "X is the root cause because Y" — specific, not vague
- Test minimally: smallest change to verify the hypothesis. One variable at a time.
- Verify before proceeding:
- Success → Phase 4
- Failure → New hypothesis (don't stack fixes on top of failed ones)
Phase 4: Implementation
- Write a failing test — simplest reproduction, automated if possible, before fixing
- Apply a single fix — only the identified root cause, one change at a time, no "while I'm at it"
- Verify the fix — test passes? No other tests broken? Problem actually resolved?
- If fix doesn't work:
- How many fix attempts so far?
- Under 3: return to Phase 1 with new information
- 3 or more: proceed to Phase 4.5
Phase 4.5: Architecture Question
Pattern of 3+ failed fixes:
- Each fix reveals new problems elsewhere
- Fix requires "major refactoring"
- Each fix creates symptoms in other places
Stop immediately and ask fundamental questions:
- Is this pattern itself sound?
- Are we clinging to it out of inertia?
- Should we refactor the architecture instead of fixing symptoms?
Report to user and discuss before any more fix attempts.
Red Flags — If you think this, STOP
- "Let me quickly fix it and investigate later"
- "Let me try changing X and see if it works"
- "Let me bundle multiple changes and test once"
- "Skip tests, just check manually"
- "It's probably X, let me fix it"
- "I don't fully understand but this might work"
- "Let me just try one more fix" (after 2+ attempts)
- "I don't need to check external docs for this one"
- "This is definitely a code issue" (without checking environment)
Any of the above: STOP. Return to Phase 0/1. 3+ fix failures: Architecture Question (Phase 4.5)
Common Rationalizations
| Excuse | Reality |
| "Simple problem, don't need the process" | Simple problems have root causes too. The process is fast for simple bugs. |
| "Too urgent for process" | Systematic debugging is faster than guessing. |
| "Let me try this first, then investigate" | First fix sets the pattern. Start right. |
| "I'll write tests after fixing" | Fixes without tests don't last. Test first. |
| "Bundle changes to save time" | Can't tell what worked. Creates new bugs. |
| "Docs are too long, I'll wing it" | Partial understanding = guaranteed bugs. Read it all. |
| "I can see the problem, just fix it" | Seeing symptoms ≠ understanding root cause. |
| "One more fix" (2+ failures) | 3+ failures = architecture problem. Ask, don't fix. |
| "I know this error, no need to check docs" | LLM confidence ≠ accuracy. Verify externally. |
Supporting Techniques
See references in this directory:
references/external-research-guide.md— External docs/GitHub Issues lookup procedurereferences/root-cause-tracing.md— Call stack backtracing to find bug origins
Quick Reference
| Phase | Key Activity | Success Criteria |
| 0. Quick Assessment | Error classification, external research (exact match) | Error type classified + 1+ external search done |
| 1. Root Cause | Read errors, reproduce, check changes, deep research | Understand what breaks and why |
| 2. Pattern | Find working similar code, compare | Differences identified |
| 3. Hypothesis | Single hypothesis, minimal test | Confirmed or new hypothesis |
| 4. Implementation | Write test, fix, verify | Bug fixed, tests pass |
| 4.5. Architecture | Stop after 3 failures, report | Architecture review decision |
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.

