systematic-debugging
Skill4 starsChanged 2 months agoMITView on GitHub
Use when investigating any technical issue, including test failures, bugs, unexpected behavior, performance problems, or build failures, especially under time pressure or after failed fixes.
190 other projects use a version of this, 86 of them edited.
Adopted by
Most recently taken up by
- DemonDamon/AgenticXedited, 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-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 · 86
- obra/superpowers★ 314k11% same
- openai/plugins★ 7.8k11% same
- farm-fe/farm★ 5.6k10% same
- microsoft/FluidFramework★ 4.9k10% same
- lingyired/status-trio★ 1.8k11% same
- pcvelz/superpowers★ 1.3k11% same
- DemonDamon/AgenticX★ 1k10% same
- coco-research/coco★ 79710% same
- pedronauck/skills★ 64911% same
- involvex/youtube-music-cli★ 47710% same
76 more not listed
Wrote their own version · 104
- 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
- UniClipboard/UniClipboard★ 2ksame name
- GanyuanRan/Aegis★ 1.4ksame name
94 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 repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- writing-skillsSkill
- brainstorm-featureSkill
- context-handoffSkill
- document-wikiSkill
- estimate-featureSkill
- implement-taskSkill
- lean-auditSkill
- plan-featureSkill
- read-codebase-contextSkill
- review-and-verifySkill
- setup-codebaseSkill
- setup-openezSkill
- using-devkitSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 7 are distinctive, and 3 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
If you have not completed Phase 1, you cannot propose fixes.
- Distinctive: line 19
Use for any technical issue: test failures, bugs, unexpected behavior, performance problems, build failures, integration issues.
- Very specific: line 29
When implement-task calls this skill to repair an active task, keep that task's scope and approval.
- Distinctive: line 38
Before attempting any fix:
- Very specific: line 75
Classify the bug: before any fix or verify plan, with the Bounded and Architectural labels from brainstorm-feature, or Bug question for an …
- Distinctive: line 94
When in doubt take the heavier class.
- Distinctive: line 99
Write the verify plan: before any regression check or production fix: the checkable claims that prove the bug is fixed.
- Very specific: line 136
Do not commit (using-devkit).
- Distinctive: line 153
All of these mean: stop. Return to Phase 1: If 3+ fixes have failed, question the architecture: the pattern is wrong, not the …
- Distinctive: line 158
If investigation shows the issue is truly environmental, timing-dependent, or external: document what you investigated and the evidence for …
“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
Iron Law
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRSTIf you have not completed Phase 1, you cannot propose fixes. Symptom fixes are failure.
When to use
Use for any technical issue: test failures, bugs, unexpected behavior, performance problems, build failures, integration issues.
Especially when: under time pressure (emergencies make guessing tempting), "just one quick fix" seems obvious, a previous fix did not work, or you do not fully understand the issue. Do not skip when the issue seems simple (simple bugs have root causes too) or you are in a hurry (rushing guarantees rework).
The four phases
When implement-task calls this skill to repair an active task, keep that task's
scope and approval. Investigate and verify the fix, then return evidence and
blockers to the caller; do not run final review, archive the parent change, or
mark its task done here. A fix needing new behavior or scope returns that
decision to the caller's approval flow. Standalone debugging runs the full route.
Complete each phase before the next.
Phase 1: Root cause investigation
Before attempting any fix:
- Read error messages carefully — read stack traces completely; note line numbers, file paths, and error codes.
- Reproduce consistently — what are the exact steps? If you cannot reproduce, gather more data; do not guess.
- Check recent changes —
git diff, recent commits, new dependencies, config and environment differences. Usereview-and-verify's### Trace changed callersto list changed symbols and trace callers and string/route/config variants. Name the traced callers so Phase 4 can verify each one. - Gather evidence in multi-component systems — add diagnostic logging at each component boundary (what enters and exits each layer) and run once to see where it breaks. Treat added logs as temporary: remove them before reporting a Bug question result or entering Phase 4, and leave none in the final diff unless the approved fix requires it.
- Trace data flow — where does the bad value originate, and what called this with it? Keep tracing up to the source and fix there, not at the symptom.
Phase 2: Pattern analysis
Find working similar code in the same codebase; read any reference implementation completely; list every difference between working and broken, however small; and identify the settings, config, environment, or assumptions it needs.
Phase 3: Hypothesis and testing
- Form a single hypothesis — "I think X is the root cause because Y".
- Test minimally — the smallest possible change, one variable at a time. Revert experimental changes after observing, so Phase 4 starts from the failing baseline.
- Verify before continuing — worked → Phase 4; not → a new hypothesis. Do not stack fixes.
- When you do not know, say "I don't understand X"; ask or research.
Phase 4: Implementation
Classify the bug before any fix or verify plan, with the
BoundedandArchitecturallabels frombrainstorm-feature, orBug questionfor an investigation-only request:- Bug question — the real question is "is this a bug?" or "what is
happening?", not "fix it". The output is an answer with reproduction
evidence; write no production code. Report the evidence and stop. If a real
fix is needed, re-classify as Bounded or Architectural first. It is distinct
from
brainstorm-feature's feasibilitySpike. - Bounded — the fix stays within an existing flow and changes no shared interface, contract, or component boundary. File count alone does not classify the bug. Go to step 2.
- Architectural — the fix changes a shared interface, contract, or
component boundary, or spans components. Stop fixing and call
brainstorm-feature(it writesdesign.md, andplan-featurewritestasks.md, for one joint approval) before any fix. A verify plan cannot cover regression surface that was never designed. For a repair inside an active implementation, return this diagnosis to the caller; a fix already covered by that plan's approved scope and verification proceeds within it.
When in doubt take the heavier class. Hidden complexity found mid-fix moves the bug up; nothing moves it down.
- Bug question — the real question is "is this a bug?" or "what is
happening?", not "fix it". The output is an answer with reproduction
evidence; write no production code. Report the evidence and stop. If a real
fix is needed, re-classify as Bounded or Architectural first. It is distinct
from
- Establish expected behavior from source, tests, and wiki pages. If they do
not establish it, stop and call
brainstorm-featurefor approval before changing behavior. - Write the verify plan before any regression check or production fix: the
checkable claims that prove the bug is fixed. The original symptom no longer
occurs (Phase 1 steps) and a repeatable check of it passes; traced callers and
relevant existing tests do not regress (name them; an uncovered caller is a
verification limit); any contract the fix touches still holds (state it and
how it is checked). This list defines "fixed": step 9 checks the diff against
it, and
review-and-verify's "Bug fixed" row requires it. Without it, "fixed" is a feeling, not a fact; do not proceed to step 4. - Choose a repeatable regression check that reproduces the symptom: an existing test runner when meaningful, else an available CLI, self-check, or recorded manual procedure with an expected result. Set up no test runner solely for this fix.
- Verify the check fails without the fix.
- Apply the smallest root-cause fix, reusing the verified working pattern from Phase 2. A symptom patch is not minimal if sibling callers stay broken.
- Verify the same check passes, then run relevant existing tests for
regressions; do not invent a suite.
review-and-verifyruns the repository-mandated full commands. - For a repair handoff, return the verify-plan result, reproduction/regression
evidence, affected callers, and any documentation or scope issue to
implement-task, and skip step 9. - Otherwise, when the delta condition in
using-devkit's## Change lifecycleholds, writedelta.mdin a change folder before review per../brainstorm-feature/references/delta-format.md(shape, ownership,Issue:, self-review). If the target page still uses## Business rules, convert it withdocument-wiki's## Convert a legacy target pagefirst, and stop if it is markedverification limit. After the code checks pass, calldocument-wiki's## Task updateswhen the existing wiki needs an in-scope update or delta merge (skip without a wiki; leave a page that already describes the intended behavior alone). Then call the available Skill entry whose local name isreview-and-verifyto review the diff against the step 3 verify plan. Missing task coverage or a page that contradicts the fix stays a blocker until refreshed and verified. If the review returnsStatus: fail, applyimplement-task's## After implementationstep 3; a blocker whose fix changes a shared interface, contract, or component boundary reclassifies the bug as Architectural (step 1). - Do not commit (
using-devkit). When debugging stops before review (a Bug question result, an Architectural handoff, or missing expected behavior), end with theNext:block fromusing-devkit.
Red flags — stop and return to Phase 1
- "Quick fix for now, investigate later" / "Just try changing X and see"
- "Add multiple changes, run tests" / "It's probably X, let me fix that"
- "I don't fully understand but this might work"
- "I'll know it's fixed when I see it" (no written verify plan)
- "It's just a bug, no need to classify" (skipping Bug question/Bounded/Architectural)
- "The fix touches one file, so it's bounded" (interface and contract impact is the test, not file count)
- Proposing solutions before tracing data flow
- "One more fix attempt" (when already tried 2+)
- Each fix reveals a new problem in a different place
All of these mean: stop. Return to Phase 1. If 3+ fixes have failed, question the architecture: the pattern is wrong, not the implementation.
When process reveals "no root cause"
If investigation shows the issue is truly environmental, timing-dependent, or
external: document what you investigated and the evidence for that conclusion
(for a Bug question, report it and stop without changing production behavior). If
handling such as a retry, timeout, error message, or monitoring change is needed,
return to Phase 4: classify it, establish expected behavior, and write the verify
plan first, because these changes alter observable behavior; if sources do not
establish the intended behavior, call brainstorm-feature and wait for approval.
But 95% of "no root cause" cases are incomplete investigation.
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.

