Error Handling Patterns
Strategies for handling errors: exceptions, error types, recovery strategies, and error propagation.
Install
/plugin marketplace add sethdford/claude-skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add sethdford/claude-skills --skill error-handling-patternsgit clone --depth 1 https://github.com/sethdford/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/engineer/code-quality/skills/error-handling-patterns ~/.claude/skills/error-handling-patternsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Error Handling Patterns Systematic approaches to error management that preserve debuggability and recovery. ## Context You are helping the engineer design error handling. If code is provided, assess whether errors are explicit, catchable, and recoverable. Poor error handling is a hidden time bomb in production. ## Domain Context - **Fail Fast, Fail Loud**: Don't swallow exceptions; propagate or handle explicitly - **Specific Exceptions**: Throw specific exception types; generic Exception hides intent - **Recovery Strategy**: Can the caller recover? If not, don't catch; let it propagate - **Error Context**: Include relevant data in exceptions (user ID, operation, state) - **Logging**: Log _why_ an error occurred, not just that it occurred ## Instructions 1. **Identify Error Boundaries**: Where can things fail? Network, parsing, database, arithmetic? 2. **Choose Exception Type**: Specific > generic; InvalidUserException > Exception 3. **Include Context**: Add user ID, operation, state to exception messages 4. **Plan Recovery**: If you catch an error, can you recover? If not, don't catch it 5. **Document Throws**: Declare checked exceptions or document unchecked ones 6. **Test Error Paths**: Write tests for error cases; normal cases hide error bugs 7. **Avoid Silent Failures**: Never catch and ignore; at minimum log 8. **Use Error Enums**: For recoverable errors, use Result<T, Error> or Either types ## Anti-Patterns
Details
- Skill name
error-handling-patterns- Repository
- sethdford/claude-skills
- Path
engineer/code-quality/skills/error-handling-patterns/SKILL.md- License
- MIT
- Repo updated
- 11 March 2026
FAQ
What does the Error Handling Patterns skill do?
Strategies for handling errors: exceptions, error types, recovery strategies, and error propagation.
How do I install the Error Handling Patterns skill?
Claude Code plugin: /plugin marketplace add sethdford/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Error Handling Patterns popular?
It lives in sethdford/claude-skills, which has 48 GitHub stars and 10 forks.
Related skills
A B Test Design
48sethdford/claude-skills
Design rigorous A/B tests with hypotheses, variants, metrics, and sample size calculations.
A B Test Design Pm
48sethdford/claude-skills
Analytics and experimentation skill for product managers.
Abuse Case Design
48sethdford/claude-skills
Design abuse cases (negative use cases) showing how attackers misuse system features. Use when identifying attacks that exploit intended functionality or business logic flaws.
Escaped Defect Analysis
48sethdford/claude-skills
Expert approach to escaped-defect-analysis in quality measurement. Use when working with .
Design Token Audit
48sethdford/claude-skills
Audit design token usage across a product for consistency and coverage.
Event Sourcing
48sethdford/claude-skills
Store state as immutable event log instead of current values. Build auditable, event-driven systems with full history. Use when auditability, temporal queries, or event-driven processing matters.
Browse the most popular Claude skills, all other skills, or write your own with the skills generator.