Agent skill
Global Error Handling
Implement robust error handling with user-friendly messages, specific exception types, centralized handling, and graceful degradation. Use this skill when adding try-catch blocks, error boundaries, or exception handling. When creating custom error types or exception classes. When deciding where to handle errors (controller vs. service layer). When writing user-facing error messages. When implementing retry logic with exponential backoff. When ensuring resources are cleaned up in finally blocks or equivalent patterns.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/global-error-handling
SKILL.md
When to use this skill:
- When adding try-catch blocks or error handling code
- When creating custom error or exception classes
- When deciding where to catch and handle errors
- When writing error messages that users will see
- When implementing centralized error handling at API boundaries
- When designing systems to degrade gracefully on failure
- When implementing retry strategies for external service calls
- When using exponential backoff for transient failures
- When ensuring resources (connections, file handles) are cleaned up
- When validating inputs and failing fast with clear messages
- When choosing between specific and generic exception types
- When reviewing code for proper error handling patterns
Global Error Handling
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle global error handling.
Instructions
For details, refer to the information provided in this file: global error handling
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?