Skip to main content
skill CX Codex

systematic-debugging · dshakes — Claude Code skill for debugging

This skill guides an agent from reproducing a failure to proving its cause, making a small fix, and adding a regression test. Use it for failing tests, panics, or unexpected behavior.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dshakes/compass --skill systematic-debugging -a claude-code
Open on GitHub

What systematic-debugging does

The agent first creates a reproducible case and states a specific explanation that can be checked. It gathers evidence by inspecting the code or adding logs before editing anything. The fix should address the confirmed cause with as few changes as possible.

Next, the agent reruns the reproduction, checks nearby tests, and adds a regression test. For a difficult case, the skill can hand off to the debugger subagent or the triage command. Without a reproducible failure, it treats a proposed fix as unverified; changing several things at once also makes it harder to tell what solved the problem.

What it helps with

  • reproduce a failure before editing code
  • test a specific theory about an error
  • fix a confirmed root cause with minimal changes
  • add a test to catch a regression

Example prompts for the agent

  • Find out why this test fails: reproduce the issue and verify its cause first.
  • Investigate this panic, make the smallest fix, and add a regression test.
  • Trace this error step by step, and hand it to the debugger subagent if the case is difficult.

How to install systematic-debugging

1Skills CLI (Vercel)

npx skills add dshakes/compass --skill systematic-debugging -a claude-code

2Manually: put the files in place

~/.claude/skills/systematic-debugging/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/systematic-debugging/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about systematic-debugging

How do I install systematic-debugging in Claude Code?

Run npx skills add dshakes/compass --skill systematic-debugging -a claude-code. The skill file is at ~/.claude/skills/systematic-debugging/SKILL.md.

What does systematic-debugging do?

It guides the agent through reproducing a failure, verifying its cause, applying a minimal fix, and adding a regression test. The cause should be established before code changes begin.

When does systematic-debugging hand off to a subagent?

For a difficult debugging case, it can delegate to the debugger subagent or the triage command.

Source text

SKILL.md · MIT
---
name: systematic-debugging
description: Use when something is broken — a failing test, panic, stack trace, error log, or wrong behavior whose cause isn't obvious. Reproduce it, form a hypothesis, PROVE the cause before changing code, then make the minimal root-cause fix and guard it with a test. For deep cases, hand off to the debugger subagent.
allowed-tools: Read, Grep, Glob, Bash, Edit
---

# Systematic debugging

Fix the cause, not the symptom — and prove the cause before you touch code.

## The method

1. **Reproduce** — get a reliable, minimal repro (a failing test is ideal). No repro → no fix.
2. **Hypothesize** — one specific, falsifiable guess about the cause ("X is null because Y").
3. **Prove it** — instrument/log/inspect to confirm the hypothesis *before* editing. If the
   evidence contradicts it, form a new hypothesis. Don't guess-and-change.
4. **Minimal fix** — change the smallest thing that addresses the proven root cause.
5. **Verify** — re-run the repro; it passes. Run the surrounding tests; nothing regressed.
   (See `verification-before-completion`.)
6. **Guard** — add/extend a test that would have caught it, so it can't silently return.

For a nasty one, delegate to the **`debugger`** subagent (or the `triage` command) — it
forms a hypothesis, proves it, and proposes the minimal fix.

## Red flags — you're not debugging, you're flailing

- **Changing code before reproducing** the problem.
- **Fixing the symptom** (swallow the error, bump the timeout) instead of the cause.
- **Several changes at once** — you won't know which one mattered.
- "It went away" with **no explanation of why** — it'll come back.
- Re-running hoping for a different result without changing your hypothesis.

## Done means

Root cause **proven** (not assumed) · minimal fix · repro now green · a regression test
added · no new failures. Anything less is **UNVERIFIED**.

© dshakes · MIT · dshakes/compass

Similar skills

All skills for Testing and QA →

systematic-debugging by other authors comes first.

systematic-debugging Jesse Vincent Makes the agent investigate the cause of a failure before it suggests a patch. Use it for failing tests, build errors, and behaviour that does not match expectations. CX Codex 306,118installs systematic-debugging Hermes Agent (adapted from obra/superpowers) A four-phase skill that moves from a reproducible symptom to its root cause. Use it for test failures, build errors, integration issues, and unexpected behavior. CX Codex +1 471installs systematic-debugging spencerpauly Enforces a structured debugging workflow on your AI assistant instead of random edits. It helps isolate elusive bugs and verify root causes with evidence. CX Codex +1 545installs systematic-debugging bobmatnyc This skill guides an agent from reproducing a bug to checking the fix. Use it when an error or unexpected behavior has no clear cause. CX Codex +1 382installs systematic-debugging GanyuanRan This skill guides bug and test-failure investigations before code changes. Use it to trace a symptom to the logic that owns the cause. CX Codex +1 ★ 1,388repo stars improve-codebase-architecture Matt Pocock This skill scans a codebase for architectural friction, then builds a visual HTML report with refactoring candidates. Use it before a deeper architecture review. 1,163,035installs design-taste-frontend Leonxlnx This skill directs the design of public pages and work screens, then checks the result in a browser through screenshots. Use it when an interface feels generic or unfinished. CX Codex +1 678,700installs tdd Matt Pocock Guides the red-green TDD loop: ensures tests are written first, keep them at public interfaces, and avoid coupling to implementation details. 1,141,062installs skill-creator official anthropics Creates and refines skills, then tests them with prompts, evaluations, and performance checks. 414,180installs agent-browser vercel-labs A CLI skill for browser control: it opens pages, fills forms, clicks buttons, and tests web apps. Use it when an agent needs to act inside a website. CX Codex +1 1,200,000installs prototype Matt Pocock Creates throwaway prototypes for checking state logic or exploring UI before committing the decision to the main codebase. 986,201installs

From the same set8

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor