systematic-debugging
Skill2 starsChanged 9 months agoMITView on GitHub
Systematic debugging process for any error, test failure, or unexpected behavior. Investigate root cause BEFORE proposing a fix.
190 other projects use a version of this, 113 of them edited.
Adopted by
Most recently taken up by
- DemonDamon/AgenticXedited, first seen Nov 9, 2026
- chrysogonus/power-agentsedited, first seen Nov 8, 2026
- willy92wins/DayZ-Modding-Knowledge-Packedited, first seen Nov 8, 2026
- roundpilot/superpowers-antigravityedited, first seen Nov 8, 2026
- REPOZY/superpowers-optimizedtheir own version, first seen Nov 8, 2026
- lingyired/status-trioedited, 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 · 113
- obra/superpowers★ 314k23% same
- NousResearch/hermes-agent★ 262k14% same
- openai/plugins★ 7.8k24% same
- farm-fe/farm★ 5.6k23% same
- microsoft/FluidFramework★ 4.9k24% same
- heyitsnoah/claudesidian★ 2.6k20% same
- UniClipboard/UniClipboard★ 2k23% same
- lingyired/status-trio★ 1.8k23% same
- pcvelz/superpowers★ 1.3k24% same
- math-inc/OpenGauss★ 1.3k22% same
103 more not listed
Wrote their own version · 77
- open-metadata/OpenMetadata★ 16ksame name
- jnMetaCode/superpowers-zh★ 8.4ksame name
- vudovn/ag-kit★ 8.2ksame name
- vudovn/antigravity-kit★ 8.2ksame name
- ChrisWiles/claude-code-showcase★ 6.1ksame name
- compozy/compozy★ 2.9ksame name
- GanyuanRan/Aegis★ 1.4ksame name
- SethGammon/Citadel★ 927same name
- KbWen/agentic-os★ 229same name
- linxuan-sys/opencode-skills-chinese★ 200same name
67 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 repository27 other files it gives its agents.
- Agent BrowserSkill
- agent-governanceSkill
- agent-system-learning-loopSkill
- agent-system-live-quality-opsSkill
- agent-system-memory-proactivity-opsSkill
- agent-system-output-hygiene-opsSkill
- agent-system-stability-opsSkill
- auto-updaterSkill
- deep-researchSkill
- domaindetailsSkill
- hnSkill
- humanizerSkill
- memory-hygieneSkill
- model-usageSkill
- nano-pdfSkill
- news-aggregator-skillSkill
- orchestrator-loopSkill
- prompt-guardSkill
- security-reviewSkill
- self-improvementSkill
- structured-brainstormingSkill
- subagent-executionSkill
- summarizeSkill
- tavilySkill
- tdd-workflowSkill
- topic-monitorSkill
- verification-gateSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 3 are common, 15 are distinctive, and 0 are very specific to this project.
3
Common
Most of the 177 edited versions we read keep these.
15
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
- Common: line 12
Core principle: ALWAYS find the root cause before fixing.
- Distinctive: line 22
If you have not completed Phase 1, you may not propose a fix.
- Distinctive: line 48
Do NOT proceed to the next phase without completing the current one.
- Distinctive: line 55
Do not skip errors or warnings
- Common: line 57
Read stack traces completely
- Distinctive: line 64
If not reproducible, gather more data -- do NOT guess
- Distinctive: line 74
If the system has multiple components (API, service, database, etc.):
- Distinctive: line 90
If the error is deep in the call stack:
- Distinctive: line 105
If you are implementing a pattern, read the reference implementation COMPLETELY
- Distinctive: line 106
Do not skim -- read every line
- Distinctive: line 112
Do not assume "that is not important"
- Distinctive: line 131
Do not fix multiple things at once
- Distinctive: line 136
Do NOT pile more fixes on top
- Distinctive: line 140
Do not pretend you do
- Distinctive: line 152
Must exist BEFORE the fix
- Distinctive: line 171
Do NOT attempt a 4th fix without the architecture discussion
- Distinctive: line 183
Should we refactor the architecture instead of patching symptoms?
- Common: line 191
If you catch yourself thinking:
“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
Overview
Random fixes waste time and create new bugs. Quick patches mask underlying problems.
Core principle: ALWAYS find the root cause before fixing. Symptom fixes are failures.
Violating the letter of this process violates the spirit of debugging.
Iron Rule
NO FIX WITHOUT ROOT CAUSE INVESTIGATIONIf you have not completed Phase 1, you may not propose a fix.
When to Use
For EVERY technical problem:
- Test failures
- Production errors
- Unexpected behavior
- Performance issues
- Build failures
- Integration problems
ESPECIALLY when:
- Under time pressure (urgency makes guessing tempting)
- A "quick fix" seems obvious
- Multiple fixes have been tried
- A previous fix did not work
- You do not fully understand the problem
Do not skip because:
- The problem looks simple (simple problems have root causes too)
- You are in a hurry (rushing guarantees rework)
- A manager wants it fixed NOW (systematic is faster than thrashing)
Four Phases
Do NOT proceed to the next phase without completing the current one.
Phase 1: Root Cause Investigation
BEFORE attempting ANY fix:
- Read Error Messages Carefully
- Do not skip errors or warnings
- They usually contain the exact solution
- Read stack traces completely
- Note line numbers, file paths, error codes
- Reproduce Consistently
- Can you trigger it reliably?
- What are the exact steps?
- Does it happen every time?
- If not reproducible, gather more data -- do NOT guess
- Check Recent Changes
- What changed that could cause this?
- Git diff, recent commits
- New dependencies, config changes
- Environment differences
Gather Evidence Across Components
If the system has multiple components (API, service, database, etc.):
FOR EACH component boundary: - Log the data entering the component - Log the data leaving the component - Verify environment/config propagation - Check state at each layer Run once to gather evidence --> show WHERE it breaks THEN analyze evidence to identify the failing component THEN investigate that specific componentTrace the Data Flow
If the error is deep in the call stack:
- Where was the bad value created?
- Who passed this bad value?
- Trace backward until you find the source
- Fix at the source, not at the symptom
Phase 2: Pattern Analysis
Before fixing, find the pattern:
- Find Working Examples
- Find similar working code in the same codebase
- What works that is similar to what is broken?
- Compare with Reference
- If you are implementing a pattern, read the reference implementation COMPLETELY
- Do not skim -- read every line
- Understand the pattern fully before applying
- Identify Differences
- What is different between working and broken?
- List every difference, no matter how small
- Do not assume "that is not important"
- Understand Dependencies
- What other components does this need?
- What settings, config, environment?
- What assumptions are being made?
Phase 3: Hypothesis and Test
Scientific method:
- Form a Single Hypothesis
- State clearly: "I believe the root cause is X because Y"
- Write it down
- Be specific, not vague
- Test with Minimum Change
- Make the SMALLEST POSSIBLE change to test the hypothesis
- One variable at a time
- Do not fix multiple things at once
- Verify Before Proceeding
- Did it work? Yes --> Phase 4
- Did it not work? Form a NEW hypothesis
- Do NOT pile more fixes on top
- If You Do Not Know
- Say "I do not understand X"
- Do not pretend you do
- Ask for help
- Research further
Phase 4: Implementation
Fix the root cause, not the symptom:
- Create a Failing Test
- Simplest possible reproduction
- Automated test if possible
- One-off test script if no framework exists
- Must exist BEFORE the fix
- REQUIRED SKILL:
tdd-workflow(when writing the fix)
- Apply a Single Fix
- Address the identified root cause
- ONE change at a time
- No "while I am here" improvements
- No bundled refactoring
- Verify the Fix
- Does the test pass now?
- Did any other tests break?
- Is the problem actually resolved?
- If the Fix Does Not Work
- STOP
- Count: How many fixes have you attempted?
- Fewer than 3: Return to Phase 1, re-analyze with new information
- 3 or more: STOP and question the architecture (see step 5 below)
- Do NOT attempt a 4th fix without the architecture discussion
3+ Fixes Failed: Question the Architecture
Indicators of an architectural problem:
- Each fix exposes new shared state, coupling, or issues in a different place
- Fixes require "massive refactoring" to apply
- Each fix creates new symptoms elsewhere
STOP and question the fundamentals:
- Is this pattern fundamentally sound?
- Are we continuing just because of inertia?
- Should we refactor the architecture instead of patching symptoms?
Discuss with the user before attempting more fixes.
This is not a failed hypothesis -- it is a wrong architecture.
Red Flags -- STOP and Follow the Process
If you catch yourself thinking:
- "Quick fix for now, I will investigate later"
- "Let me just change X and see if it works"
- "Make multiple changes, run the tests"
- "Skip the test, I will verify manually"
- "Probably X, let me fix that"
- "I do not fully understand but this might work"
- "The pattern says X but I will adapt it differently"
- "The main issues are: [list of fixes without investigation]"
- Proposing a solution without tracing the data flow
- "One more fix attempt" (after 2+ failures)
- Each fix exposing new problems in different places
ALL OF THESE MEAN: STOP. Return to Phase 1.
If 3+ fixes have failed: Question the architecture (see Phase 4.5).
Common Rationalizations
| Excuse | Reality |
| "Problem is simple, no need for the process" | Simple problems have root causes too. The process is fast for simple bugs. |
| "Emergency, no time for process" | Systematic debugging is FASTER than guess-and-check thrashing. |
| "Let me try this first, then investigate" | The first fix sets the pattern. Get it right from the start. |
| "I will write the test after verifying the fix works" | Untested fixes do not hold. Test first to prove it. |
| "Fixing multiple things at once saves time" | You cannot isolate what worked. Creates new bugs. |
| "The reference is too long, I will adapt the pattern" | Partial understanding GUARANTEES errors. Read it all. |
| "I can see the problem, let me fix it" | Seeing the symptom is not understanding the root cause. |
| "One more fix attempt" (after 2+ failures) | 3+ failures = architectural problem. Question the pattern, do not keep patching. |
Quick Reference
| Phase | Key Activities | Success Criteria |
| 1. Root Cause | Read errors, reproduce, check changes, gather evidence | Understand WHAT and WHY |
| 2. Pattern | Find working examples, compare | Identify differences |
| 3. Hypothesis | Form theory, test with minimum change | Verified or new hypothesis |
| 4. Implementation | Create test, fix, verify | Bug resolved, tests pass |
Supporting Techniques
- Binary search: Narrow down the problem by bisecting the code
- Git bisect: Find the commit that introduced the bug (
git bisect start) - Log analysis: Examine system logs, search for patterns
- Minimal reproduction: Reproduce the problem with the smallest possible example
Related skills:
tdd-workflow-- Creating a failing test (Phase 4, Step 1)verification-gate-- Do NOT claim success without verifying the fix works
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.

