Agent skill

Systematic Debugging

by majiayu000 in majiayu000/spellbook

Four-phase debugging framework for any technical issue. An agent skill from majiayu000/spellbook.

MITAuto-check passedDevelopment

Install Systematic Debugging

skills CLI
$ npx skills add majiayu000/spellbook --skill systematic-debugging -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install majiayu000/spellbook systematic-debugging --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/systematic-debugging .claude/skills/systematic-debugging && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
systematic-debugging
GitHub stars
286
Token cost
~981 tokens
SKILL.md length
326 words
Files
1
Skills in repo
96
Repo updated
First seen
Licence
MIT

At a glance

Four-phase debugging framework for any technical issue. An agent skill from majiayu000/spellbook.

  • Works in 4 steps: Root Cause Investigation → Pattern Analysis → Hypothesis and Testing → …
  • Encountering bugs
  • SKILL.md covers Core Principle, The Four Phases, The 3-Fix Rule and Critical Red Flags, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Systematic Debugging is an agent skill from majiayu000/spellbook. Four-phase debugging framework for any technical issue. Use when encountering bugs, errors, or unexpected behavior. Prevents random fix attempts.

Its SKILL.md is about 980 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Debugging. The repository describes itself as: Cross-runtime skills for Claude Code, Codex, and multi-agent workflows. The licence is MIT.

When your agent uses it

  • Encountering bugs
  • Unexpected behavior

Example prompts

  • “/systematic-debugging”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Root Cause Investigation
  2. Pattern Analysis
  3. Hypothesis and Testing
  4. Implementation

What it can do on your machine

Read from SKILL.md and the folder at commit 414b597. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Systematic Debugging loads about 981 tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 326 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
When it runs · the whole SKILL.md, loaded when a task matches
~981

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from majiayu000/spellbook at commit 414b597, republished under its MIT licence (© majiayu000). 326 words, ~981 tokens.

Download SKILL.mdSave it as .claude/skills/systematic-debugging/SKILL.md (or your agent's skills folder).
name
systematic-debugging
description
Four-phase debugging framework for any technical issue. Use when encountering bugs, errors, or unexpected behavior. Prevents random fix attempts.

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

Three consecutive failed fixes signal:

  • Architectural problem, not implementation bug
  • Wrong mental model of the system
  • Need to step back and reassess

Do NOT attempt more fixes. Reassess the approach.

Critical Red Flags

STOP and restart investigation if you:

  • Propose fixes before understanding the problem
  • Add multiple changes simultaneously
  • Skip investigation for "quick fixes"
  • Make 3+ failed fix attempts
  • Say "let's just try this"

Debugging Checklist

markdown
## Investigation
- [ ] Read full error message/stack trace
- [ ] Reproduced issue consistently
- [ ] Checked recent changes
- [ ] Added diagnostic logging
- [ ] Traced data flow

## Analysis
- [ ] Found similar working code
- [ ] Compared working vs broken
- [ ] Understood all dependencies

## Hypothesis
- [ ] Formed single specific hypothesis
- [ ] Tested with minimal change
- [ ] Accepted results honestly

## Fix
- [ ] Created failing test case
- [ ] Implemented single fix
- [ ] Verified fix works
- [ ] No regressions

Example Workflow

Issue: User login fails silently

Phase 1 - Investigation:
- Error: "null reference at AuthService.validate()"
- Reproduced: happens with specific user emails
- Recent change: added email normalization

Phase 2 - Analysis:
- Working logins use lowercase emails
- Failing logins have mixed case
- Normalization strips @ symbol incorrectly

Phase 3 - Hypothesis:
- "Email normalization regex is wrong"
- Test: log email before/after normalization
- Result: "Test@Example.com" → "testexample.com"
- Confirmed!

Phase 4 - Fix:
- Write test: normalize("Test@Example.com") == "test@example.com"
- Fix regex to preserve @
- Verify: test passes, logins work

© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/systematic-debugging of majiayu000/spellbook.

Open the folder on GitHubat commit 414b597

Compare with similar skills

Systematic Debugging next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Systematic Debugging compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Systematic Debugging this skillmajiayu000/spellbook286—~981Automated safety check: PassMIT
Trellis Session Insightmindfold-ai/Trellis15k4 repos~1.7kAutomated safety check: PassAGPL-3.0
Native Data FetchingCherryHQ/cherry-studio-app4k6 repos~2.9kAutomated safety check: NotesMIT
Aoti Debugpytorch/pytorch104k1 repos~1.7kAutomated safety check: PassCustom licence
Herdr Throwaway Reproductionherdrdev/herdr43k—~2.4kAutomated safety check: PassApache-2.0
Systematic Debuggingultralisp/ultralisp25851 repos~2.4kAutomated safety check: PassNone

Similar skills

  • Trellis Session Insight

    mindfold-ai/Trellis

    Reach into past AI conversation history through the trellis mem CLI.

    15k GitHub starsUsed in 4 repos~1.7k tokens
    DevelopmentAuto-check passed
  • Native Data Fetching

    CherryHQ/cherry-studio-app

    A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.

    4k GitHub starsUsed in 6 repos~2.9k tokens
    DevelopmentAuto-check: notes
  • Aoti Debug

    pytorch/pytorch

    Debug AOTInductor (AOTI) errors and crashes. An agent skill from pytorch/pytorch.

    104k GitHub starsUsed in 1 repo~1.7k tokens
    DevelopmentAuto-check passed
  • Runs a disposable, uniquely named Herdr session inside an existing one so runtime, pane, terminal or API bugs can be reproduced without touching the main session.

    43k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Systematic Debugging

    ultralisp/ultralisp

    A skill your agent uses when encountering any bug, test failure, or unexpected behavior, before proposing fixes

    258 GitHub starsUsed in 51 repos~2.4k tokens
    DevelopmentAuto-check passed
  • Decides whether an OpenLogi device problem on macOS is a privacy-permission (TCC) problem, using agent log lines, and says which identity needs which grant.

    23k GitHub stars~2.5k tokensUpdated 3 days ago
    DevelopmentAuto-check: notes

More from majiayu000/spellbook

All 96 skills in this repo
  • Skill Ecosystem Doctor

    majiayu000/spellbook

    Audits and repairs how coding-agent Skills are owned, copied and exposed across runtimes, from canonical sources to quarantine and retirement.

    286 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • AGENTS.md Scaffold

    majiayu000/spellbook

    Scans a repository for real evidence and proposes, or on request writes, a small stack of root and scoped AGENTS.md files with validation commands and generated-file boundaries.

    286 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Product Demo Builder

    majiayu000/spellbook

    Plans, produces or diagnoses evidence-backed product demo videos: script, capture plan, pacing checks and verified final media built on real product behavior.

    286 GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Flowguard Task Guard

    majiayu000/spellbook

    Single entry point that routes long or ambiguous agent tasks, checks live state, bounds autonomous loops and leaves a resumable handoff.

    286 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • npm Supply Chain Check

    majiayu000/spellbook

    Scans a repository, its lockfiles and node_modules for known malicious npm package versions and install-time indicators, using a read-only Python scanner.

    286 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Product Manager Toolkit

    majiayu000/spellbook

    Product management helpers: a RICE scoring script, an interview transcript analyzer and PRD templates for prioritizing features, synthesizing research and writing requirements.

    286 GitHub stars~2.2k tokensUpdated today
    Auto-check passed

Categories

Questions about Systematic Debugging

What does Systematic Debugging do?

Four-phase debugging framework for any technical issue. An agent skill from majiayu000/spellbook. Systematic Debugging is an agent skill from majiayu000/spellbook. Four-phase debugging framework for any technical issue.

When should I use Systematic Debugging?

Systematic Debugging fits situations like: encountering bugs; unexpected behavior.

How do I install Systematic Debugging in Claude Code?

Run `npx skills add majiayu000/spellbook --skill systematic-debugging -a claude-code`. Or copy the skill folder (skills/systematic-debugging in majiayu000/spellbook) into .claude/skills/systematic-debugging in your project. Claude Code loads it when a task matches its description.

How do I install Systematic Debugging in Codex?

Run `npx skills add majiayu000/spellbook --skill systematic-debugging -a codex`. Or copy the skill folder (skills/systematic-debugging in majiayu000/spellbook) into .agents/skills/systematic-debugging in your project. Codex loads it when a task matches its description.

Can I use Systematic Debugging in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/spellbook --skill systematic-debugging -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/systematic-debugging, .gemini/skills/systematic-debugging, .github/skills/systematic-debugging and .opencode/skills/systematic-debugging in your project.

What does Systematic Debugging need to run?

SKILL.md names no scripts, command-line tools or credentials: Systematic Debugging is instructions for the agent only.

Does Systematic Debugging access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Systematic Debugging safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Systematic Debugging use?

Systematic Debugging is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Systematic Debugging use?

About 981 tokens (SKILL.md is roughly 3.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Systematic Debugging?

Skills that share tags, products or a category with Systematic Debugging: Trellis Session Insight (mindfold-ai/Trellis, 15k stars), Native Data Fetching (CherryHQ/cherry-studio-app, 4k stars), Aoti Debug (pytorch/pytorch, 104k stars) and Herdr Throwaway Reproduction (herdrdev/herdr, 43k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Systematic Debugging?

majiayu000 (a GitHub user) maintains it in majiayu000/spellbook, which has 286 GitHub stars. The repository holds 96 skills in this directory. The repository was last updated on October 6, 2026.

Source: majiayu000/spellbook on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.