Agent skill

Error Handling Fundamentals

by DanielPodolsky in DanielPodolsky/ownyourcode

Guides error handling for async operations and API calls. An agent skill from DanielPodolsky/ownyourcode.

MITAuto-check passedDevelopment

Install Error Handling Fundamentals

skills CLI
$ npx skills add DanielPodolsky/ownyourcode --skill error-handling-fundamentals -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install DanielPodolsky/ownyourcode error-handling-fundamentals --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/DanielPodolsky/ownyourcode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/fundamentals/error-handling .claude/skills/error-handling-fundamentals && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
error-handling-fundamentals
GitHub stars
290
Used in
1 other repo
Token cost
~1.5k tokens
SKILL.md length
412 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

Guides error handling for async operations and API calls. An agent skill from DanielPodolsky/ownyourcode.

  • Works in 5 steps: The Empty Catch (The Silent Killer) → Catching Too Early → Generic Error Messages → …
  • Junior asks what if this fails
  • SKILL.md covers When to Apply, Review Checklist, Common Mistakes (Anti-Patterns) and Socratic Questions, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Error Handling Fundamentals is an agent skill from DanielPodolsky/ownyourcode. Guides error handling for async operations and API calls. Use when junior asks "what if this fails", "handle errors", "try catch", "network error", or builds features with fetch, promises, or external services.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Error handling and Debugging. The repository describes itself as: Claude Code workflow for AI-mentored development. Work efficiently with Spec-Driven Development and the 6 Gates. Built to fight cognitive offloading — for developers using AI to… The licence is MIT.

When your agent uses it

  • Junior asks what if this fails
  • Builds features with fetch
  • External services

Example prompts

  • “what if this fails”
  • “handle errors”
  • “try catch”
  • “/error-handling-fundamentals”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. The Empty Catch (The Silent Killer)
  2. Catching Too Early
  3. Generic Error Messages
  4. Leaking Stack Traces
  5. Forgetting Finally

What it can do on your machine

Read from SKILL.md and the folder at commit bd1f17c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Error Handling Fundamentals loads about 1.5k tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 412 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from DanielPodolsky/ownyourcode at commit bd1f17c, republished under its MIT licence (© DanielPodolsky). 412 words, ~1,520 tokens.

Download SKILL.mdSave it as .claude/skills/error-handling-fundamentals/SKILL.md (or your agent's skills folder).
name
error-handling-fundamentals
description
Guides error handling for async operations and API calls. Use when junior asks "what if this fails", "handle errors", "try catch", "network error", or builds features with fetch, promises, or external services.

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)
❌ try {
     await submitForm();
   } catch (error) {
     // TODO: handle later (never happens)
   }

✅ try {
     await submitForm();
   } catch (error) {
     console.error('Form submission failed:', error);
     setError('Could not submit. Please try again.');
   }
2. Catching Too Early
❌ function getUser(id) {
     try {
       return database.query(id);
     } catch {
       return null; // Caller has no idea it failed
     }
   }

✅ function getUser(id) {
     return database.query(id); // Let caller decide
   }

   // In UI layer
   try {
     const user = await getUser(id);
   } catch (error) {
     showToast('Could not load user');
   }
3. Generic Error Messages
❌ catch (error) {
     setError('An error occurred');
   }

✅ catch (error) {
     if (error.code === 'NETWORK_ERROR') {
       setError('Check your internet connection');
     } else if (error.code === 'NOT_FOUND') {
       setError('User not found');
     } else {
       setError('Something went wrong. Please try again.');
     }
   }
4. Leaking Stack Traces
❌ res.status(500).json({
     error: error.message,
     stack: error.stack
   });

✅ logger.error('Request failed', { error, requestId });
   res.status(500).json({
     error: 'Something went wrong'
   });
5. Forgetting Finally
❌ 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); // Always runs
   }

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. Logging: "How will you debug this in production?"

Show full SKILL.md (152 more words)Show less

Error Message Guidelines

Do
  • Be specific: "The email address is already registered"
  • Be helpful: "Please check your internet connection"
  • Offer next steps: "Try again" or "Contact support"
  • Match severity: Critical errors need more attention than warnings
Don't
  • Show technical details: TypeError: Cannot read property 'map' of undefined
  • Be vague: "An error occurred"
  • Blame the user: "You entered invalid data"
  • Use jargon: "HTTP 500 Internal Server Error"

Error Handling Patterns

API/Network Errors
typescript
async function fetchWithRetry(url: string, retries = 3): Promise<Response> {
  try {
    const response = await fetch(url);
    if (!response.ok) {
      throw new Error(`HTTP ${response.status}`);
    }
    return response;
  } catch (error) {
    if (retries > 0) {
      await sleep(1000);
      return fetchWithRetry(url, retries - 1);
    }
    throw error;
  }
}
Form Validation
typescript
function validateForm(data: FormData) {
  const errors: Record<string, string> = {};

  if (!data.email) {
    errors.email = 'Email is required';
  } else if (!isValidEmail(data.email)) {
    errors.email = 'Please enter a valid email';
  }

  return {
    isValid: Object.keys(errors).length === 0,
    errors
  };
}
React Error Boundaries
typescript
class ErrorBoundary extends React.Component {
  state = { hasError: false };

  static getDerivedStateFromError(error) {
    return { hasError: true };
  }

  componentDidCatch(error, info) {
    logError(error, info);
  }

  render() {
    if (this.state.hasError) {
      return <FallbackUI />;
    }
    return this.props.children;
  }
}

Standards Reference

See detailed patterns in:

  • /standards/global/error-handling.md

Red Flags to Call Out

FlagQuestion to Ask
Empty catch block"What happens when this fails?"
catch (e) { return null }"How will the caller know it failed?"
No loading state"What does the user see while waiting?"
Technical error shown"Will the user understand this message?"
No finally for cleanup"Is loading state stuck on error?"
console.log instead of error"How will you find this in production logs?"

© DanielPodolsky, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/fundamentals/error-handling of DanielPodolsky/ownyourcode.

Open the folder on GitHubat commit bd1f17c

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in DanielPodolsky/ownyourcode, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Error Handling Fundamentals next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Error Handling Fundamentals compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Error Handling Fundamentals this skillDanielPodolsky/ownyourcode2901 repos~1.5kAutomated safety check: PassMIT
Native Data FetchingCherryHQ/cherry-studio-app4k6 repos~2.9kAutomated safety check: NotesMIT
Python Script Runnercongchuanling-dot/Cohort182—~577Automated safety check: NotesMIT
Smart File Writerforyourhealth111-pixel/Vibe-Skills3.6k—~2.6kAutomated safety check: PassApache-2.0
Golang Samber Oopscontext-labs/whip1.1k1 repos~2.6kAutomated safety check: PassMIT
Error Recovery Patternsgithub/gh-aw5.4k—~824Automated safety check: PassMIT

Similar skills

  • Native Data Fetching

    CherryHQ/cherry-studio-app

    A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.

    4k GitHub starsUsed in 6 repos~2.9k tokens
    DevelopmentAuto-check: notes
  • Python Script Runner

    congchuanling-dot/Cohort

    Runs a Python script with checks first: confirms the interpreter version, compiles it for syntax errors, verifies imports, then explains any traceback in plain language.

    182 GitHub stars~577 tokensUpdated 1 mo ago
    DevelopmentAuto-check: notes
  • Smart File Writer

    foryourhealth111-pixel/Vibe-Skills

    Diagnoses why a file write failed (permissions, disk space, path length, locks, read-only mounts) before retrying, instead of repeating the same call blindly.

    3.6k GitHub stars~2.6k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Golang Samber Oops

    context-labs/whip

    Structured error handling in Golang with samber/oops — error builders, stack traces, codes, context, wrapping, attributes, user-facing vs developer messages, panic recovery, logger integration.

    1.1k GitHub starsUsed in 1 repo~2.6k tokens
    DevelopmentAuto-check passed
  • Official

    Design gh-aw error handling, retry, recovery, and debugging flows.

    5.4k GitHub stars~824 tokensUpdated today
    DevelopmentAuto-check passed
  • Code Debugging

    lingzhi227/agent-research-skills

    Debug experiment code with structured error analysis. An agent skill from lingzhi227/agent-research-skills.

    390 GitHub stars~672 tokensUpdated 7 mo ago
    DevelopmentAuto-check passed

More from DanielPodolsky/ownyourcode

All 19 skills in this repo
  • Accessibility Fundamentals

    DanielPodolsky/ownyourcode

    Reviews accessibility including WCAG, ARIA, keyboard navigation.

    290 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Backend Fundamentals

    DanielPodolsky/ownyourcode

    Reviews API design, REST conventions, and backend architecture.

    290 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Database Fundamentals

    DanielPodolsky/ownyourcode

    Reviews schema design, SQL queries, ORM patterns. An agent skill from DanielPodolsky/ownyourcode.

    290 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Documentation Fundamentals

    DanielPodolsky/ownyourcode

    Guides documentation standards including READMEs, JSDoc, and code comments.

    290 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Frontend Fundamentals

    DanielPodolsky/ownyourcode

    Reviews React/Vue component architecture, state, and hooks. An agent skill from DanielPodolsky/ownyourcode.

    290 GitHub starsUsed in 1 repo~874 tokens
    Auto-check passed
  • Performance Fundamentals

    DanielPodolsky/ownyourcode

    Reviews performance including N+1 queries, re-renders, scalability.

    290 GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed

Categories

Questions about Error Handling Fundamentals

What does Error Handling Fundamentals do?

Guides error handling for async operations and API calls. An agent skill from DanielPodolsky/ownyourcode. Error Handling Fundamentals is an agent skill from DanielPodolsky/ownyourcode. Guides error handling for async operations and API calls.

When should I use Error Handling Fundamentals?

Error Handling Fundamentals fits situations like: junior asks what if this fails; builds features with fetch; external services.

How do I install Error Handling Fundamentals in Claude Code?

Run `npx skills add DanielPodolsky/ownyourcode --skill error-handling-fundamentals -a claude-code`. Or copy the skill folder (.claude/skills/fundamentals/error-handling in DanielPodolsky/ownyourcode) into .claude/skills/error-handling-fundamentals in your project. Claude Code loads it when a task matches its description.

How do I install Error Handling Fundamentals in Codex?

Run `npx skills add DanielPodolsky/ownyourcode --skill error-handling-fundamentals -a codex`. Or copy the skill folder (.claude/skills/fundamentals/error-handling in DanielPodolsky/ownyourcode) into .agents/skills/error-handling-fundamentals in your project. Codex loads it when a task matches its description.

Can I use Error Handling Fundamentals in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add DanielPodolsky/ownyourcode --skill error-handling-fundamentals -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/error-handling-fundamentals, .gemini/skills/error-handling-fundamentals, .github/skills/error-handling-fundamentals and .opencode/skills/error-handling-fundamentals in your project.

What does Error Handling Fundamentals need to run?

SKILL.md names no scripts, command-line tools or credentials: Error Handling Fundamentals is instructions for the agent only.

Does Error Handling Fundamentals access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Error Handling Fundamentals safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Error Handling Fundamentals use?

Error Handling Fundamentals is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Error Handling Fundamentals use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Error Handling Fundamentals?

Skills that share tags, products or a category with Error Handling Fundamentals: Native Data Fetching (CherryHQ/cherry-studio-app, 4k stars), Python Script Runner (congchuanling-dot/Cohort, 182 stars), Smart File Writer (foryourhealth111-pixel/Vibe-Skills, 3.6k stars) and Golang Samber Oops (context-labs/whip, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Error Handling Fundamentals?

DanielPodolsky (a GitHub user) maintains it in DanielPodolsky/ownyourcode, which has 290 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on June 27, 2026.

Source: DanielPodolsky/ownyourcode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.