systematic-debugging
Skill3 starsChanged 38 days agoApache-2.0View on GitHub
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes — walks through root-cause investigation, pattern comparison, and a single tested hypothesis before any code changes. Skip when there's no failure to explain yet (greenfield feature work) — use algorithm-pseudocode-design or system-architecture-design instead.
190 other projects use a version of this, 1 of them edited.
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 · 1
- danielcherubini/skills★ 1410% same
Wrote their own version · 189
- 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
179 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 repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- algorithm-pseudocode-designSkill
- brainstormingSkill
- openapi-documentationSkill
- pmSkill
- requirements-specificationSkill
- system-architecture-designSkill
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 24
Especially: when under time pressure, when "just one quick change" seems obvious, or when a previous fix attempt didn't work — those are …
- Distinctive: line 33
Before touching any code:
- Distinctive: line 52
If a working example exists (a similar endpoint, a sibling test, a reference implementation), read it completely before comparing — …
- Distinctive: line 57
Read it in full, not just the parts that look relevant.
- Distinctive: line 73
If you genuinely don't understand a piece of the system, say so and investigate further rather than proceeding on a guess.
- Distinctive: line 78
Write a failing test that reproduces the bug, if the codebase has a test framework in reach.
- Distinctive: line 84
Verify: the new test passes, no other tests regressed, the original symptom is gone — verify with fresh evidence, not a stale earlier test …
“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
The Iron Law
NO FIX WITHOUT ROOT-CAUSE INVESTIGATION FIRSTA fix proposed before Phase 1 is complete is a guess, not a fix. Guesses that happen to work are indistinguishable from guesses that don't until the bug resurfaces somewhere else.
When to use
Any technical issue: a failing test, a production bug, unexpected output, a performance regression, a build failure, an integration that doesn't behave as documented.
Especially when under time pressure, when "just one quick change" seems obvious, or when a previous fix attempt didn't work — those are exactly the conditions where guessing feels fastest and costs the most.
Don't skip because the bug looks simple. Simple bugs have root causes too, and finding one usually takes minutes, not hours.
Phase 1: Root-cause investigation
Before touching any code:
- Read the actual error. Full stack trace, not the first line. Note exact file paths, line numbers, and error codes — they often name the fix directly.
- Reproduce it. Confirm exact, repeatable steps. If it won't reproduce reliably, that's information — gather more data (logging, a tighter repro case) rather than guessing at a fix for a moving target.
- Check recent changes.
git log/git diffon the affected paths, recent dependency bumps, config or environment drift. Most bugs are introduced by something that changed, not something that was always broken. - Trace the data flow backward. Find where the bad value or bad state actually originates, not just where it's first observed. Follow it through each call/component boundary until you reach the source, and fix there — not at the symptom.
Phase 2: Pattern analysis
If a working example exists (a similar endpoint, a sibling test, a reference implementation), read it completely before comparing — skimming guarantees you miss the difference that matters:
- Locate the closest working analog in the same codebase.
- Read it in full, not just the parts that look relevant.
- List every difference from the broken code, however small. Don't discard one because "that can't matter" — verify it doesn't.
- Note what the working version depends on (config, environment, call order) that the broken version might be missing.
Phase 3: Single hypothesis, minimal test
- State the hypothesis explicitly: "X is the root cause because Y." Vague hypotheses ("something about the config") aren't testable — sharpen them until they are.
- Make the smallest possible change that tests it — one variable, not a bundle of plausible fixes.
- Confirmed → proceed to Phase 4. Not confirmed → form a new hypothesis and repeat this phase. Don't layer a second fix on top of an unconfirmed first one.
- If you genuinely don't understand a piece of the system, say so and investigate further rather than proceeding on a guess.
Phase 4: Implementation
- Write a failing test that reproduces the bug, if the codebase has a test framework in reach. If a proper test isn't practical, a minimal repro script still counts; either way, confirm it fails before touching the fix.
- Apply one fix addressing the confirmed root cause. No bundled cleanup, no "while I'm here" changes — those hide whether the fix actually worked.
- Verify: the new test passes, no other tests regressed, the original symptom is gone — verify with fresh evidence, not a stale earlier test run, before claiming the bug is fixed.
- If the fix doesn't work, stop and count attempts. Fewer than three → return to Phase 1 with what you just learned. Three or more failed fixes on the same bug is not bad luck — it's a signal to stop fixing and question the architecture: is the pattern you're patching around fundamentally sound, or is each fix surfacing new coupling/shared state somewhere else? Raise that with the user before attempting a fourth fix.
Red flags — stop and return to Phase 1
- "Quick fix now, investigate properly later"
- "Let me just try changing X and see"
- "I don't fully understand this but it might work"
- Proposing a fix before tracing the data flow to its source
- A third attempt at fixing the same symptom
When investigation genuinely finds no root cause
Rare, but real for timing-dependent or external failures. Only claim this after actually completing Phases 1–3 — most "no root cause" conclusions are an incomplete investigation, not an environmental bug. If it really is environmental: document what was checked, implement the appropriate handling (retry, timeout, explicit error), and add logging so the next occurrence isn't starting from zero.
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.

