Agent skill · writing content · aiskillstore
error-handling-fundamentals
Auto-invoke when reviewing try/catch blocks, API error responses, async operations, or user feedback patterns. Enforces graceful degradation and meaningful error messages.
Why this skill is useful
Codifies error handling best practices and standards that the AI could infer but now doesn't have to guess.
What it needs
About 4k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Error Handling Fundamentals Review "Errors are not failures — they're information. Handle them like the valuable data they are." When to Apply Activate this skill when reviewing: try/catch blocks Promise chains (.then/.catch) API error responses Form validation Network request handling User-facing error messages --- Review Checklist Error Catching [ ] No empty catches: Is every catch block doing something meaningful? [ ] Proper scope: Are errors caught at the right level? [ ] Context added: Do errors include helpful debugging info? [ ] Finally used: Are cleanup operations in finally blocks? User Experience [ ] User-friendly messages: Will users understand the error? [ ] No technical details exposed: Are stack traces hidden from users? [ ] Actionable feedback: Does the error tell users what to do next? [ ] Graceful degradation: Does the app still work partially on error? Logging & Debugging [ ] Errors logged: Are errors recorded for debugging? [ ] Context in logs: Do logs include request ID, user ID, etc.? [ ] Severity levels: Are critical errors distinguished from warnings? Recovery [ ] Retry logic: Should this operation retry on failure? [ ] Fallback values: Is there a sensible default on error? [ ] Loading states: Is the user informed while retrying? --- Common Mistakes (Anti-Patterns) 1. The Empty Catch (The Silent Killer) 2. Catching Too Early 3. Generic Error Messages 4. Leaking Stack Traces 5. Forgetting Finally --- Socratic Questions Ask the junior these questions instead of giving answers: 1. Empty Catch: "What happens if this fails silently?" 2. User Message: "If you were the user, would this message help you?" 3. Recovery: "Should we retry this automatically?" 4. Scope: "Is this the right place to catch this error?" 5. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/error-handling-fundamentals