
Systematic Debugging
Install this when you want your coding agent to investigate root causes before guessing fixes on failures, bugs, or flaky behavior.
Overview
Systematic Debugging is a journey-wide agent skill that walks you through root-cause investigation before any fix—usable whenever a solo builder needs to stop symptom-patching on bugs, test failures, or unexpected behavi
Install
npx skills add https://github.com/obra/superpowers --skill systematic-debuggingWhat is this skill?
- Four-phase gate: no fixes until root cause investigation completes
- Explicit anti-patterns: patch thrashing, shotgun changes, and fix-without-reproduction
- Structured handoffs when fixes fail—hypothesis, evidence, and next isolation step
Adoption & trust: 134k installs on skills.sh; 221k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You or your agent keep trying “obvious” fixes while the real cause stays hidden, wasting time and introducing regressions.
Who is it for?
Solo builders who want repeatable agent behavior on failing tests, CI, local builds, or production oddities—especially after prior quick fixes failed.
Skip if: Teams that only need a one-off stack trace explained with no process change, or situations where you already have a verified root cause and only need implementation.
When should I use this skill?
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes—especially under time pressure or after a prior fix failed.
What do I get? / Deliverables
You get a documented causal chain, a minimal reproduction, and only then a targeted fix with explicit verification steps.
- Written root-cause chain from observation to confirmed cause
- Minimal reproduction or failing test case
- Targeted fix proposal with verification checklist
Recommended Skills
Journey fit
Useful at every journey phase - explore requirements and options before committing to a direction.
Where it fits
CI fails on an integration test and you run Phase 1—full stack trace and reproduction—before letting the agent edit application code.
A local API returns 500 after a refactor and you trace request flow and recent commits instead of reverting blindly.
Production logs show intermittent timeouts and you isolate environment versus code hypotheses before scaling infrastructure.
A reviewer flags a risky hotfix and you reopen root-cause notes to confirm the patch addresses the traced failure mode.
A third-party webhook payload changed and you compare observed versus expected behavior before updating parsers.
How it compares
Use instead of ad-hoc “try this change” chat debugging when you need a enforced phase gate, not a linter or test runner replacement.
Common Questions / FAQ
Who is systematic-debugging for?
Indie and solo builders using AI coding agents who want root-cause discipline on failures across local dev, CI, and production—not random patch attempts.
When should I use systematic-debugging?
Use at ship when tests or builds fail; during build when integrations misbehave; at operate when production errors need isolation; and anytime a previous fix did not stick or you feel time pressure to guess.
Is systematic-debugging safe to install?
It is procedural guidance without built-in shell or network side effects, but review the Security Audits panel on this Prism page before trusting any third-party skill package.
SKILL.md
READMESKILL.md - Systematic Debugging
# Systematic Debugging ## Overview Random fixes waste time and create new bugs. Quick patches mask underlying issues. **Core principle:** ALWAYS find root cause before attempting fixes. Symptom fixes are failure. **Violating the letter of this process is violating the spirit of debugging.** ## The Iron Law ``` 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 You MUST complete each phase before proceeding to the next. ### Phase 1: Root Cause Investigation **BEFORE attempting ANY fix:** 1. **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 2. **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 3. **Check Recent Changes** - What changed that could cause this? - Git diff, recent commits - New dependencies, config changes - Environmental differences 4. **Gather Evidence in Multi-Component Systems** **WHEN 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 component ``` **Example (multi-layer system):** ```bash # 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 ✗) 5. **Trace Data Flow** **WHEN error is deep in call stack:** See `root-cause-tracing.md` in 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:** 1. **Find Working Examples** - Locate similar working code in same codebase - What works that's similar to what's broken? 2. **Compare Against References** - If implementing pattern, read reference implementation COMPLETELY - Don't skim - read every line - Understand the pattern fully before applying 3. **Identify Differences** - What's different between working and broken? - List every difference, however small - Don't assume "that can't matter" 4. **Understand Dependencies** - What other components does this need? -