systematic-debugging
Skill9 starsChanged 3 months agoMITView on GitHub
Structured root-cause investigation when explicitly requested, or as an internal reference in Argos/Minos authorized repair loops. Routine diagnosis stays native.
191 other projects use a version of this, 117 of them edited.
Adopted by
Most recently taken up by
- ctaxnagomi/agent-kd-skilltheir own version, first seen Nov 29, 2026
- hybridlabor-api/aosedited, first seen Nov 29, 2026
- autohandai/community-skillsedited, first seen Nov 29, 2026
- MorningStar0709/trae-agent-enhancementstheir own version, first seen Nov 29, 2026
- genfeedai/genfeed.aiedited, first seen Nov 29, 2026
- Innei/artideckedited, first seen Nov 29, 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 21 projects that use this
SethGammonSkillascii-diagram
Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed by math, not token prediction. Includes post-render verification.
Also in 4 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
- +4 more from mjunaidca
Other versions191 projects use a version of this.
Word for word · 0
None found.
Edited · 117
- obra/superpowers★ 314k53% same
- NousResearch/hermes-agent★ 267k18% same
- mdiri-ai/SoduWork★ 9.1k52% same
- openai/plugins★ 8.4k53% same
- farm-fe/farm★ 5.6k52% same
- microsoft/FluidFramework★ 5k49% same
- heyitsnoah/claudesidian★ 2.6k33% same
- lingyired/status-trio★ 2k53% same
- pcvelz/superpowers★ 1.3k53% same
- math-inc/OpenGauss★ 1.3k28% same
107 more not listed
Wrote their own version · 74
- open-metadata/OpenMetadata★ 16ksame name
- jnMetaCode/superpowers-zh★ 8.6ksame 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
- GanyuanRan/Aegis★ 1.5ksame name
- SethGammon/Citadel★ 927same name
- KbWen/agentic-os★ 245same name
- linxuan-sys/opencode-skills-chinese★ 200same name
64 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 repository110 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/orchestrator/mcp-server/AGENTS.mdAGENTS.md
- skills/supabase-postgres-best-practices/AGENTS.mdAGENTS.md
- skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- agent-md-refactorSkill
- agent-team-codexSkill
- agent-teamSkill
- antigravity-mnemoSkill
- antigravitySkill
- api-handoffSkill
- api-testerSkill
- argosSkill
- atlasSkill
- auto-continue-loopSkill
- autoresearchSkill
- biz-strategySkill
- ceoSkill
- clioSkill
- code-reviewerSkill
- codex-mnemoSkill
- codexSkill
- command-creatorSkill
- commit-workSkill
- consistency-auditSkill
- crafting-effective-readmesSkill
- daily-meeting-updateSkill
- database-schema-designerSkill
- datadog-cliSkill
- data-visualizationSkill
- dependency-updaterSkill
- deprecation-and-migrationSkill
- design-planSkill
- design-system-starterSkill
- devin-mnemoSkill
- diagram-designSkill
- docker-db-backupSkill
- docker-deploySkill
- documentation-and-adrsSkill
- docxSkill
- domain-dictionarySkill
- domain-name-brainstormerSkill
- dotnet-coding-standardsSkill
- draw-ioSkill
- estimateSkill
- excalidrawSkill
- excel2mdSkill
- explainSkill
- find-skillsSkill
- flow-verifierSkill
- frontend-designSkill
- fullstack-coding-standardsSkill
- game-changing-featuresSkill
- grok-mnemoSkill
- gs-certificationSkill
- health-dataSkill
- hestiaSkill
- humanizerSkill
- irisSkill
- jiraSkill
- ko-en-translatorSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
25 rules. 2 are common, 21 are distinctive, and 2 are very specific to this project.
2
Common
Most of the 178 edited versions we read keep these.
21
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
If existing evidence already establishes the cause, fix it directly without repeating the investigation.
- Distinctive: line 33
If the attempt fails, preserve its evidence, restore only that attempt's known changes when needed, and return to the unanswered question …
- Very specific: line 38
Put issue/AC, reproduction, contract vs actual, hypothesis/evidence, change, verification, remaining budget in the caller's existing repair …
- Distinctive: line 41
Use the phases below only as far as the remaining uncertainty requires.
- Distinctive: line 62
Use the phases to reduce uncertainty.
- Distinctive: line 70
Don't skip past errors or warnings
- Distinctive: line 72
Read stack traces completely
- Common: line 79
If not reproducible → gather more data, don't guess
- Very specific: line 120
Read root-cause-tracing.md under module_root for the complete backward tracing technique.
- Distinctive: line 125
Keep tracing up until you find the source
- Distinctive: line 137
Read the reference implementation and callers needed to understand the affected contract.
- Distinctive: line 143
Don't assume "that can't matter"
- Distinctive: line 162
Don't fix multiple things at once
- Distinctive: line 167
DON'T add more fixes on top
- Distinctive: line 171
Don't pretend to know
- Distinctive: line 183
MUST have before fixing
- Distinctive: line 184
Use the project's existing test framework or a reproducible check for the original symptom.
- Distinctive: line 197
Run the original reproduction against the changed code and verify the expected response, persisted state, and relevant side effects.
- Distinctive: line 199
Run the project's required tests/build plus regression checks for the affected behavior.
- Distinctive: line 214
Follow the current task's retry/time budget.
- Common: line 220
If you catch yourself thinking:
- Distinctive: line 244
When you see these: STOP. Return to Phase 1.
- Distinctive: line 257
If systematic investigation reveals issue is truly environmental, timing-dependent, or external:
- Distinctive: line 260
Document what you investigated
- Distinctive: line 262
Add monitoring/logging for future investigation
“Common” is measured: kept by at least 6 in 10 of the 178 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
Invocation and Resource Paths
This module is source-only by default. A user request for this workflow is enough;
do not assume its slash command is registered. Resolve its exact SKILL.md from
the project, the current runtime's active skill root, then the matching
SKILLS-CATALOG.md row. module_root is the directory containing that file;
read supporting documents relative to it, regardless of the project working directory.
Harness Integration
Argos and Minos read this module when an observed failure enters their authorized repair loop. They retain ownership of scope, issue IDs, reports, retry budgets, and final grades. Reading this module does not start another loop, request TDD, or grant permission to edit. Inspection-only requests remain read-only; a report-only command only displays the existing report.
- Reuse the recorded failing check when its code, input, and environment still match. For an exploratory issue without a test, identify a repeatable observation or focused check first.
- Separate the current requirement/AC from the actual response or state. An error label is a clue, not a root cause: a timeout may be a server failure rather than a reason to add a wait.
- Record one testable cause and the observation that supports or would disprove it before editing. If existing evidence already establishes the cause, fix it directly without repeating the investigation.
- Make the smallest authorized change, then rerun the original check and affected regression checks. A source-code edit alone or green tests that never covered the reported issue do not close it.
- If the attempt fails, preserve its evidence, restore only that attempt's known changes when needed, and return to the unanswered question within the caller's remaining budget. Do not reset counts by changing workers, sessions, issue labels, or entering this module. Repeated identical output without new evidence is a blocker to report, not a reason for another speculative patch.
Put issue/AC, reproduction, contract vs actual, hypothesis/evidence, change, verification,
remaining budget in the caller's existing repair history. Do not create a second report or ledger.
Missing prerequisites are NOT RUN/UNVERIFIED; an unresolved issue retains its actual severity.
Use the phases below only as far as the remaining uncertainty requires.
Overview
Random fixes waste time and create new bugs. Quick patches mask underlying issues.
Core principle: Investigate the cause before choosing a fix, and distinguish evidence-backed diagnosis from temporary symptom mitigation.
The Iron Law
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRSTGather enough evidence for a testable hypothesis before changing behavior. During an incident, an authorized rollback or containment may precede full diagnosis; record it as mitigation and preserve the evidence needed to investigate the cause.
The Four Phases
Use the phases to reduce uncertainty. Reuse evidence already established for this code and environment; a clear local failure does not require a multi-component investigation.
Phase 1: Root Cause Investigation
BEFORE attempting ANY fix:
- Read Error Messages Carefully
- Don't skip past errors or warnings
- They often contain the exact solution
- Read stack traces completely
- Note line numbers, file paths, error codes
- Reproduce Consistently
- Can you trigger it reliably?
- What are the exact steps?
- Does it happen every time?
- If not reproducible → gather more data, don't guess
- Check Recent Changes
- What changed that could cause this?
- Git diff, recent commits
- New dependencies, config changes
- Environmental differences
Gather Evidence in Multi-Component Systems
WHEN system has multiple components (CI → build → signing, API → service → database):
When existing evidence does not locate the failing boundary, add focused instrumentation:
For EACH component boundary: - Record non-sensitive input/output shapes or redacted diagnostic values - Verify environment/config propagation - Check state at each layer Run once to gather evidence showing WHERE it breaks THEN analyze evidence to identify failing component THEN investigate that specific componentExample (multi-layer system):
# Run the same presence check at the workflow and build-script boundaries. # Report configuration presence without printing its value or the full environment. if [ -n "${IDENTITY:-}" ]; then echo "IDENTITY: SET" else echo "IDENTITY: UNSET" fiThis reveals: Which layer fails (secrets → workflow ✓, workflow → build ✗)
Trace Data Flow
WHEN error is deep in call stack:
Read root-cause-tracing.md under
module_rootfor the complete backward tracing technique.Quick version:
- Where does bad value originate?
- What called this with bad value?
- Keep tracing up until you find the source
- Fix at source, not at symptom
Phase 2: Pattern Analysis
Find the pattern before fixing:
- Find Working Examples
- Locate similar working code in same codebase
- What works that's similar to what's broken?
- Compare Against References
- Read the reference implementation and callers needed to understand the affected contract.
- Expand the search only when a concrete dependency or unanswered question requires it.
- Identify Differences
- What's different between working and broken?
- List every difference, however small
- Don't assume "that can't matter"
- Understand Dependencies
- What other components does this need?
- What settings, config, environment?
- What assumptions does it make?
Phase 3: Hypothesis and Testing
Scientific method:
- Form Single Hypothesis
- State clearly: "I think X is the root cause because Y"
- Write it down
- Be specific, not vague
- Test Minimally
- Make the SMALLEST possible change to test hypothesis
- One variable at a time
- Don't fix multiple things at once
- Verify Before Continuing
- Did it work? Yes → Phase 4
- Didn't work? Form NEW hypothesis
- DON'T add more fixes on top
- When You Don't Know
- Say "I don't understand X"
- Don't pretend to know
- Ask for help
- Research more
Phase 4: Implementation
Fix the root cause, not the symptom:
- Create Failing Test Case
- Simplest possible reproduction
- Automated test if possible
- One-off test script if no framework
- MUST have before fixing
- Use the project's existing test framework or a reproducible check for the original symptom.
- Requesting this debugging workflow does not also request strict TDD. Only if the user explicitly
requests TDD, resolve
test-driven-developmentby the same project → active root → exact catalog path order above and read itsSKILL.mddirectly. If unavailable, report that guidance asNOT RUNand continue the authorized reproduction and verification with project-native tools.
- Implement Single Fix
- Address the root cause identified
- ONE change at a time
- No "while I'm here" improvements
- No bundled refactoring
- Verify Fix
- Run the original reproduction against the changed code and verify the expected response, persisted state, and relevant side effects; a changed file is not proof that the symptom is fixed.
- Run the project's required tests/build plus regression checks for the affected behavior. Record the command, target revision or working-tree state, environment, exit code, and result.
- Reuse an existing result only when code, environment, and checked conditions still match; rerun affected checks after a change or when a specific unresolved doubt requires it.
- Report
NOT RUNwith the missing prerequisite when execution is unavailable. Distinguish passing checks, failing checks, and unverified requirements before claiming completion.
- If Fix Doesn't Work
- Record the hypothesis, change, and observed result before choosing another experiment.
- Restore only this experiment's changes when the baseline is known; preserve existing user changes and other work. Do not reset files or discard a branch to restart the process.
- Return to the earliest unanswered question. A missing prerequisite, wrong assumption, implementation error, test defect, and architecture problem need different responses.
- Repeated failure warrants reassessment; the number of attempts alone does not diagnose the architecture. Shared-state coupling or incompatible contracts must be demonstrated.
- Follow the current task's retry/time budget. Continue an authorized, evidence-backed fix; report the blocker and next discriminating check if further attempts only repeat guesses. Discuss scope-changing architectural work before undertaking it.
Red Flags - STOP and Follow Process
If you catch yourself thinking:
- "Quick fix for now, investigate later"
- "Just try changing X and see if it works"
- "Add multiple changes, run tests"
- "Skip the test, I'll manually verify"
- "It's probably X, let me fix that"
- "I don't fully understand but this might work"
- "Pattern says X but I'll adapt it differently"
- "Here are the main problems: [lists fixes without investigation]"
- Proposing solutions before tracing data flow
- "One more fix attempt" without a new observation or testable hypothesis
- Each fix reveals new problem in different place
ALL of these mean: STOP. Return to Phase 1.
your human partner's Signals You're Doing It Wrong
Watch for these redirections:
- "Is that not happening?" - You assumed without verifying
- "Will it show us...?" - You should have added evidence gathering
- "Stop guessing" - You're proposing fixes without understanding
- "Ultrathink this" - Question fundamentals, not just symptoms
- "We're stuck?" (frustrated) - Your approach isn't working
When you see these: STOP. Return to Phase 1.
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"
If systematic investigation reveals issue is truly environmental, timing-dependent, or external:
- You've completed the process
- Document what you investigated
- Implement appropriate handling (retry, timeout, error message)
- Add monitoring/logging for future investigation
State the unresolved alternatives and evidence limits. An exhausted investigation is not proof of an external cause, and a successful mitigation is not proof of a root-cause fix.
Supporting Techniques
These techniques are part of systematic debugging and available in this directory:
- root-cause-tracing.md - Trace bugs backward through call stack to find original trigger
- defense-in-depth.md - Add validation at multiple layers after finding root cause
- condition-based-waiting.md - Replace arbitrary timeouts with condition polling
Strict TDD is an optional, explicitly requested source module (Phase 4, Step 1). Completion evidence is owned by Phase 4, Step 3 above; no external verification skill is required.
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.

