systematic-debugging
Skill1 starsChanged 5 months agoMITView on GitHub
Use when debugging unexpected errors during implementation -- provides a structured 4-phase methodology instead of trial-and-error
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 repository30 other files it gives its agents.
- .codex/AGENTS.mdAGENTS.md
- compound-engineeringSkill
- compound-engineeringSkill
- agent-browserSkill
- agent-native-architectureSkill
- agent-native-auditSkill
- brainstormingSkill
- cavemanSkill
- compound-docsSkill
- compound-engineeringSkill
- compounding-operating-systemSkill
- compound-refreshSkill
- create-agent-skillsSkill
- document-reviewSkill
- file-todosSkill
- finishing-branchSkill
- frontend-designSkill
- gemini-imagegenSkill
- git-worktreeSkill
- grill-meSkill
- ideateSkill
- i-have-adhdSkill
- laravel-conventionsSkill
- orchestrating-swarmsSkill
- rcloneSkill
- resolve-pr-parallelSkill
- setupSkill
- skill-creatorSkill
- ubiquitous-languageSkill
- xml-tag-structureSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 12 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 177 edited versions we read keep these.
12
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 47
When it happens (always, sometimes, under specific conditions)
- Distinctive: line 66
Start fixing before completing this phase
- Distinctive: line 72
Verify or eliminate each hypothesis systematically.
- Distinctive: line 75
Add a diagnostic check (log statement, assertion, breakpoint, print)
- Distinctive: line 76
Run the failing scenario
- Distinctive: line 80
If ruled out: Test the next hypothesis
- Distinctive: line 85
Isolation: Run the failing code in isolation (unit test, REPL, minimal reproduction)
- Distinctive: line 87
Minimal reproduction: Create the smallest possible case that reproduces the error
- Distinctive: line 103
Run the exact same command/test that originally failed
- Distinctive: line 105
Run related tests to check you did not break anything else
- Distinctive: line 106
If the fix introduces new failures, return to Phase 1 with the new error
- Distinctive: line 130
If you discovered a pattern that would help prevent this issue in the future:
“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
A structured methodology for debugging unexpected errors encountered during implementation. Prevents trial-and-error guessing by enforcing a disciplined observe-hypothesize-test-fix cycle.
Announce at start: "I'm using the systematic-debugging skill to diagnose this issue."
When to Use
- A test fails unexpectedly during implementation
- An error occurs that you did not anticipate
- A subagent has retried 2+ times without success
- Something "should work" but does not
- You are tempted to make random changes hoping something fixes it
When NOT to Use
- The error message is clear and the fix is obvious (just fix it)
- You are validating a reported bug (use the
bug-reproduction-validatoragent instead) - The failure is a known issue documented in
docs/solutions/
The 4-Phase Process
Phase 1: Observe
Gather evidence before forming any theories. Do not skip this phase.
- Reproduce the error -- Run the exact command that failed. Confirm you see the same error.
- Read the full error -- Read the COMPLETE error message, stack trace, and any surrounding output. Do not skim.
- Check the context -- What changed recently? What was the last thing that worked? What is different now?
- Gather state -- Check relevant logs, database state, environment variables, configuration files, or any other state that could be relevant.
- Note the symptoms -- Write down exactly what you observe:
- What happens (the error)
- What should happen (expected behavior)
- When it happens (always, sometimes, under specific conditions)
Output of Phase 1: A clear, factual description of the symptoms with no theories attached.
Phase 2: Hypothesize
Form structured theories about the root cause. Do not jump to fixing yet.
- List 3 possible root causes ranked by likelihood:
- Most likely: [hypothesis based on error message and context]
- Possible: [alternative explanation]
- Less likely but worth checking: [edge case or environmental cause]
- For each hypothesis, identify:
- What evidence would confirm it
- What evidence would rule it out
- How to test it without changing production code
Do NOT:
- Start fixing before completing this phase
- Settle on one theory without considering alternatives
- Assume the most obvious cause is correct without verification
Phase 3: Test
Verify or eliminate each hypothesis systematically. Start with the most likely.
- Test the most likely hypothesis first:
- Add a diagnostic check (log statement, assertion, breakpoint, print)
- Run the failing scenario
- Does the evidence confirm or rule out this hypothesis?
- If confirmed: Move to Phase 4 (Fix)
- If ruled out: Test the next hypothesis
- If all 3 ruled out: Return to Phase 2 with new hypotheses based on what you learned
Techniques:
- Binary search: Comment out half the changes, see if the error persists. Narrow down.
- Isolation: Run the failing code in isolation (unit test, REPL, minimal reproduction)
- Comparison: Compare working state (git stash, previous commit) with broken state
- Minimal reproduction: Create the smallest possible case that reproduces the error
Do NOT:
- Make changes to fix the problem while still in this phase
- Skip hypotheses because you "feel" the first one is right
- Change multiple things at once (change one variable at a time)
Phase 4: Fix
Apply a targeted fix to the confirmed root cause.
- Fix the root cause -- not the symptom. If the error is "undefined is not a function," the fix is not adding a null check -- it is understanding WHY the value is undefined and fixing THAT.
- Make the minimal fix -- Change as little as possible. Do not refactor, clean up, or "improve" other code while fixing the bug.
- Verify the fix:
- Run the exact same command/test that originally failed
- Confirm it passes
- Run related tests to check you did not break anything else
- If the fix introduces new failures, return to Phase 1 with the new error
- Check for siblings -- Is this same bug likely to exist in similar code elsewhere? If so, fix those too.
- Remove diagnostics -- Remove any log statements, debug prints, or breakpoints added during Phase 3.
After Debugging
Document the Root Cause
Include in your execution report:
### Debugging Session
- **Symptom:** [what failed]
- **Root cause:** [what was actually wrong]
- **Fix:** [what was changed]
- **Prevention:** [how to prevent this in the future]This information feeds into the learnings brief for subsequent tasks and can be captured in docs/solutions/ via /workflows:compound.
Feed Forward
If you discovered a pattern that would help prevent this issue in the future:
- Note it in the "Patterns Discovered" section of your execution report
- The orchestrator will add it to the learnings brief for subsequent tasks
Anti-Patterns (What NOT to Do)
- Shotgun debugging: Making random changes hoping something works. Always hypothesize first.
- Fix-and-pray: Applying a fix without understanding why it works. If you cannot explain the root cause, you have not found it.
- Stack Overflow driven development: Copying a fix from the internet without understanding what it does or why it applies to your situation.
- Symptom masking: Adding a try/catch, null check, or default value that hides the real problem instead of fixing it.
- Tunnel vision: Fixating on one hypothesis without considering alternatives. The first theory is often wrong.
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.

