debug

debug is a skill for Claude Code from anton-abyzov/specweave. It costs 38 tokens per session (1,938 once invoked), scanned A, original, MIT.

A four-phase method for investigating software bugs, starting with finding the underlying cause before changing code.

In plain words
What is it for?
Use it to reproduce failures, inspect error details, compare recent code changes, and trace where incorrect data or behavior begins.
Why use it?
It reduces guesswork when errors are unclear, inconsistent, or return after an attempted fix.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

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.

agentmods
npx agentmods add skills/anton-abyzov/specweave/debug
Any agent
npx skills add anton-abyzov/specweave --skill debug
Clone the repo
git clone --depth 1 https://github.com/anton-abyzov/specweave

Made for: Claude Code.

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 debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/anton-abyzov/specweave/debug.svg)](https://agentmods.dev/skills/anton-abyzov/specweave/debug)
Your own site
<a href="https://agentmods.dev/skills/anton-abyzov/specweave/debug"><img src="https://agentmods.dev/badge/skills/anton-abyzov/specweave/debug.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,938 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00038 $0.01938
Opus 5 $0.00019 $0.00969
Sonnet 5 $0.00008 $0.00388
Haiku 4.5 $0.00004 $0.00194

Measured 2d ago against content hash 605b004ddcc7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

debug 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 2d 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-optional/debug/SKILL.md · 215 lines

How it starts

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

Systematic Debugging

Iron Law

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.

Random fixes waste time and mask underlying issues. If you haven't traced the bug to its origin, you don't understand it well enough to fix it.


When to Use This Skill

  • A test is failing and the cause isn't immediately obvious
  • A bug report describes unexpected behavior
  • Something "used to work" and now doesn't
  • An error message is confusing or misleading
  • You've already tried one fix and it didn't work

Phase 1: Root Cause Investigation

Goal: Understand what's actually happening before proposing any fix.

  1. Read error messages completely — including stack traces, line numbers, and surrounding context. Don't skim. The answer is often in the error message itself.

  2. Reproduce consistently — if you can't reproduce it, you can't verify a fix. Document the exact reproduction steps.

  3. Check recent changes — what changed since it last worked?

    git log --oneline -15
    git diff HEAD~5..HEAD -- <affected-files>
    
  4. Trace the data flow — start from the error and work backward. At each component boundary, log what enters and what exits:

    • What data enters the failing function?
    • What data does it produce?
    • Where does the input come from?
    • Is the input what you expected?
  5. Identify affected code paths — map which files, functions, and modules are involved. Read them fully — don't skim.

Phase 1 output: A clear statement of what is happening vs. what should happen, with evidence.


Phase 2: Pattern Analysis

Goal: Find working analogues to understand how the system is supposed to behave.

  1. Find similar working code — search for functions, patterns, or flows that do something analogous and work correctly.

  2. Compare implementations completely — don't just spot-check. Enumerate ALL differences between working and broken:

    • Different function signatures?
    • Different error handling?
    • Different data transformations?
    • Different initialization order?

Read the full file on GitHub · 215 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. 2d ago First seen · 215 lines · 38 tokens per session scan A 605b004ddcc7

Subscribe to this mod's changes

debug is a skill published in the GitHub repository anton-abyzov/specweave (159 stars, last pushed today), licensed MIT. It adds 38 tokens to every session and 1,938 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.

Related

Other skills, from other repositories

docverity

Check whether a project's documentation still matches its code, and report stale or wrong claims with suggested fixes. Use this after editing, renaming, moving, or deleting source files, CLI flags, environment variables, or functions, to catch docs you may have just made inaccurate; when the user asks whether the…

deveshagarwal/docverity · 84 tokens

printing-press-polish

Polish a generated CLI to pass verification and become publish-ready. Runs diagnostics (dogfood, verify, scorecard, go vet, gosec), automatically fixes all issues (verify failures, static-analysis findings, dead code, descriptions, README, MCP tool quality), reports the before/after delta, and offers to publish. Use…

mvanhorn/cli-printing-press · 125 tokens

printing-press-amend

Amend a published CLI from one of two input sources: (1) dogfood mode mines the active Claude Code session transcript for friction (missing flags, hand- rolled API payloads, silent-null returns); (2) direct-input mode accepts user-supplied asks (rename a command, add commands or feeds, fix a named bug, optionally…

mvanhorn/cli-printing-press · 222 tokens

printing-press-output-review

Internal sub-skill: agentic review of a printed CLI's sampled command output for plausibility issues that rule-based checks can't encode (substring-match relevance, format bugs, silent source drops, ranking failures). Invoked via the Skill tool by main printing-press SKILL.md (Phase 4.85) and printing-press-polish…

mvanhorn/cli-printing-press · 104 tokens

fix

Dispatch fix subagent for FIX-FIRST gaps from review, re-review, then diagnose unresolved failures after 2 loops.

automagik-dev/genie · 25 tokens

report

Investigate bugs comprehensively — cascade through trace, capture browser evidence, extract observability data, and prepare or explicitly create a GitHub issue with grounded findings.

automagik-dev/genie · 34 tokens