systematic-debugging
Skill4 starsChanged 4 days agoMITView on GitHub
Use BEFORE proposing any fix when something is broken — runtime errors (TypeError / Cannot read properties of undefined), wrong/null API data, build/test failures, "did not redirect / stopped working", "stuck loading", regressions, unexpected behavior, recurring errors that survive fixes ("same error again", "error keeps coming back"), repeated TypeScript strict errors (TS2345 null, TS2304 cannot-find-name), tests importing nonexistent modules. Find root cause first; never patch symptoms. NOT for features or greenfield work.
190 other projects use a version of this, 90 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-Packtheir own version, 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 · 90
- obra/superpowers★ 314k12% same
- openai/plugins★ 7.8k12% same
- farm-fe/farm★ 5.6k12% same
- microsoft/FluidFramework★ 4.9k11% same
- UniClipboard/UniClipboard★ 2k12% same
- lingyired/status-trio★ 1.8k12% same
- pcvelz/superpowers★ 1.3k12% same
- DemonDamon/AgenticX★ 1k12% same
- coco-research/coco★ 79712% same
- pedronauck/skills★ 64912% same
80 more not listed
Wrote their own version · 100
- 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
- ChrisWiles/claude-code-showcase★ 6.1ksame name
- compozy/compozy★ 2.9ksame name
- heyitsnoah/claudesidian★ 2.6ksame name
- GanyuanRan/Aegis★ 1.4ksame name
- math-inc/OpenGauss★ 1.3ksame name
90 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 repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- archifySkill
- authSkill
- brainstormingSkill
- browser-toolsSkill
- code-reviewerSkill
- documentation-writerSkill
- fallow-auditSkill
- frontend-designSkill
- github-actionsSkill
- grill-meSkill
- harness-engineerSkill
- impeccableSkill
- linkedinSkill
- map-integrationSkill
- pidocSkill
- playwright-testerSkill
- ponytailSkill
- refactoring-uiSkill
- rust-skillsSkill
- sdk-developmentSkill
- self-learnSkill
- session-auditSkill
- skill-managerSkill
- web-searchSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 177 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Run narrow check once (tsc --noEmit / single failing test file), confirm zero occurrences — not one turn per instance
- Distinctive: line 32
Don't skip when:
- Distinctive: line 45
Read errors carefully — don't skip.
- Distinctive: line 47
Check recent changes — git diff, recent commits, new deps, config, env differences.
- Distinctive: line 61
Test minimally — smallest possible change, one variable at a time
- Distinctive: line 62
Verify before continuing — worked → Phase 4.
- Distinctive: line 63
Don't know? Say "I don't understand X".
- Distinctive: line 92
Document what was investigated
- Distinctive: line 94
Add monitoring/logging for 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
Overview
Root cause before any fix. Symptom fix leaves cause in place = same error returns. Fix proposals before Phase 1 done = guessing.
When to Use
Any technical issue: test failures, prod bugs, unexpected behavior, perf, build failures, integration issues.
Especially when:
- Time pressure (emergencies tempt guessing)
- "Quick fix" seems obvious
- Multiple fixes already tried
- Previous fix didn't work
- Issue not fully understood
The Error-Class Loop
Same error class second time (TS2345 null-check, TS2304 cannot-find-name, test importing nonexistent module, same build error in another file): stop instance-patching. Error surviving two fixes = fixes hit instances, not cause.
rgpattern repo-wide — every occurrence, not just the one compiler showed first- Fix whole class as one change (shared guard, real import path, actual module name)
- Run narrow check once (
tsc --noEmit/ single failing test file), confirm zero occurrences — not one turn per instance
Don't skip when:
- Issue seems simple (simple bugs have root causes too)
- Hurrying (rushing = rework guaranteed)
- Manager wants it NOW (systematic beats thrashing)
The Four Phases
Each phase before next — each produces evidence the next consumes.
Phase 1: Root Cause Investigation
BEFORE any fix:
- Read errors carefully — don't skip; often contain exact solution. Full stack traces, note line numbers, paths, error codes
- Reproduce consistently — exact steps? every time? Not reproducible → gather more data, don't guess
- Check recent changes — git diff, recent commits, new deps, config, env differences. Bug reports quote code at the filed commit — re-read current HEAD first; may already be fixed, or that fix may itself be the bug you're chasing
- Multi-component systems (CI → build → signing, API → service → database): instrument each component boundary, run once, localize failing layer — full technique + multi-layer example + intermittent external-API throttle-counter case in references/evidence-gathering.md
- Error deep in call stack: see references/root-cause-tracing.md for full backward-trace technique. Quick version: where does bad value originate? what called this with it? trace up to source, fix at source not symptom
Phase 2: Pattern Analysis
- Find working examples — similar working code in same codebase. Wrong/null API data: read sibling consumer of same endpoint/hook + endpoint definition (transformResponse?) — actual post-unwrap shape settles it in one glance; variable names like
res.datalie (.unwrap()already returns body) - Compare against references — implementing a pattern? read reference implementation COMPLETELY, every line
- Identify differences — list every difference, however small; never assume "that can't matter"
- Understand dependencies — needed components, settings, config, environment, assumptions
Phase 3: Hypothesis and Testing
- Single hypothesis — "X is root cause because Y", write it down, be specific
- Test minimally — smallest possible change, one variable at a time
- Verify before continuing — worked → Phase 4; didn't → NEW hypothesis; DON'T stack fixes
- Don't know? Say "I don't understand X". Don't pretend. Ask, research
Phase 4: Implementation
Fix root cause, not symptom:
- Failing test case first — simplest reproduction, automated test or one-off script, required before fixing. Written after fix exists? Flip fix back once, confirm test goes red — regression test that never failed proves nothing
- Single fix — root cause only, ONE change, no "while I'm here", no bundled refactoring
- Verify — test passes? no other tests broken? issue resolved? original failing command re-run end-to-end green? Failures stack — one root cause masks the next; green on fixed layer alone ≠ done. Adjacent-path check (fixes = most common regression source): enumerate every other path the touched guard/effect/state participates in, verify each. Guard closing reported hole must neither skip legit run nor fire when silent; re-entered blocks must not stack handlers/listeners (remove-then-add or flag the right event resets)
- Fix doesn't work → STOP. Count fixes tried. <3 → Phase 1 with new info. ≥3 → STOP, question architecture (step 5). No fix #4 without architectural discussion
- 3+ fixes failed = architecture problem. Signals: each fix reveals new shared state/coupling elsewhere, fixes need "massive refactoring", each fix creates new symptoms. STOP, question fundamentals: pattern sound? inertia alone? refactor architecture vs keep patching symptoms? Discuss with human partner first. Not failed hypothesis — wrong architecture
Red Flags — STOP and Follow Process
Red-flag thoughts, human partner's redirect signals, rationalization→reality table in references/red-flags.md — read when caught (or told) guessing. ALL red flags: STOP, return to Phase 1. 3+ fixes failed → question architecture (Phase 4 step 5).
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 minimally | Confirmed or new hypothesis |
| 4. Implementation | Create test, fix, verify | Bug resolved, tests pass |
When Process Reveals "No Root Cause"
Truly environmental / timing-dependent / external:
- Process complete
- Document what was investigated
- Implement appropriate handling (retry, timeout, error message)
- Add monitoring/logging for future
But: 95% of "no root cause" = incomplete investigation.
Supporting Techniques
- references/root-cause-tracing.md — trace bugs backward through call stack to original trigger
- references/defense-in-depth.md — validation at multiple layers after finding root cause
- references/condition-based-waiting.md — replace arbitrary timeouts with condition polling
- references/evidence-gathering.md — multi-component instrumentation + external-API throttle-counter case
- references/red-flags.md — red-flag thoughts, human-partner signals, rationalization→reality table
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

