skills/danielpodolsky/error-handling-gate/SKILL.md
Verify errors are handled gracefully with meaningful user feedback. Issues result in WARNINGS.
npx skillsauth add aiskillstore/marketplace error-handling-gateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"Happy path code is easy. Error handling is where senior engineers shine."
This gate ensures the code handles failures gracefully, provides meaningful feedback to users, and doesn't silently swallow errors.
"What happens if [main operation] fails? Walk me through the user experience."
Looking for:
Example scenarios:
"What does the user see when an error occurs? Would they understand what to do next?"
Looking for:
"How would you debug this in production if something went wrong?"
Looking for:
✅ ERROR HANDLING GATE: PASSED
Error handling looks solid:
- Async operations properly wrapped
- User-friendly error messages
- Errors logged for debugging
Moving to the next gate...
⚠️ ERROR HANDLING GATE: WARNING
Found [X] error handling concerns:
**Issue 1: [Empty catch block / Missing error handling]**
Location: `file.ts:42`
Question: "What happens when this fails silently?"
**Issue 2: [Technical error shown to user]**
Location: `file.ts:88`
Question: "Will users understand 'TypeError: Cannot read property...'?"
**Issue 3: [No loading state cleanup]**
Location: `file.ts:100`
Question: "What happens to the loading spinner if this fails?"
These should be addressed to ensure a good user experience.
❌ try {
await submitForm();
} catch (error) {
// Silent failure - user has no idea
}
✅ try {
await submitForm();
} catch (error) {
console.error('Form submission failed:', error);
setError('Could not submit. Please try again.');
}
❌ try {
setLoading(true);
await fetchData();
setLoading(false);
} catch (error) {
handleError(error);
// Loading stays true forever!
}
✅ try {
setLoading(true);
await fetchData();
} catch (error) {
handleError(error);
} finally {
setLoading(false);
}
❌ catch (error) {
setError(error.message);
// User sees: "TypeError: Cannot read property 'map' of undefined"
}
✅ catch (error) {
console.error('Load failed:', error);
setError('Something went wrong. Please try again.');
}
❌ catch (error) {
setError('Error');
}
✅ catch (error) {
if (error.status === 401) {
setError('Please log in to continue.');
redirectToLogin();
} else if (error.status === 404) {
setError('Item not found.');
} else if (error.name === 'NetworkError') {
setError('Check your internet connection.');
} else {
setError('Something went wrong. Please try again.');
}
}
Instead of pointing out the fix, ask:
| Bad Message | Better Message | |-------------|----------------| | "Error" | "Could not save. Please try again." | | "An error occurred" | "Unable to load your profile. Check your connection." | | "TypeError: undefined" | "Something went wrong. Please refresh and try again." | | "500 Internal Server Error" | "Our servers are having trouble. Please try again in a moment." | | "Failed" | "Could not complete your request. Need help? Contact support." |
| Issue | Severity | Impact | |-------|----------|--------| | Empty catch block | HIGH | Silent failures, hard to debug | | No loading state cleanup | MEDIUM | Stuck UI, poor UX | | Technical error shown | MEDIUM | Confusing UX, potential info leak | | No retry option | LOW | Minor UX friction | | Generic error message | LOW | Less helpful but not broken |
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.