debugging-and-recovery

debugging-and-recovery is a skill for Claude Code from aneja5/forge-skills. It costs 56 tokens per session (805 once invoked), scanned A, original, MIT.

A method for investigating broken or unexpected software by reproducing the problem, finding its cause, fixing it, and adding a test to prevent it from returning. A regression test is an automated check that catches a bug if it reappears.

In plain words
What is it for?
Use it for failing tests, reported bugs, production incidents, environment differences, and behavior that does not match the expected contract.
Why use it?
It replaces guesswork with a repeatable process and helps ensure that a fix does not create another problem.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the forge-skills plugin — 42 skills, 36 commands, 1 hook shipped together

Good fit Use it for failing tests, reported bugs, production incidents, environment differences, and behavior that does not match the expected contract.

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

Made for: Claude Code.

Or install forge-skills, the plugin that ships this one along with the rest of its 42 skills, 36 commands, 1 hook.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/aneja5/forge-skills/debugging-and-recovery"><img src="https://agentmods.dev/badge/skills/aneja5/forge-skills/debugging-and-recovery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 805 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.
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.00056 $0.00805
Opus 5 $0.00028 $0.00402
Sonnet 5 $0.00011 $0.00161
Haiku 4.5 $0.00006 $0.00081

Measured 6d ago against content hash a7cd104c6fc1, 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-recovery 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 6d 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-and-recovery/SKILL.md · 93 lines

How it starts

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

Debugging and Recovery

Overview

Reproduce → localize → fix → guard. Never guess at root cause. The fix is not done until a regression test guards it. For bugs with GitHub issues, see triage-issue for the full investigation + issue creation flow.

When to Use

  • Something broke or behaves unexpectedly
  • A test is failing and the cause is not obvious
  • A bug has been reported and needs diagnosis before a fix
  • An error is ambiguous — multiple possible causes

When NOT to Use

  • The fix is obvious and well-understood — just implement with tdd
  • The bug is a missing feature, not broken behavior — use spec-driven-development
  • You want to preemptively prevent bugs — use code-review-and-quality

Common Rationalizations

Thought Reality
"I know what the bug is" You think you do. Reproduce it first.
"I'll just try this fix and see" Untested fixes introduce new bugs
"The root cause is obvious from the stack trace" Stack traces show symptoms, not causes
"A unit test would be too hard to write for this" Write an integration test — the behavior is observable
"The fix is one line, no test needed" One-line bugs are re-introduced in one line

Red Flags

  • Fixing before reproducing — you might be fixing the wrong thing
  • Fix that passes all tests but doesn't change observable behavior
  • No regression test added — the bug will return
  • Root cause described as "it just wasn't working" — not a cause
  • Fix modifies more than what the bug report describes

Core Process

Step 1: Reproduce

Get the minimal reproduction: exact steps, inputs, environment. If you can't reproduce it, you don't understand it. Run the failing scenario manually or via test before writing any fix.

Step 2: Write a failing test

Before fixing:

RED: Write a test that reproduces the bug
     → The test must fail
     → If it passes, your reproduction is wrong

The test proves you understand the bug.

Step 3: Localize

Read the full file on GitHub · 93 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. 6d ago First seen · 93 lines · 56 tokens per session scan A a7cd104c6fc1

Subscribe to this mod's changes

debugging-and-recovery is a skill published in the GitHub repository aneja5/forge-skills (3 stars, last pushed 3mo ago), licensed MIT. It adds 56 tokens to every session and 805 once invoked, about $0.0003 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.