error-handling-and-resilience

error-handling-and-resilience is a skill for Claude Code from aneja5/forge-skills. It costs 50 tokens per session (1,307 once invoked), scanned A, original, MIT.

A project guide for deciding how software should respond when something fails. It covers error types, retries, time limits, circuit breakers, reduced-service behavior, user messages, and recovery after irreversible actions.

In plain words
What is it for?
Use it when designing services, adding database or API calls, reviewing error handling, or responding to incidents caused by unhandled failures.
Why use it?
It prevents failures from being silently ignored or handled differently in different parts of a system. It gives developers a shared approach to temporary outages, bad input, and failed external services.

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 when designing services, adding database or API calls, reviewing error handling, or responding to incidents caused by unhandled failures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aneja5/forge-skills/error-handling-and-resilience
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 error-handling-and-resilience
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 error-handling-and-resilience

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/aneja5/forge-skills/error-handling-and-resilience"><img src="https://agentmods.dev/badge/skills/aneja5/forge-skills/error-handling-and-resilience.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,307 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.00050 $0.01307
Opus 5 $0.00025 $0.00654
Sonnet 5 $0.00010 $0.00261
Haiku 4.5 $0.00005 $0.00131

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

Security

Grade A, and why

error-handling-and-resilience 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 8d 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.

- `fetch(url)` with no timeout, no AbortController, no deadline
skills/error-handling-and-resilience/SKILL.md · 109 lines

How it starts

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

Error Handling and Resilience

Overview

Define the project's failure philosophy before failures happen. Output is .forge/error-handling.md — an error-class taxonomy, retry and timeout discipline, circuit breaker policy, graceful degradation paths, user-facing error message rules, and rollback/compensation patterns for irreversible flows. Downstream skills (observability, incident-response-and-postmortems) consume this file.

When to Use

  • A new service is being designed and needs an error model before code lands
  • An incident revealed a silently-swallowed failure
  • External calls (DB, API, queue, LLM) are being added to a hot path
  • Code review is flagging inconsistent error handling across modules
  • Production logs are full of unclassified errors with no caller action

When NOT to Use

  • The codebase already has a documented error taxonomy and the change is local to one module
  • One-off scripts or throwaway prototypes
  • The work is a config tweak with no failure surface

Common Rationalizations

Thought Reality
"try-catch is enough" Bare catch swallows context. Without classification, the same handler runs for transient DB blips and bad user input.
"We'll add retries later" Retries are architectural — adding them after the fact requires every caller to change.
"Errors are rare" Rare errors in production are the ones that page you at 3am. They're rare because they require specific conditions, not because they don't matter.
"Just log and continue" Silent failures compound. Downstream code now sees inconsistent state and no signal that something went wrong.
"External call without timeout is fine, the library has defaults" Library defaults are usually 30s-infinity. Your user is gone in 8 seconds.
"Retry forever, eventually it'll work" Retry storms amplify outages. Without a cap, you DDoS yourself.

Red Flags

  • try { ... } catch (e) {} — empty catch
  • console.log(err); return — log and continue without classification
  • while (true) { try { ... } catch { } } — unbounded retry
  • if (err.message.includes("not found")) — string-matching errors
  • Promise without .catch or async function without try
  • fetch(url) with no timeout, no AbortController, no deadline
  • No distinction between transient (retry) and permanent (escalate) failures
  • "Error handling: TBD" anywhere in a contract

Read the full file on GitHub · 109 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. 8d ago First seen · 109 lines · 50 tokens per session scan A dd1354a6f0e7

Subscribe to this mod's changes

error-handling-and-resilience is a skill published in the GitHub repository aneja5/forge-skills (3 stars, last pushed 3mo ago), licensed MIT. It adds 50 tokens to every session and 1,307 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

tidewave-integration

Tidewave MCP runtime tools — debugging, smoke testing, live state inspection, SQL queries, hex docs. Use when evaluating code in a running Phoenix app.

oliver-kriska/claude-elixir-phoenix · 38 tokens

perf

Analyze Elixir/Phoenix performance — N+1 queries, assign bloat, ecto optimization, genserver bottlenecks. Use when slowness, timeouts, or high memory reported.

oliver-kriska/claude-elixir-phoenix · 43 tokens

eve

Build durable backend AI agents with the eve framework. Use when creating, editing, or debugging an eve project — agent instructions, skills, tools, connections, channels, sandboxes, subagents, schedules, or evals.

ComposioHQ/composio · 47 tokens

add-cloud-flow

Integrates Power Automate cloud flows into a Power Pages site. Lists available flows, suggests relevant ones based on intent, identifies scenarios and web roles, creates metadata files, and generates client-side code to call flows. Handles both new flow registration and adding already-registered flows to additional…

microsoft/power-platform-skills · 91 tokens

integrate-webapi

Integrates Power Pages Web API into a site's frontend code with proper permissions and deployment. Orchestrates the full integration lifecycle: code integration, table permissions setup, and deployment for Dataverse CRUD operations. Use when the user wants to add Web API calls, connect to Dataverse, or add data…

microsoft/power-platform-skills · 69 tokens

azure-messaging

Troubleshoot and resolve issues with Azure Messaging SDKs for Event Hubs and Service Bus. Covers connection failures, authentication errors, message processing issues, and SDK configuration problems. WHEN: event hub SDK error, service bus SDK issue, messaging connection failure, AMQP error, event processor host issue…

microsoft/skills · 178 tokens