debugging-and-error-recovery

debugging-and-error-recovery is a skill for Claude Code, Codex from vanja-emichi/a0_agent_skills. It costs 43 tokens per session (2,676 once invoked), scanned A, original, MIT.

A structured method for finding and fixing software bugs by reproducing the problem, studying the error, testing a cause, and confirming the repair.

In plain words
What is it for?
Use it for exceptions, failing tests, unexpected behavior, or changes that have broken working code.
Why use it?
It replaces guesswork with evidence and helps avoid fixes that only hide the original problem.

Skill for Claude CodeCodex

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

Good fit Use it for exceptions, failing tests, unexpected behavior, or changes that have broken working code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vanja-emichi/a0_agent_skills/debugging-and-error-recovery
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 vanja-emichi/a0_agent_skills --skill debugging-and-error-recovery
Clone the repo
git clone --depth 1 https://github.com/vanja-emichi/a0_agent_skills

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-and-error-recovery

README.md
[![agentmods](https://agentmods.dev/badge/skills/vanja-emichi/a0_agent_skills/debugging-and-error-recovery/github.svg)](https://agentmods.dev/skills/vanja-emichi/a0_agent_skills/debugging-and-error-recovery)
Your own site
<a href="https://agentmods.dev/skills/vanja-emichi/a0_agent_skills/debugging-and-error-recovery"><img src="https://agentmods.dev/badge/skills/vanja-emichi/a0_agent_skills/debugging-and-error-recovery/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 debugging-and-error-recovery

Your own site · 80×15
<a href="https://agentmods.dev/skills/vanja-emichi/a0_agent_skills/debugging-and-error-recovery"><img src="https://agentmods.dev/badge/skills/vanja-emichi/a0_agent_skills/debugging-and-error-recovery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,676 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00043 $0.02676
Opus 5 $0.00022 $0.01338
Sonnet 5 $0.00009 $0.00535
Haiku 4.5 $0.00004 $0.00268

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

Security

Grade A, and why

debugging-and-error-recovery scanned grade A with 1 finding 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 10d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

→ Confirm the resource exists via code_execution_tool (curl/fetch)
skills/debugging-and-error-recovery/SKILL.md · 385 lines

How it starts

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

Debugging and Error Recovery

Overview

Debug systematically, not randomly. The most common debugging mistake is jumping to a fix before understanding the problem. Premature fixes mask symptoms, introduce new bugs, and waste time. The correct approach: reproduce the bug, read the error carefully, form a hypothesis, verify it, fix the root cause, confirm the fix.

When to Use

  • Encountering an error message or exception
  • Tests are failing unexpectedly
  • A feature works in some cases but not others
  • Recent changes broke something that was working
  • Runtime behavior doesn't match what the code suggests

The Debugging Protocol

Step 1: Read the Error (Don't Skim)

The error message contains the answer most of the time. Read it in full:

READ THE ERROR:
→ What is the error type? (TypeError, ReferenceError, 404, etc.)
→ What is the exact message?
→ What file and line number?
→ What is the full stack trace (not just the first line)?
→ Is there a "caused by" or inner exception?

Use code_execution_tool to capture full error output:

# Run with full stack trace
node --stack-trace-limit=50 script.js 2>&1

# Python with full traceback
python -m traceback script.py 2>&1

# Capture test failures in full
npx vitest run --reporter=verbose 2>&1

Step 2: Reproduce Reliably

Before fixing, make the bug reproducible on demand:

REPRODUCTION QUESTIONS:
- Can I trigger this consistently?
- What exact inputs/conditions trigger it?
- Does it happen in isolation, or only with other code?
- Does it happen in test environment? Production? Both?
- Did it ever work? If so, what changed?

If you can't reproduce it, you can't verify when it's fixed. Use code_execution_tool to write a minimal reproduction:

// Minimal reproduction — remove everything not needed to trigger the bug
const { processTask } = require('./task-processor');

const task = { id: '123', title: '', status: 'pending' };
const result = processTask(task);
console.log(result); // Should trigger the bug

Read the full file on GitHub · 385 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. 10d ago First seen · 385 lines · 43 tokens per session scan A e509470d0d37

Subscribe to this mod's changes

debugging-and-error-recovery is a skill published in the GitHub repository vanja-emichi/a0_agent_skills (5 stars, last pushed 1mo ago), licensed MIT. It adds 43 tokens to every session and 2,676 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.