Agent skill

Error Handling

by EpicenterHQ in EpicenterHQ/epicenter

Apply Wellcrafted Result patterns to fallible operations and preserve failures at boundaries.

Custom licenceAuto-check passedDevelopment

Install Error Handling

skills CLI
$ npx skills add EpicenterHQ/epicenter --skill error-handling -a claude-code

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

GitHub CLI
$ gh skill install EpicenterHQ/epicenter error-handling --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/EpicenterHQ/epicenter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/error-handling .claude/skills/error-handling && 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
GitHub stars
4.8k
Token cost
~1.4k tokens
SKILL.md length
681 words
Files
4 (incl. references)
Skills in repo
65
Repo updated
First seen
Licence
Custom licence

At a glance

Apply Wellcrafted Result patterns to fallible operations and preserve failures at boundaries.

  • Works in 5 steps: The function's throw-versus-Result… → The wrapper covers one coherent failure… → Caught values become typed errors,… → …
  • Replacing try/catch
  • SKILL.md covers Source Of Truth, Choose The Contract First, Cross a deliberate throwing… and Consume Every Possible Err…, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Error Handling is an agent skill from EpicenterHQ/epicenter. Apply Wellcrafted Result patterns to fallible operations and preserve failures at boundaries. Use when replacing try/catch, adding trySync or tryAsync, choosing fallback or propagation, or mapping errors.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/http-boundaries.md`, `references/toast-on-error.md` and `references/wrapping-boundaries.md`).

It sits in Development, covering Error handling. The repository describes itself as: Open-source, local-first apps.

When your agent uses it

  • Replacing try/catch
  • Choosing fallback

Example prompts

  • “/error-handling”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. The function's throw-versus-Result contract is explicit.
  2. The wrapper covers one coherent failure meaning.
  3. Caught values become typed errors, intentional fallbacks, or selective rethrows.
  4. Every possible Err branch is handled, forwarded, logged, presented, or explicitly ignored by a named best-effort owner.
  5. Unknown bugs still reach the appropriate crash or framework error boundary.

What it can do on your machine

Read from SKILL.md and the folder at commit 5b4bb69. 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

    Links to these hosts (documentation or services it may open):

    • github.com

    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 loads about 1.4k tokens when it runs, and up to ~3.6k if it reads all its reference files. Until then it costs about 55 tokens; SKILL.md has 681 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.6k

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

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 681 words (~1,424 tokens).

“This skill owns the boundary between thrown exceptions and Result values, plus correct Result consumption. Compose with define-errors for variant design, logging for diagnostics, query-layer for RPC presentation, and hono for response APIs.”

— opening of SKILL.md by EpicenterHQ, Custom licence
name
error-handling
metadata.author
epicenter
metadata.version
3.1

Read the full SKILL.md on GitHub

Files

SKILL.md and 3 other files (references) in .agents/skills/error-handling of EpicenterHQ/epicenter.

  • SKILL.md
  • references/http-boundaries.md
  • references/toast-on-error.md
  • references/wrapping-boundaries.md

Open the folder on GitHubat commit 5b4bb69

Compare with similar skills

Error Handling 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 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Error Handling this skillEpicenterHQ/epicenter4.8k—~1.4kAutomated safety check: PassCustom licence
Mole Bug Patternstw93/Mole70k—~2kAutomated safety check: PassGPL-3.0
Native Data FetchingCherryHQ/cherry-studio-app4k6 repos~2.9kAutomated safety check: NotesMIT
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT
R Function Input Validationtidyverse/dplyr5.1k1 repos~2.3kAutomated safety check: PassCustom licence
Next Best Practicesvercel-labs/openreview1.7k18 repos~1kAutomated safety check: PassNone

Similar skills

  • A catalog of recurring bug shapes in the Mole Mac cleaner, used to review safety-sensitive diffs for deletion safety, unbounded commands, shell traps and weak tests.

    70k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed
  • 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
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Validates arguments of exported R functions with the standalone check_* type checkers from rlang, in tidyverse style with clear error messages.

    5.1k GitHub starsUsed in 1 repo~2.3k tokens
    DevelopmentAuto-check passed
  • Next Best Practices

    vercel-labs/openreview

    Official

    Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

    1.7k GitHub starsUsed in 18 repos~1k tokens
    DevelopmentAuto-check passed
  • Error Handling

    microsoft/data-formulator

    Official

    统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用. An agent skill from microsoft/data-formulator.

    18k GitHub stars~3.8k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from EpicenterHQ/epicenter

All 65 skills in this repo
  • Agent Instructions

    EpicenterHQ/epicenter

    Write and maintain repository guidance across AGENTS.md, CLAUDE.md, and .agents/skills.

    4.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Consult Claude

    EpicenterHQ/epicenter

    Assign Claude Code a read-only investigation, recommendation, or finished text draft.

    4.8k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Better Auth security hardening: rate limits, secrets, CSRF, trusted origins, cookies, sessions, OAuth tokens, and audit logging.

    4.8k GitHub stars~896 tokensUpdated today
    Auto-check passed
  • Cohesion Over Testability

    EpicenterHQ/epicenter

    Collapse test-shaped production boundaries while preserving behavior and coverage.

    4.8k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Collapse Pass

    EpicenterHQ/epicenter

    Remove indirection that does not earn its boundary across a diff or package.

    4.8k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Factory Function Composition

    EpicenterHQ/epicenter

    Factory function patterns to compose clients and services. An agent skill from EpicenterHQ/epicenter.

    4.8k GitHub stars~3k tokensUpdated today
    Auto-check passed

Categories

Questions about Error Handling

What does Error Handling do?

Apply Wellcrafted Result patterns to fallible operations and preserve failures at boundaries. Error Handling is an agent skill from EpicenterHQ/epicenter. Apply Wellcrafted Result patterns to fallible operations and preserve failures at boundaries.

When should I use Error Handling?

Error Handling fits situations like: replacing try/catch; choosing fallback.

How do I install Error Handling in Claude Code?

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

How do I install Error Handling in Codex?

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

Can I use Error Handling 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 EpicenterHQ/epicenter --skill error-handling -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, .gemini/skills/error-handling, .github/skills/error-handling and .opencode/skills/error-handling in your project.

What does Error Handling need to run?

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

Does Error Handling access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Error Handling 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 use?

Error Handling has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Error Handling use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.2k tokens, read only when the agent opens those files.

What are the alternatives to Error Handling?

Skills that share tags, products or a category with Error Handling: Mole Bug Patterns (tw93/Mole, 70k stars), Native Data Fetching (CherryHQ/cherry-studio-app, 4k stars), Rust Best Practices (farm-fe/farm, 5.6k stars) and R Function Input Validation (tidyverse/dplyr, 5.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?

EpicenterHQ (a GitHub organization) maintains it in EpicenterHQ/epicenter, which has 4,821 GitHub stars. The repository holds 65 skills in this directory. The repository was last updated on October 8, 2026.

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