
Error handling
Gives agents patterns for typed errors, retries, circuit breakers and user-facing failure
Error handling is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 66
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Error handling
This skill is a reference guide for handling failures in TypeScript, Python and Go applications. It walks through designing domain error classes with status codes and machine-readable codes, using a no-throw Result style for expected failures, and building API error handlers for frameworks such as Next.js, Express and FastAPI. It also includes a React error boundary example and a Go pattern using sentinel errors with wrapping.
Beyond the language-specific sections, the skill covers retries with exponential backoff and jitter, retrying only transient failures rather than client errors. It recommends mapping internal error codes to friendly user text while logging full context on the server, and ends with a pre-merge checklist for error handling changes.
The skill contains no scripts. It is instructional text that the agent applies when writing or reviewing code, so it works with whatever languages and frameworks the project already uses.
When your agent uses it
Patterns for robust error handling across TypeScript, Python, and Go. Covers typed errors, error boundaries, retries, circuit breakers, and user-facing error messages. Use when designing error types, retries, circuit breakers, or user-facing failure messages in TypeScript, Python, or Go.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (11 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the rea-skills plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add smartworldarafath/REA_Skill
/plugin install rea-skills@smartworldarafathOr copy only this skill to ~/.claude/skills/error-handling:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/error-handling &&
cp -R "$tmp/.agents/skills/error-handling" ~/.claude/skills/error-handling &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/error-handling inside it instead.
Copy the skill folder to ~/.agents/skills/error-handling to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/error-handling &&
cp -R "$tmp/.agents/skills/error-handling" ~/.agents/skills/error-handling &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/error-handling inside it instead.
Copy the skill folder to ~/.cursor/skills/error-handling to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/error-handling &&
cp -R "$tmp/.agents/skills/error-handling" ~/.cursor/skills/error-handling &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/error-handling inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/smartworldarafath/REA_Skill.git --path .agents/skills/error-handlingOr copy the folder to ~/.gemini/skills/error-handling yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/error-handling:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/error-handling &&
cp -R "$tmp/.agents/skills/error-handling" ~/.copilot/skills/error-handling &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/error-handling inside it instead.
Get the folder:
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.gitThen copy REA_Skill/.agents/skills/error-handling into your agent's skills folder as error-handling. Agents that support SKILL.md read one folder per skill.
What it does
- Typed error hierarchies
- Base and subclassed error classes that carry a code, HTTP status and optional details.
- Result pattern
- A no-throw return type for operations where failure is common, such as parsing or external calls.
- API error handlers
- Patterns for mapping errors to a consistent JSON envelope in Next.js, Express and FastAPI.
- Retry with backoff
- A retry helper using exponential delay with jitter and a condition for which errors to retry.
- User-facing messages
- Guidance for translating error codes into friendly text without exposing internal details.
- Go error wrapping
- Sentinel errors, wrapping with context and switching on error type in HTTP handlers.
- Review checklist
- A pre-merge checklist covering silent catches, logging, envelopes and retry behavior.
Good for
- Design custom error classes for a new service module
- Add exponential backoff retries to calls to an unreliable API
- Standardize error responses across my REST endpoints
- Write friendly error messages for end users of a web app
- Review a pull request for silently swallowed exceptions
- Wrap Go errors with context and map them to HTTP status codes
Error handling FAQ
What languages does the skill cover?
TypeScript and JavaScript, Python, and Go, with examples for Next.js, Express, FastAPI, React and chi-style Go handlers.
Does Error handling run any code or scripts?
No. The skill contains no scripts; it is a set of written patterns and examples the agent follows.
When does Error handling trigger?
When designing error types, retries, circuit breakers or user-facing failure messages in TypeScript, Python or Go.
Does Error handling cover circuit breakers?
The description names circuit breakers as a topic, but the provided SKILL.md contains retry examples and no circuit breaker implementation.
How do I install Error handling in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/error-handling to use it in all your projects, or to .claude/skills/error-handling in one project. Or install the rea-skills plugin, which includes it: /plugin marketplace add smartworldarafath/REA_Skill, then /plugin install rea-skills@smartworldarafath.
Does Error handling run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Error handling?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Error handling?
The closest alternatives to Error handling are API design, Backend patterns, API SDK generator, TypeScript best practices and Poka yoke.
Where this comes from
- Description: from the skill's own SKILL.md.
More from smartworldarafath/REA_Skill

Guides building and auditing UI to WCAG 2.2 AA across web, iOS and Android
- Open source
- 66 GitHub stars
- Developer tools

Diagnoses agent and LLM stacks for hidden failures and ranks the fixes by severity
- Open source
- 66 GitHub stars
- Developer tools

Compare coding agents head-to-head on your own tasks by pass rate, cost and time
- Open source
- 66 GitHub stars
- Developer tools

Guides an agent to design tool sets, observations and error recovery for better completion
- Open source
- 66 GitHub stars
- Developer tools

Gives an agent a structured capture-diagnose-recover loop for failing runs
- Open source
- 66 GitHub stars
- Developer tools

Lets an AI agent make x402 payments within per-task budgets and spending policies
- Open source
- 66 GitHub stars
- Finance and payments



