debugging

debugging is a skill for Claude Code, Codex from axiomantic/spellbook. It costs 104 tokens per session (3,978 once invoked), scanned A, original, MIT.

A method for finding the root cause of bugs, failed tests, and unexpected program behavior. It uses reproduction, isolated investigation, and verification of the result.

In plain words
What is it for?
It is for investigating errors, crashes, hangs, regressions, flaky tests, and other broken behavior.
Why use it?
It reduces guesswork and prevents unverified fixes that only appear to solve a problem. It also helps distinguish a real bug from a failure that cannot be reproduced.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is git worktree add ../baseline-check origin/main # Clean state, separate directory.

Good fit It is for investigating errors, crashes, hangs, regressions, flaky tests, and other broken behavior.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/axiomantic/spellbook
agentmods
npx agentmods add skills/axiomantic/spellbook/debugging

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 debugging

README.md
[![agentmods](https://agentmods.dev/badge/skills/axiomantic/spellbook/debugging.svg)](https://agentmods.dev/skills/axiomantic/spellbook/debugging)
Your own site
<a href="https://agentmods.dev/skills/axiomantic/spellbook/debugging"><img src="https://agentmods.dev/badge/skills/axiomantic/spellbook/debugging.svg" alt="Measured on agentmods" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,978 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 warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Anti-Refusal · line 456
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
  • medium Excessive Agency · line 454
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.00104 $0.03978
Opus 5 $0.00052 $0.01989
Sonnet 5 $0.00021 $0.00796
Haiku 4.5 $0.00010 $0.00398

Measured 4d ago against content hash c59ebe6c7a83, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

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 4d 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/debugging/SKILL.md · 507 lines

How it starts

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

Debugging

Senior Debugging Specialist. Reputation depends on finding root causes, not applying band-aids.

Invariant Principles

  1. Baseline Before Investigation: Establish clean, known-good state BEFORE any debugging. No baseline = no debugging.
  2. Prove Bug Exists First: Reproduce the bug on clean baseline before ANY investigation or fix attempts. No repro = no bug.
  3. Triage Before Methodology: Classify symptom. Simple bugs get direct fixes; complex bugs get structured methodology.
  4. 3-Fix Rule: Three failed attempts require architectural review, not more tactical fixes.
  5. Verification Non-Negotiable: No fix is complete without evidence. Always invoke Phase 4 Verification after claiming resolution.
  6. Track State: Fix attempts AND code state accumulate across methodology invocations. Always know what state you're testing.
  7. Evidence Over Intuition: "I think it's fixed" is not verification.
  8. Hunches Require Verification: Before claiming "found it" or "root cause," invoke verifying-hunches skill. Eureka is hypothesis until tested.
  9. Isolated Testing: One theory, one test, full stop. No mixing theories, no "trying things," no chaos. Invoke isolated-testing skill before ANY experiment execution.

Entry Points

Invocation Triage Methodology Verification
debugging Yes Selected from triage Auto
debugging --scientific Skip Scientific Auto
debugging --systematic Skip Systematic Auto
scientific-debugging skill Skip Scientific Manual
systematic-debugging skill Skip Systematic Manual

Session State

fix_attempts: 0       // Tracks attempts in this session
current_bug: null     // Symptom description
methodology: null     // "scientific" | "systematic" | null
baseline_established: false  // Is clean baseline confirmed?
bug_reproduced: false        // Has bug been reproduced on clean baseline?
code_state: "unknown"        // "clean" | "modified" | "unknown"

Read the full file on GitHub · 507 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. 4d ago First seen · 507 lines · 104 tokens per session scan A c59ebe6c7a83

Subscribe to this mod's changes

debugging is a skill published in the GitHub repository axiomantic/spellbook (10 stars, last pushed 4d ago), licensed MIT. It adds 104 tokens to every session and 3,978 once invoked, about $0.0005 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.