systematic-debugging
Skill3 starsChanged 11 days agoMITView on GitHub
Use when something fails or behaves unexpectedly: a bug, a failing test or build, a hung or stale process, a service that broke after an update or restart, a zero metric on a feature that looks fine, or "it used to work". Covers root-cause investigation before fixes, boundary evidence and runtime incidents. Not for writing the regression test (use testing-discipline) or the closing claim (use verification-before-completion).
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 repository55 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- architecture-simplicitySkill
- autonomous-workSkill
- brainstormingSkill
- code-graph-reviewSkill
- code-review-and-qualitySkill
- dashboard-designSkill
- design-systemSkill
- dev-wikiSkill
- dispatching-parallel-agentsSkill
- fable-judgeSkill
- fable-methodSkill
- git-workflow-and-versioningSkill
- money-path-safetySkill
- observability-and-instrumentationSkill
- ponytailSkill
- production-first-decisionsSkill
- receiving-code-reviewSkill
- security-and-hardeningSkill
- shipping-and-launchSkill
- skill-authoringSkill
- testing-disciplineSkill
- using-git-worktreesSkill
- verification-before-completionSkill
- web-researchSkill
- windows-encoding-fixesSkill
- writing-plansSkill
- architecture-simplicitySkill
- autonomous-workSkill
- brainstormingSkill
- code-graph-reviewSkill
- code-review-and-qualitySkill
- dashboard-designSkill
- design-systemSkill
- dev-wikiSkill
- dispatching-parallel-agentsSkill
- fable-judgeSkill
- fable-methodSkill
- git-workflow-and-versioningSkill
- money-path-safetySkill
- observability-and-instrumentationSkill
- ponytailSkill
- production-first-decisionsSkill
- receiving-code-reviewSkill
- security-and-hardeningSkill
- shipping-and-launchSkill
- skill-authoringSkill
- systematic-debuggingSkill
- testing-disciplineSkill
- using-git-worktreesSkill
- verification-before-completionSkill
- web-researchSkill
- windows-encoding-fixesSkill
- writing-plansSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 177 edited versions we read keep these.
7
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 19
Do not change code to see what happens.
- Distinctive: line 31
Trace data flow backward: When the failure is deep, walk up the call chain: where did the bad value originate, what passed it on, and from …
- Distinctive: line 36
When applying an existing pattern, read the reference implementation completely rather than adapting from a skim.
- Distinctive: line 43
Test it minimally — one variable, the smallest change that distinguishes the hypothesis from its alternative, with a bounded run.
- Distinctive: line 44
Verify before continuing. Confirmed → Phase 4.
- Distinctive: line 45
When you do not know, say so and gather the missing evidence.
- Distinctive: line 81
Stop, restart or kill only processes this task started or that the user explicitly named.
“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 cause before changing behavior. A fix that only silences the symptom comes back, usually with a sibling.
When this applies
Code-level failures — bugs, test failures, build failures, unexpected values, performance regressions, integration breaks — and runtime incidents: a hung or stale process, a zero metric on a feature users call working, a regression after an update or restart, a service that was fine yesterday.
It applies most when a fix looks obvious, when you are in a hurry, when an earlier fix did not stick, or when you still do not understand the issue. "Simple" bugs have root causes too, and guessing costs more than reading.
Do not change code to see what happens. Investigate until a cause is named, then change it.
Proportionality
Match depth to the failure. A typo, a renamed symbol, or a failure whose stack trace names the exact argument needs a look at the cited location and a recheck, not the full sequence below. A failure with unknown cause, an intermittent or data-affecting symptom, a money path, or a second failed attempt earns the full investigation. When you take the short path, say what you ruled in and how you checked it.
Phase 1: root cause investigation
- Read the error completely. Stack traces, line numbers, paths, error codes, the wording of warnings. They frequently contain the answer that makes guessing unnecessary.
- Reproduce consistently. What are the exact steps, how often, under what conditions? A user-reported failure is ground truth for the symptom; reproduce locally when diagnosis needs it, when building a regression check, or when the report alone cannot localize the fault. Not reproducible with the evidence at hand → gather more data and name what is unavailable instead of assuming the report is wrong.
- Check recent changes.
git diff, recent commits, new dependencies, config edits, environment differences — the cause usually sits in what changed. - In multi-component systems, observe the boundaries. When the path crosses layers (CI → build → signing, API → service → database), log what enters and exits each boundary and what environment each layer sees, run once to learn where the break is, then investigate that component. Example: separately probe whether the secret is visible in the workflow, whether the build script's environment has it, and what the signing tool reports — the first layer that loses a value is the one to inspect.
- Trace data flow backward. When the failure is deep, walk up the call chain: where did the bad value originate, what passed it on, and from where. Fix at the source, not where the bad value surfaced.
Phase 2: pattern analysis
- Find a similar place that works in the same codebase and compare them.
- When applying an existing pattern, read the reference implementation completely rather than adapting from a skim; partial understanding reproduces the bug you are fixing.
- List every difference between working and broken, including ones that "cannot matter".
- List the dependencies the code needs: settings, config, environment, assumptions about callers.
Phase 3: hypothesis and testing
- State one specific hypothesis: "X is the cause because Y". Write it down; vague ideas cannot be refuted.
- Test it minimally — one variable, the smallest change that distinguishes the hypothesis from its alternative, with a bounded run.
- Verify before continuing. Confirmed → Phase 4. Not confirmed → form a new hypothesis; do not stack another fix on the unconfirmed one.
- When you do not know, say so and gather the missing evidence. Ask the user only for what tools cannot obtain: access, intent, business rules, or a decision.
Phase 4: implementation
- Establish failure evidence — an existing check, an isolated probe, or the user's report; see testing-discipline for designing the regression test and OPS §3 for reuse. State what before-fix evidence is unavailable.
- One fix for the named cause. No "while I'm here" improvements, no bundled refactoring.
- Verify the fix and its neighborhood. The original symptom is gone, adjacent behavior still works, applicable checks pass.
- Sweep for the same pattern. Once the cause is understood, search for the same faulty shape elsewhere — the same parser, the same missing timeout, the same swallowed exception. Fix what plausibly recurs; mention the rest.
- If the fix fails, return to investigation with the new evidence. Repeated failures change the hypothesis or the scope, not the retry count.
- If evidence points at architecture — shared-state coupling, a repair that needs broad refactoring, a new symptom at every boundary — investigate that before adding another patch; several failed patches alone do not prove it. Ask only if the repair needs authority beyond the task or carries an unresolved product tradeoff.
Runtime and process incidents
Incidents usually provide plenty of facts and little interpretation. Collect facts first, then form one theory.
- Order evidence by directness. For a data-driven service the cheap facts are the config flags, the database row, the log lines — and only then a code hypothesis. That order is an example, not a ritual: start where the fault most likely lives, and prefer reading the actual state over reasoning about it.
- Symptom ≠ cause. "Minutes are not deducted" is a symptom; a silently swallowed exception plus a wrong parser is the cause. Trace the call path to the side effect and fix the cause once.
- Zero metric on a "working" feature is a silent failure. UX success plus a flat metric means the write path never happened: look for an
exceptor an early return on the metric path. - One consumer per exclusive stream. Long-poll, queue, or lock file: duplicates split or steal events. Health is exactly one process for the stream; stop duplicates only when this task started them or the user named them.
- Restart ritual after any fix. Code on disk is not code in memory. Stop every instance this task owns (or the user named), start one, and read the fresh log lines. A cheap check is process creation time against the edit time; an older process is running the old code.
- Serving versus caching. "Still broken" often means the server never served the fixed bytes. Fetch the served output and look for the fix marker before hunting the bug again, and rule out a foreign process on the port — an old test instance there looks exactly like a broken build.
- Console encoding is not product encoding. Mojibake on the terminal does not mean stored data is corrupted; check the encoding of the real artifact.
Localizing a hang
- "It cannot hang" is not an argument. A network call without a timeout, an interactive prompt, and an infinite loop all hang.
- Mark each stage at its start and write progress to a file, not down a pipe that can stall or truncate the tail. The hang is inside the last stage whose marker appeared.
- Isolate the suspect stage with a short timeout (tens of seconds) instead of rerunning the whole sequence at a long one.
- Split
A && B && C: a chain hides which stage stalled. - Suspect infrastructure before logic — setup hooks, module loading, network, interactivity fail more often than the "instant" step.
- Compare against the last successful run; the culprit is usually in the diff since then.
Scope discipline
Read-only or review-only work means diagnose and report. Read logs, configs, process state and served bytes, but do not add instrumentation, caches or log files to the tree; describe the instrumentation you would add instead. A local implementation task may add temporary probes, and should remove them before finishing.
Stop, restart or kill only processes this task started or that the user explicitly named. Another instance's process is user data: report what you see and ask.
Red flags
You are guessing rather than debugging when you catch yourself:
- proposing a fix before tracing how the bad value got there
- "quick fix now, investigate later", or "just try changing X and see"
- changing several things at once, so no result can be attributed
- assuming "it is probably X" without evidence that distinguishes X from Y
- adapting a reference pattern without reading it
- listing fixes instead of causes
- repeating a fix that already failed, with nothing new learned
- watching each fix expose a new problem somewhere else
Any of these means return to Phase 1.
Rationalizations
| Excuse | Reality |
| "Issue is simple, no process needed" | Simple issues have causes too, and the process is fast for them |
| "Emergency, no time for process" | Reading the error costs less than a round of failed patches |
| "Just try this first, then investigate" | The first guess sets the pattern; start with evidence |
| "I'll write the test after confirming the fix" | Untested fixes do not stick; the failing check is how the fix is confirmed |
| "Multiple fixes at once saves time" | Nothing can be attributed, and new bugs hide among them |
| "Reference is long, I'll adapt it" | Partial understanding reproduces the bug; read it completely |
| "I see the problem, let me fix it" | Seeing the symptom is not knowing the cause |
| "One more attempt" with no new evidence | A new trace or probe justifies a bounded retry; a retry count does not |
| "It worked before the update, so the update broke it" | A stale process or a cache explains it just as often; verify what is running and served |
| "The metric is just delayed" | A working UX with a flat metric is usually a swallowed error; check the write path |
| "A restart will clear it" | A restart without a cause hides the leak and it returns; use it to test a hypothesis, not to close one |
Triage shortcuts
Test failure after a code change — did you touch code it covers? Then decide whether test or code is wrong. Touched unrelated code? Look at shared state, imports, globals, order dependence. Already flaky? Check timing and isolation.
Build failure — type error: read the cited location and its types. Import error: module exists, exports match, paths correct. Config error: the build config files. Dependency error: the manifest, then install. Environment error: tool version, OS.
Runtime incident — fresh or stale process? Served bytes current? One consumer? Then symptom → metric/log path → call chain.
When the cause is genuinely external
If investigation shows the trigger is environmental, timing-dependent, or outside the repository, the investigation is complete: document what you checked and which hypotheses were ruled out, then handle it (retry with a bound, timeout, clearer error) and add the logging or monitoring that makes the next occurrence diagnosable. Before concluding "no root cause", name the hypotheses you tested and the evidence still unavailable — missing evidence is not proof of absence.
Supporting techniques
- Condition-based waiting — wait for an observable condition with a bounded timeout; prefer native events over arbitrary sleeps or unbounded polling.
- Defense in depth — add boundary validation only where the demonstrated failure can still enter; do not harden unrelated layers.
Source: obra/superpowers (MIT). Adapted for coding-kit: cross-references made local.
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.

