debug
Skill0 starsChanged 4 months agoMITView on GitHub
Systematic debugging with root cause discipline. Runs the 4-phase investigate-analyze-hypothesize-implement methodology (vendored from Superpowers). Iron law: no fixes without root cause investigation.
192 other projects use a version of this, 7 of them edited.
Adopted by
Most recently taken up by
- PeanutGT/NutsSkillstheir own version, first seen Nov 8, 2026
- jskswamy/skillstheir own version, first seen Nov 8, 2026
- Firzus/agent-skillstheir own version, first seen Nov 8, 2026
- domengabrovsek/agent-configtheir own version, first seen Nov 8, 2026
- domengabrovsek/claudetheir own version, first seen Nov 8, 2026
- microsoft/veronatheir own version, first seen Nov 8, 2026
Used with
Projects with it also use add-discord, add-slack 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.
MicrosoftSkilladd-discord
Add Discord bot channel integration via Chat SDK.
Also in 11 projects that use this
MicrosoftSkilladd-slack
Add Slack channel integration via Chat SDK.
Also in 11 projects that use this
- +10 more from microsoft
Other versions192 projects use a version of this.
Word for word · 0
None found.
Edited · 7
- jonathanmalkin/jules★ 6579% same
- ariadoss/superskills★ 1284% same
- Guild-Agents/guild★ 447% same
- nicodiansk/turbocharge★ 369% same
- nicodiansk/turboflow★ 369% same
- Pharaoh-so/pharaoh-mcp★ 225% same
- azmainadel/devloop-skills★ 182% same
Wrote their own version · 185
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- anthropics/knowledge-work-plugins★ 35ksame name
- gavrielc/nanoclaw★ 31ksame name
- nanocoai/nanoclaw★ 31ksame name
- qwibitai/nanoclaw★ 31ksame name
- openai/symphony★ 27ksame name
- FalkorDB/FalkorDB★ 10ksame name
- NVIDIA/TensorRT-Model-Optimizer★ 5.6ksame name
- NVIDIA/Model-Optimizer★ 5.6ksame name
175 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
- scripts/AGENTS.mdAGENTS.md
- src/AGENTS.mdAGENTS.md
- .cursor/rules/publish-version-bump.mdcCursor rule
- .cursor/rules/release-version-sync.mdcCursor rule
- antigravitySkill
- auditSkill
- autoplanSkill
- bootstrapSkill
- brainstormSkill
- browseSkill
- ceo-reviewSkill
- clarifySkill
- cleanupSkill
- code-reviewSkill
- codexSkill
- component-inventorySkill
- context-restoreSkill
- context-saveSkill
- critiqueSkill
- cronSkill
- csoSkill
- cursorSkill
- deepen-planSkill
- design-reviewSkill
- devex-reviewSkill
- document-reviewSkill
- eng-reviewSkill
- executing-plansSkill
- fableSkill
- finishSkill
- frontend-designSkill
- grill-meSkill
- grokSkill
- implementSkill
- learnSkill
- office-hoursSkill
- onboardSkill
- plan-design-reviewSkill
- planSkill
- polishSkill
- qaSkill
- reviewSkill
- shipfastSkill
- shipthoroughSkill
- simplifySkill
- specSkill
- statusSkill
- subagent-driven-developmentSkill
- test-driven-developmentSkill
- ui-auditSkill
- ui-ux-pro-maxSkill
- using-git-worktreesSkill
- verification-before-completionSkill
- writing-plansSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
31 rules. 0 are common, 26 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
26
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
If you are running this skill in Codex, read ../references/codex-compatibility.md before following host-specific tool instructions.
- Distinctive: line 44
No fixes without root cause investigation: Do not propose a fix until you understand why the bug exists.
- Very specific: line 58
Search docs/solutions/ for prior art.
- Distinctive: line 63
If a matching solution doc exists, read it first.
- Very specific: line 64
Freshness check: If the solution doc has frontmatter with date and ttl_days, and today exceeds date + ttl_days, note: "This solution doc is …
- Distinctive: line 80
If the fix was non-obvious (took more than 15 minutes to diagnose, or the root cause was surprising), suggest:
- Distinctive: line 109
Core principle: always find the root cause before attempting fixes.
- Distinctive: line 117
If you haven't completed Phase 1, you cannot propose fixes.
- Distinctive: line 121
Use for any technical issue:
- Distinctive: line 150
Don't skip past errors or warnings
- Distinctive: line 152
Read stack traces completely
- Distinctive: line 159
If not reproducible → gather more data, don't guess
- Distinctive: line 214
Keep tracing up until you find the source
- Distinctive: line 226
If implementing pattern, read reference implementation completely
- Distinctive: line 227
Don't skim - read every line
- Distinctive: line 233
Don't assume "that can't matter"
- Distinctive: line 252
Don't fix multiple things at once
- Distinctive: line 257
Don't add more fixes on top
- Distinctive: line 261
Don't pretend to know
- Very specific: line 274
Use the test-driven-development skill for writing proper failing tests
- Distinctive: line 284
No other tests broken?
- Distinctive: line 290
If < 3: Return to Phase 1, re-analyze with new information
- Distinctive: line 292
Don't attempt Fix #4 without architectural discussion
- Distinctive: line 304
Should we refactor architecture vs.
- Distinctive: line 312
If you catch yourself thinking:
- Distinctive: line 338
When you see these: stop and return to Phase 1.
- Distinctive: line 360
If systematic investigation reveals issue is truly environmental, timing-dependent, or external:
- Distinctive: line 363
Document what you investigated
- Distinctive: line 365
Add monitoring/logging for future investigation
- Very specific: line 374
defense-in-depth.md: - Add validation at multiple layers after finding root cause - Distinctive: line 379
verification-before-completion: - Verify fix worked before claiming success
“Common” is measured: kept by at least 6 in 10 of the 175 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
Host Compatibility
If you are running this skill in Codex, read ../references/codex-compatibility.md before following host-specific tool instructions. Claude Code should continue to use the Claude-specific tools and command wrappers described here.
Soloship Debug
Your job is to find and fix bugs through systematic investigation, not guessing.
Model posture (see .claude/rules/model-mode.md)
Standard posture (Opus/Sonnet/Codex — the default): run the methodology exactly as written, every phase in order.
Fable posture (model id contains fable/mythos): the gates below are
binding; the rest is method guidance you may adapt.
Gates (binding): the Iron Law — no fix proposed before the root cause is
understood and stated in plain language · the Before-Starting
docs/solutions/ search · demonstrated reproduction BEFORE the fix and a
re-run showing the bug gone AFTER (Phase 4's failing-test-then-verify; an
automated regression test where a framework exists) · existing tests still
green · the 3-failed-fixes stop — question the architecture WITH the user
before attempting a fourth · the After-Fixing /learn suggestion for
non-obvious fixes · every Verification checklist box.
Choreography (adaptable in Fable posture): the strict Phase 1→4 sequencing, the one-hypothesis-at-a-time and one-variable-at-a-time pacing, the per-phase sub-checklists, and the Quick Reference format. Investigate in whatever order the evidence pulls you — but the outcomes those steps protect never move: understanding first, reproduction first, fix second, verification observed. Renaming a guess an investigation is the misread this skill exists to stop, in either posture.
The Iron Law
No fixes without root cause investigation. Do not propose a fix until you understand why the bug exists. "It works if I change this" is not a root cause.
Methodology overview
Apply the full 4-phase methodology below (Phase 1 through Phase 4):
- Investigate — reproduce the bug, gather evidence
- Analyze — form hypotheses about root cause
- Hypothesize — test hypotheses with targeted experiments
- Implement — fix based on confirmed root cause
Before Starting
Search docs/solutions/ for prior art. Grep for:
- The error message
- The component/file name
- The symptom description
If a matching solution doc exists, read it first. The fix may already be documented.
Freshness check: If the solution doc has frontmatter with date and ttl_days,
and today exceeds date + ttl_days, note: "This solution doc is N days old — the
codebase may have changed since it was written. Verify the fix still applies."
Common misreads
- "I think I see the fix already" → seeing a potential fix is not the same as understanding the root cause. The obvious fix often masks the real bug and introduces a new one.
- "The error message tells me exactly what's wrong" → error messages describe symptoms, not causes. A
NullPointerExceptiontells you what happened, not why the value was null. - "Let me just try this real quick" → "quick tries" compound. Three failed guesses waste more time than one systematic investigation.
- "This is a simple bug, I don't need a process" → simple-looking bugs that were easy to find wouldn't have required calling
/debug. If you're here, it's not simple. - "I already searched solutions, nothing matched" → search for symptoms and component names and error codes. Prior art often uses different words for the same problem.
After Fixing
If the fix was non-obvious (took more than 15 minutes to diagnose, or the root cause was surprising), suggest:
"This fix was non-obvious. Run
/learnto capture it as a solution doc so future sessions don't have to re-investigate."
Verification
The debug is not complete until all of these are true:
- Root cause identified and stated in plain language (not just "changed X to Y")
- Bug is reproducible before fix (you demonstrated the failure)
- Fix applied and bug no longer reproduces
- Tests pass (existing tests still green, regression test added if applicable)
docs/solutions/searched before investigation began
Systematic Debugging Methodology
<!-- Vendored from superpowers v6.0.3 (Jesse Vincent). See skills/vendored/superpowers/LICENSE. Tone softened for Claude 5 (2026-07-28): register calmed, gate semantics unchanged; deliberately diverges from upstream wording (see Superpowers issue #1878). Soloship keeps its scrubbed sibling-skill refs (test-driven-development, verification-before-completion — upstream still namespaces these `superpowers:`). Sidecar references (root-cause-tracing.md, defense-in-depth.md, condition-based-waiting.md + .ts example) now vendored alongside, fixing previously-dangling links. -->Systematic Debugging
Overview
Random fixes waste time and create new bugs. Quick patches mask underlying issues.
Core principle: always find the root cause before attempting fixes. A symptom fix is not a fix.
The process applies in spirit, not just letter — renaming a guess does not make it an investigation.
The Iron Law
The rule: no fixes without root cause investigation first.
If you haven't completed Phase 1, you cannot propose fixes.
When to Use
Use for any technical issue:
- Test failures
- Bugs in production
- Unexpected behavior
- Performance problems
- Build failures
- Integration issues
Use this especially when:
- Under time pressure (emergencies make guessing tempting)
- "Just one quick fix" seems obvious
- You've already tried multiple fixes
- Previous fix didn't work
- You don't fully understand the issue
Don't skip when:
- Issue seems simple (simple bugs have root causes too)
- You're in a hurry (rushing guarantees rework)
- Manager wants it fixed now (systematic is faster than thrashing)
The Four Phases
Complete each phase before proceeding to the next.
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 the system has multiple components (CI → build → signing, API → service → database):
Before proposing fixes, add diagnostic instrumentation:
For each component boundary: - Log what data enters component - Log what data exits component - 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):
# Layer 1: Workflow echo "=== Secrets available in workflow: ===" echo "IDENTITY: ${IDENTITY:+SET}${IDENTITY:-UNSET}" # Layer 2: Build script echo "=== Env vars in build script: ===" env | grep IDENTITY || echo "IDENTITY not in environment" # Layer 3: Signing script echo "=== Keychain state: ===" security list-keychains security find-identity -v # Layer 4: Actual signing codesign --sign "$IDENTITY" --verbose=4 "$APP"This reveals: Which layer fails (secrets → workflow ✓, workflow → build ✗)
Trace Data Flow
When the error is deep in the call stack:
See
root-cause-tracing.mdin this directory for 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
- If implementing pattern, read reference implementation completely
- Don't skim - read every line
- Understand the pattern fully before applying
- 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 a 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
- Required before fixing
- Use the
test-driven-developmentskill for writing proper failing tests
- Implement Single Fix
- Address the root cause identified
- One change at a time
- No "while I'm here" improvements
- No bundled refactoring
- Verify Fix
- Test passes now?
- No other tests broken?
- Issue actually resolved?
- If Fix Doesn't Work
- Stop
- Count: How many fixes have you tried?
- If < 3: Return to Phase 1, re-analyze with new information
- If ≥ 3: stop and question the architecture (step 5 below)
- Don't attempt Fix #4 without architectural discussion
If 3+ Fixes Failed: Question Architecture
Pattern indicating architectural problem:
- Each fix reveals new shared state/coupling/problem in different place
- Fixes require "massive refactoring" to implement
- Each fix creates new symptoms elsewhere
Stop and question fundamentals:
- Is this pattern fundamentally sound?
- Are we "sticking with it through sheer inertia"?
- Should we refactor architecture vs. continue fixing symptoms?
Discuss with your human partner before attempting more fixes
This is not a failed hypothesis — it is a wrong architecture.
Signs you're off the 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" (when already tried 2+)
- Each fix reveals new problem in different place
Any of these means the same thing: stop and return to Phase 1.
If 3+ fixes failed: question the architecture (see Phase 4.5)
Signals from your human partner
Watch for these redirections — each one is telling you the process was skipped:
- "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 and return to Phase 1.
Common misreads
- "The issue is simple, I don't need the process" → simple issues have root causes too, and the process is fast for simple bugs.
- "It's an emergency, no time for process" → systematic debugging is faster than guess-and-check thrashing.
- "I see the problem / just try this first, then investigate" → seeing symptoms is not understanding the root cause, and the first fix sets the pattern. Do it right from the start.
- "I'll write the test after confirming the fix works" → untested fixes don't stick. A failing test first proves it.
- "Multiple fixes at once saves time / the reference is too long, I'll adapt it" → you can't isolate what worked, and partial understanding guarantees bugs. One change at a time; read references completely.
- "One more fix attempt" (after 2+ failures) → 3+ failures signal an architectural problem. Question the pattern instead of fixing again.
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
But: 95% of "no root cause" cases are incomplete investigation.
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 triggerdefense-in-depth.md- Add validation at multiple layers after finding root causecondition-based-waiting.md- Replace arbitrary timeouts with condition polling
Related skills:
- test-driven-development - For creating failing test case (Phase 4, Step 1)
- verification-before-completion - Verify fix worked before claiming success
Real-World Impact
From debugging sessions:
- Systematic approach: 15-30 minutes to fix
- Random fixes approach: 2-3 hours of thrashing
- First-time fix rate: 95% vs 40%
- New bugs introduced: Near zero vs common
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.

