Skip to main content
skill CX Codex

systematic-debugging · spencerpauly — Claude Code skill: what it does, how to install

Enforces a structured debugging workflow on your AI assistant instead of random edits. It helps isolate elusive bugs and verify root causes with evidence.

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

What systematic-debugging does

This skill guides the agent through structured bug hunting: reproduction, isolation, hypothesis testing, and targeted verification. The assistant must confirm trigger steps and environment parameters before touching any code. For isolation, it relies on binary search in the codebase and running git bisect when a commit broke working behavior.

Random code edits are forbidden. The assistant forms a testable hypothesis and verifies it with a focused log or breakpoint before patching. The methodology includes a clear safeguard: if no progress occurs within 15 minutes, the agent must step back and re-isolate the failure.

What it helps with

  • isolate code regressions using git bisect
  • reproduce environment mismatches between local and production setups
  • diagnose intermittent issues like race conditions and stale closures
  • verify testable hypotheses with logging before modifying source files

Example prompts for the agent

  • Use systematic-debugging to investigate why this async function hangs.
  • Run git bisect with systematic-debugging to locate the commit that broke login.
  • Apply systematic-debugging to isolate an unhandled undefined error in this component.

How to install systematic-debugging

1Skills CLI (Vercel)

npx skills add spencerpauly/awesome-cursor-skills --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 spencerpauly/awesome-cursor-skills --skill systematic-debugging -a claude-code. The tool installs the skill file directly into your Claude Code skills directory.

What does systematic-debugging do?

It enforces a disciplined routine: reproduce reliably, isolate the failure layer, and verify a hypothesis with logs before patching.

What rule applies if debugging makes no progress?

When 15 minutes pass without tangible results, the methodology instructs the agent to step back and re-isolate rather than guessing solutions.

Source text

SKILL.md · CC0-1.0
---
name: systematic-debugging
description: Structured debugging methodology — reproduce, isolate, hypothesize, verify. Covers git bisect, binary search, logging, and minimal reproduction.
user-invocable: true
---

# Systematic Debugging

Debug methodically instead of randomly changing code.

## The Process

### 1. Reproduce

Before anything else, reproduce the bug reliably:
- Get the exact steps to trigger the issue
- Note the expected vs actual behavior
- Confirm it happens consistently (not intermittent)
- Record the environment (OS, Node version, browser, etc.)

If you can't reproduce it, you can't fix it. Ask for more details.

### 2. Isolate

Narrow down where the bug lives:

**Binary search the codebase:**
- Comment out half the system → does the bug persist?
- If yes, the bug is in the remaining half → repeat
- If no, the bug is in the commented-out half → repeat

**Git bisect:**
```bash
git bisect start
git bisect bad          # current commit is broken
git bisect good <sha>   # this commit was working
# Git checks out the midpoint — test it
git bisect good         # or git bisect bad
# Repeat until it finds the first bad commit
git bisect reset        # when done
```

**Isolate by layer:**
- Is it frontend or backend? (Check network tab)
- Is it the database? (Query directly)
- Is it the API? (curl the endpoint)
- Is it the component? (Render it in isolation)

### 3. Hypothesize

Form a specific, testable hypothesis:
- "The bug is caused by X because Y"
- Not "something is wrong with the data"
- Good: "The `userId` is null because the auth middleware doesn't run on this route"

### 4. Test the Hypothesis

Write the smallest possible test that proves/disproves your hypothesis:
- Add a `console.log` or breakpoint at the suspected location
- Check the value of the suspected variable
- If your hypothesis is wrong, go back to step 3 with new information
- If it's right, you've found the bug

### 5. Fix and Verify

- Apply the minimal fix
- Verify the original reproduction steps no longer trigger the bug
- Check for regressions — did the fix break anything else?
- Write a test that would have caught this bug

## Debugging Tools

| Scenario | Tool |
|----------|------|
| "It worked before" | `git bisect` |
| "I don't know where this runs" | Add logging at entry/exit of suspect functions |
| "The data looks wrong" | Inspect at each transformation step |
| "It only fails in production" | Compare env vars, check logs, try to reproduce with prod data locally |
| "It's intermittent" | Look for race conditions, timing issues, or uninitialized state |
| "The error message is useless" | Search the codebase for where that error is thrown |

## Common Bug Patterns

- **Off-by-one**: Array indices, pagination, date ranges
- **Null/undefined**: Missing optional chaining, uninitialized state
- **Race condition**: Async operations completing in unexpected order
- **Stale closure**: React useEffect/useCallback capturing old values
- **Type coercion**: `==` vs `===`, string vs number comparisons
- **Missing await**: Forgetting `await` on async functions
- **Environment mismatch**: Works locally, fails in CI/prod due to different env vars or versions

## Rules

- Never guess — always verify with evidence
- Fix the root cause, not the symptom
- If you've spent 15 minutes without progress, step back and re-isolate
- Document what you tried so you don't repeat failed approaches

© spencerpauly · CC0-1.0 · spencerpauly/awesome-cursor-skills

Similar skills

Everything 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 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 debugging akillness A skill that walks the agent through a reproduce → isolate → verify loop for concrete bugs, regressions and flaky failures. Useful once you already have a failing test or request. CX Codex +1 361installs hunt tw93 Pinpoints root causes before touching code when an app crashes or regresses. Enforces reproducible evidence and verification before applying any fix. CX Codex +1 14,900installs debugging-wizard https://github.com/Jeffallan Investigates errors, stack traces, and logs to locate failure points. Use it for crashes, exceptions, regressions, or code that behaves unexpectedly. CX Codex +1 5,100installs bug-reproduction kindlmann Turns a vague bug report into a verified minimal reproduction and a failing regression test. Useful when a bug only shows up sometimes and you don't know where to start. CX Codex +1 1,400installs debugging-and-error-recovery addyosmani This skill guides an agent from reproducing a failure to checking the fix. Use it when tests fail, a build breaks, or runtime behavior differs from expectations. CX Codex +1 62,800installs debugging-network-issues daymade A methodology for network, streaming and protocol failures where the obvious cause is probably wrong. CX Codex +1 675installs

From the same set59

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