Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Error

ASecurity

Verifies error handling including empty catch detection, user-friendly messages, and logging. WARNING gate triggered during /own:done flow.

280 stars
0 votes
0 copies
2 views
Added 2/8/2026
developmentgodebuggingapidatabase

Works with

cliapi

Security Analysis

A100/100

Scanned 2/10/2026

Install to Claude Code

$npx -y skills add DanielPodolsky/ownyourcode --skill error --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Error?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Error
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/danielpodolsky-error/badge)](https://www.skillsdirectory.com/skills/danielpodolsky-error)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: error-handling-gate
description: Verifies error handling including empty catch detection, user-friendly messages, and logging. WARNING gate triggered during /own:done flow.
---

# Gate 3: Error Handling Review

> "Happy path code is easy. Error handling is where senior engineers shine."

## Purpose

This gate ensures the code handles failures gracefully, provides meaningful feedback to users, and doesn't silently swallow errors.

## Gate Status

- **PASS** — Error handling is appropriate
- **WARNING** — Issues found that should be addressed

---

## Gate Questions

### Question 1: Failure Scenario
> "What happens if [main operation] fails? Walk me through the user experience."

**Looking for:**
- Awareness of failure modes
- User-friendly error messages
- Recovery options (retry, fallback)
- No silent failures

**Example scenarios:**
- Network request fails
- Database is down
- Validation fails
- Third-party API errors

### Question 2: User Feedback
> "What does the user see when an error occurs? Would they understand what to do next?"

**Looking for:**
- Helpful, non-technical messages
- Actionable guidance ("Try again", "Check your connection")
- Appropriate error placement in UI

### Question 3: Error Visibility
> "How would you debug this in production if something went wrong?"

**Looking for:**
- Errors are logged
- Sufficient context in logs
- No sensitive data in logs
- Error tracking awareness (Sentry, etc.)

---

## Error Handling Checklist

### Async Operations
- [ ] All async calls wrapped in try/catch or .catch()
- [ ] No empty catch blocks
- [ ] Errors include context (what operation, what data)
- [ ] finally blocks for cleanup (loading states, etc.)

### User Experience
- [ ] User-friendly error messages (no technical jargon)
- [ ] Errors are actionable (what can user do?)
- [ ] Loading states cleared on error
- [ ] Retry options where appropriate

### Logging & Debugging
- [ ] Errors logged with context
- [ ] No sensitive data in error logs
- [ ] Error types/codes for categorization
- [ ] Stack traces available in development

### Edge Cases
- [ ] Empty states handled
- [ ] Timeout handling
- [ ] Partial failure handling (some items succeed, some fail)
- [ ] Concurrent request handling

---

## Response Templates

### If PASS

```
✅ 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...
```

### If WARNING

```
⚠️ 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.
```

---

## Common Issues to Check

### 1. Empty Catch Blocks
```
❌ 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.');
   }
```

### 2. Missing Finally for Cleanup
```
❌ 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);
   }
```

### 3. Technical Errors Exposed
```
❌ 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.');
   }
```

### 4. No Error Differentiation
```
❌ 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.');
     }
   }
```

---

## Socratic Error Questions

Instead of pointing out the fix, ask:

1. "What happens if the network is down when the user clicks this?"
2. "If this catch block runs, what will the user see?"
3. "How will you know this failed in production?"
4. "What if only some of the items fail to save?"
5. "Is the loading spinner stuck if an error happens?"

---

## Error Message Quality Check

| 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." |

---

## Severity Guide

| 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 |

Attribution

DanielPodolskyDanielPodolsky
View sourceMore from DanielPodolsky →
SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

284722 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2192 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

9881 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →