systematic-debugging

systematic-debugging is a skill for Claude Code, Codex from majiayu000/spellbook. It costs 31 tokens per session (926 once invoked), scanned A, original, MIT.

A four-phase method for debugging technical problems: investigate the cause, compare working and broken cases, test a hypothesis, and then apply a fix. Debugging means finding and correcting unexpected software behaviour.

In plain words
What is it for?
Use it for errors, failing tests, regressions, unexpected behaviour, dependency changes, and issues that need reproducible evidence before fixing.
Why use it?
It prevents random changes that may hide the real problem or introduce new bugs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for errors, failing tests, regressions, unexpected behaviour, dependency changes, and issues that need reproducible evidence before fixing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/majiayu000/spellbook/systematic-debugging
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add majiayu000/spellbook --skill systematic-debugging
Clone the repo
git clone --depth 1 https://github.com/majiayu000/spellbook

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for systematic-debugging

README.md
[![agentmods](https://agentmods.dev/badge/skills/majiayu000/spellbook/systematic-debugging/github.svg)](https://agentmods.dev/skills/majiayu000/spellbook/systematic-debugging)
Your own site
<a href="https://agentmods.dev/skills/majiayu000/spellbook/systematic-debugging"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/systematic-debugging/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for systematic-debugging

Your own site · 80×15
<a href="https://agentmods.dev/skills/majiayu000/spellbook/systematic-debugging"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/systematic-debugging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 926 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00031 $0.00926
Opus 5 $0.00015 $0.00463
Sonnet 5 $0.00006 $0.00185
Haiku 4.5 $0.00003 $0.00093

Measured 8d ago against content hash 9b84f2e1da7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

systematic-debugging scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/systematic-debugging/SKILL.md · 166 lines

How it starts

The opening of the file, as written. The whole thing — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Systematic Debugging

From obra/superpowers

Core Principle

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST

Random fixes create new bugs. Understanding must precede solutions.

The Four Phases

Phase 1: Root Cause Investigation

Before ANY fix attempt:

  1. Read error messages carefully

    • Full stack traces
    • Error codes and descriptions
    • Timestamps and context
  2. Reproduce consistently

    • Document exact steps
    • Identify triggers
    • Note environmental factors
  3. Check recent changes

    • Recent commits
    • Dependency updates
    • Configuration changes
  4. Gather diagnostic evidence

    • Add logging at component boundaries
    • Check input/output at each step
    • Trace data flow backward to source

Phase 2: Pattern Analysis

  1. Find similar working code

    • Search codebase for related functionality
    • Look for existing patterns
  2. Read reference implementations completely

    • Don't skim
    • Understand the full context
  3. Compare working vs broken

    • What's different?
    • What assumptions changed?
  4. Understand dependencies

    • What does this code rely on?
    • What relies on this code?

Phase 3: Hypothesis and Testing

  1. Form a SINGLE, SPECIFIC hypothesis

    • "The error occurs because X"
    • Not "maybe it's A or B or C"
  2. Test with minimal changes

    • One variable at a time
    • Don't combine fixes
  3. Accept results

    • If hypothesis is wrong, form new one
    • Don't force-fit evidence
  4. Ask for help when stuck

    • After genuine investigation
    • With evidence gathered

Phase 4: Implementation

  1. Create a failing test case FIRST

    • Reproduces the bug
    • Will pass when fixed
  2. Implement SINGLE fix

    • Address root cause only
    • Don't fix "nearby" issues
  3. Verify the fix

    • Test case passes
    • No regressions
    • Issue is resolved

The 3-Fix Rule

If ≥3 fixes fail: STOP and question the architecture

Read the full file on GitHub · 166 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 166 lines · 31 tokens per session scan A 9b84f2e1da7d

Subscribe to this mod's changes

systematic-debugging is a skill published in the GitHub repository majiayu000/spellbook (278 stars, last pushed yesterday), licensed MIT. It adds 31 tokens to every session and 926 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.