debugging-and-error-recovery

debugging-and-error-recovery is a skill for Claude Code, Codex from addyosmani/agent-skills. It costs 67 tokens per session (2,444 once invoked), scanned A, original, MIT.

A step-by-step guide for finding the underlying cause of failed tests, broken builds, runtime bugs, and other unexpected errors.

In plain words
What is it for?
Use it to reproduce failures, preserve logs and error details, fix the root cause, and check that the problem does not return.
Why use it?
It prevents guesswork and stops new work from building on an unresolved problem.

Skill for Claude CodeCodex

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

Part of the agent-skills plugin — 25 skills, 10 commands, 4 agents, 1 hook shipped together

Good fit Use it to reproduce failures, preserve logs and error details, fix the root cause, and check that the problem does not return.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/addyosmani/agent-skills/debugging-and-error-recovery
About the project

addyosmani/agent-skills is a collection of reusable workflows, quality checks, commands, and other instructions that guide AI coding agents through software development. It is for developers who want agents to follow consistent engineering practices, and the catalogue entries are its packaged skills, commands, agents, plugins, instructions, and hooks.

addyosmani/agent-skills · 93,102 stars · on GitHub · skills.addy.ie

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 addyosmani/agent-skills --skill debugging-and-error-recovery
Clone the repo
git clone --depth 1 https://github.com/addyosmani/agent-skills

Made for: Claude Code, Codex.

Or install agent-skills, the plugin that ships this one along with the rest of its 25 skills, 10 commands, 4 agents, 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-error-recovery

README.md
[![agentmods](https://agentmods.dev/badge/skills/addyosmani/agent-skills/debugging-and-error-recovery/github.svg)](https://agentmods.dev/skills/addyosmani/agent-skills/debugging-and-error-recovery)
Your own site
<a href="https://agentmods.dev/skills/addyosmani/agent-skills/debugging-and-error-recovery"><img src="https://agentmods.dev/badge/skills/addyosmani/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/addyosmani/agent-skills/debugging-and-error-recovery"><img src="https://agentmods.dev/badge/skills/addyosmani/agent-skills/debugging-and-error-recovery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,444 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
  • Socket pass 4 Apr 2026
  • Snyk pass 4 Apr 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
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.00067 $0.02444
Opus 5 $0.00034 $0.01222
Sonnet 5 $0.00013 $0.00489
Haiku 4.5 $0.00007 $0.00244

Measured today against content hash 21f3960f5d7a, 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 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 today.

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.

Origin

Copies of this mod

8 near-identical copies found in the catalogue:

skills/debugging-and-error-recovery/SKILL.md · 301 lines

How it starts

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

Debugging and Error Recovery

Overview

Systematic debugging with structured triage. When something breaks, stop adding features, preserve evidence, and follow a structured process to find and fix the root cause. Guessing wastes time. The triage checklist works for test failures, build errors, runtime bugs, and production incidents.

When to Use

  • Tests fail after a code change
  • The build breaks
  • Runtime behavior doesn't match expectations
  • A bug report arrives
  • An error appears in logs or console
  • Something worked before and stopped working

The Stop-the-Line Rule

When anything unexpected happens:

1. STOP adding features or making changes
2. PRESERVE evidence (error output, logs, repro steps)
3. DIAGNOSE using the triage checklist
4. FIX the root cause
5. GUARD against recurrence
6. RESUME only after verification passes

Don't push past a failing test or broken build to work on the next feature. Errors compound. A bug in Step 3 that goes unfixed makes Steps 4-6 wrong.

The Triage Checklist

Work through these steps in order. Do not skip steps.

Step 1: Reproduce

Make the failure happen reliably. If you can't reproduce it, you can't fix it with confidence.

Can you reproduce the failure?
├── YES → Proceed to Step 2
└── NO
    ├── Gather more context (logs, environment details)
    ├── Try reproducing in a minimal environment
    └── If truly non-reproducible, document conditions and monitor

When a bug is non-reproducible:

Cannot reproduce on demand:
├── Timing-dependent?
│   ├── Add timestamps to logs around the suspected area
│   ├── Try with artificial delays (setTimeout, sleep) to widen race windows
│   └── Run under load or concurrency to increase collision probability
├── Environment-dependent?
│   ├── Compare Node/browser versions, OS, environment variables
│   ├── Check for differences in data (empty vs populated database)
│   └── Try reproducing in CI where the environment is clean
├── State-dependent?
│   ├── Check for leaked state between tests or requests
│   ├── Look for global variables, singletons, or shared caches
│   └── Run the failing scenario in isolation vs after other operations
└── Truly random?
    ├── Add defensive logging at the suspected location
    ├── Set up an alert for the specific error signature
    └── Document the conditions observed and revisit when it recurs

Read the full file on GitHub · 301 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. today Changed · +14 tokens per session 21f3960f5d7a
  2. 10d ago First seen · 301 lines · 53 tokens per session scan A 67ce2c9442da

Subscribe to this mod's changes

debugging-and-error-recovery is a skill published in the GitHub repository addyosmani/agent-skills (93,102 stars, last pushed yesterday), licensed MIT. It adds 67 tokens to every session and 2,444 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-08-30.

Related

Other skills, from other repositories

error-handling

Graceful degradation and meaningful error messages. Errors are first-class citizens, not afterthoughts. Every error path is designed, not discovered.

DevelopersGlobal/ai-agent-skills · 32 tokens

debugging-and-error-recovery

Guides systematic root-cause debugging with hard rules against guess-fixes and symptom suppression. Use when tests fail, builds break, behavior doesn't match expectations, or you encounter any unexpected error. Triggers on "this is broken", "tests are failing", "why doesn't this work", or any error output.

borhen68/SkillEngine · 69 tokens

debugging-and-error-recovery

A systematic debugging procedure for finding the underlying cause of failed tests, broken builds, bugs, and unexpected behavior. It emphasizes reproducing the problem, preserving evidence, fixing the cause, and checking the fix.

vinvcn/addyosmani-agent-skills-zh · 57 tokens

debugging-methodology

Systematic root cause analysis for production and development bugs. Hypothesis-driven debugging — never guess-and-check.

DevelopersGlobal/ai-agent-skills · 26 tokens

performance-optimization

Measure first, optimize second. Data-driven performance improvements with before/after benchmarks and production validation.

DevelopersGlobal/ai-agent-skills · 23 tokens

marker-bug-to-fix

Take one Marker.io bug report and produce a ready-to-review code fix. Use when asked to fix, investigate, reproduce, or find the root cause of a specific Marker.io issue in the current repository. Pulls the issue's screenshot, console errors, network requests and DOM, locates the cause in code, proposes a minimal…

marker-io/mcp-skills · 80 tokens