systematic-debugging
Skill19 starsChanged 8 months agoMITView on GitHub
Root cause investigation methodology for bugs and failures. Use when encountering test failures, unexpected behavior, or errors during research or implement phases. Find the cause before attempting fixes.
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 repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- brainstormingSkill
- documenting-decisionsSkill
- finishing-workSkill
- git-worktreesSkill
- implementing-plansSkill
- parallel-agentsSkill
- receiving-code-reviewSkill
- researching-codebaseSkill
- research-plan-implementSkill
- reviewing-codeSkill
- security-reviewSkill
- synthesizing-researchSkill
- test-driven-developmentSkill
- verification-before-completionSkill
- writing-plansSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. 0 are common, 22 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 177 edited versions we read keep these.
22
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 45
Check git log for recent commits
- Distinctive: line 49
Add logging at key points
- Distinctive: line 50
Check system state (memory, disk, network)
- Distinctive: line 54
Start from the error
- Distinctive: line 87
Only one hypothesis at a time
- Distinctive: line 96
Don't bundle multiple changes
- Distinctive: line 114
Test should fail before fix
- Distinctive: line 115
Test should pass after fix
- Distinctive: line 119
Not symptoms or side effects
- Distinctive: line 124
All other tests pass
- Distinctive: line 129
Should you search for similar patterns?
- Distinctive: line 146
When investigating an issue:
- Distinctive: line 148
Use this skill to understand the problem
- Distinctive: line 149
Document root cause in research findings
- Distinctive: line 154
When a step fails verification:
- Distinctive: line 156
Stop the step (do not proceed)
- Distinctive: line 159
Update plan if fix requires changes
- Distinctive: line 164
If you've attempted three or more fixes and the problem persists:
- Distinctive: line 170
Should this be reimplemented differently?
- Distinctive: line 172
Use AskUserQuestion to discuss architectural concerns before continuing.
- Distinctive: line 223
Right: Verify fix addresses root cause
- Distinctive: line 227
Wrong: Remove code until error goes away
“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
Find the root cause before attempting fixes. Symptom fixes are failure.
Purpose
Debugging without methodology wastes time and creates new bugs. Random fixes address symptoms, not causes. This skill enforces systematic investigation to find root causes before any fix is attempted.
The Iron Law
ALWAYS find root cause before attempting fixes.
Quick patches mask underlying issues. If you're trying fixes without understanding why they might work, you're guessing - stop and investigate.
The Four Phases
Complete each phase in order. Do not skip to implementation.
Phase 1: Root Cause Investigation
Understand what's happening before theorizing why.
- Read the error carefully
- Full error message, not just the first line
- Stack trace - where did it originate?
- Error codes or types
- Reproduce consistently
- Can you trigger the failure reliably?
- What are the exact steps?
- Does it fail the same way every time?
- Review recent changes
- What changed since it last worked?
- Check git log for recent commits
- Any new dependencies or configuration?
- Gather diagnostic evidence
- Add logging at key points
- Check system state (memory, disk, network)
- Inspect input data
- Trace backwards
- Start from the error
- Work backwards through the call stack
- Find where correct behavior diverges
Phase 2: Pattern Analysis
Compare against working code.
- Find similar working code
- How does a working version do this?
- What's different about this case?
- Compare against references
- Documentation examples
- Library/framework conventions
- Previous implementations
- Identify the difference
- What's unique about the failing case?
- What assumption is being violated?
- Understand dependencies
- What does this code depend on?
- Could a dependency have changed?
- Are versions correct?
Phase 3: Hypothesis and Testing
Scientific method for debugging.
- Form a single hypothesis
- "The error occurs because X"
- Be specific and testable
- Only one hypothesis at a time
- Design a test
- How would you prove/disprove this hypothesis?
- What would you expect to see if correct?
- What would you expect to see if wrong?
- Make minimal changes
- Change ONE thing to test the hypothesis
- Don't bundle multiple changes
- Keep changes reversible
- Observe results
- Did the change affect the behavior?
- Does it match your prediction?
- Record what happened
- Iterate or proceed
- Hypothesis confirmed: proceed to Phase 4
- Hypothesis rejected: form new hypothesis, repeat Phase 3
Phase 4: Implementation
Fix only after understanding.
- Write a failing test
- Capture the bug in a test
- Test should fail before fix
- Test should pass after fix
- Implement single fix
- Address the root cause
- Not symptoms or side effects
- Minimal change required
- Verify the fix
- Original test passes
- All other tests pass
- Manual verification if applicable
- Check for related issues
- Could this bug exist elsewhere?
- Should you search for similar patterns?
Red Flags: You're Skipping Investigation
| Thought | Reality |
| "Let me try this quick fix" | You don't understand the cause |
| "I'll just restart the service" | Masking the symptom |
| "Maybe if I add a null check here" | Guessing, not debugging |
| "Let me try a few things" | Random changes waste time |
| "This usually fixes it" | Past fixes don't explain current bugs |
| "I don't have time to investigate" | You don't have time NOT to |
Integration with RPI Workflow
During Research Phase
When investigating an issue:
- Use this skill to understand the problem
- Document root cause in research findings
- Root cause informs the implementation plan
During Implement Phase
When a step fails verification:
- Stop the step (do not proceed)
- Apply this debugging methodology
- Find root cause before attempting fixes
- Update plan if fix requires changes
- Resume implementation after fix verified
Escalation: When to Question Architecture
If you've attempted three or more fixes and the problem persists:
Stop fixing. Question the architecture.
- Is the design fundamentally flawed?
- Are we fighting the framework?
- Should this be reimplemented differently?
Use AskUserQuestion to discuss architectural concerns before continuing.
Evidence Gathering Techniques
Logging
Add temporary logging:
- Entry/exit of functions
- Variable values at key points
- Timestamps for timing issues
- Request/response payloadsBisection
When did it break?
- git bisect to find breaking commit
- Binary search through code changes
- Narrow down to specific changeIsolation
Simplify to reproduce:
- Remove unrelated code
- Use minimal test case
- Eliminate variablesComparison
What's different?
- Working vs broken environment
- Working vs broken input
- Working vs broken configurationAnti-Patterns
Shotgun Debugging
Wrong: Try random changes hoping one works Right: Form hypothesis, test it, iterate
Fix and Pray
Wrong: Apply fix, hope it works, move on Right: Verify fix addresses root cause
Debugging by Deletion
Wrong: Remove code until error goes away Right: Understand why code causes error
Copy-Paste Fixes
Wrong: Find similar fix online, apply blindly Right: Understand why the fix works for your case
Skipping to Phase 4
Wrong: "I think I know the fix, let me just try it" Right: Complete investigation phases first
Checklist Before Fixing
- Error message read completely
- Failure reproduced consistently
- Recent changes reviewed
- Diagnostic evidence gathered
- Root cause identified (not just symptoms)
- Hypothesis formed and tested
- Fix addresses root cause
- Failing test written before 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.

