Agent skill

Define Errors

by EpicenterHQ in EpicenterHQ/epicenter

defineErrors from wellcrafted: variant factories, extractErrorMessage, InferErrors/InferError, call site patterns.

Custom licenceAuto-check passed

Install Define Errors

skills CLI
$ npx skills add EpicenterHQ/epicenter --skill define-errors -a claude-code

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

GitHub CLI
$ gh skill install EpicenterHQ/epicenter define-errors --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/define-errors .claude/skills/define-errors && 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
define-errors
GitHub stars
4.8k
Token cost
~3.2k tokens
SKILL.md length
989 words
Files
1
Skills in repo
64
Repo updated
First seen
Licence
Custom licence

At a glance

defineErrors from wellcrafted: variant factories, extractErrorMessage, InferErrors/InferError, call site patterns.

  • Works in 5 steps: Simple variant: no input, static message → Variant with structured fields: message… → Variant with cause: extractErrorMessage… → …
  • Creating error types
  • SKILL.md covers Import, Core Rules, Patterns and Type Extraction, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Define Errors is an agent skill from EpicenterHQ/epicenter. defineErrors from wellcrafted: variant factories, extractErrorMessage, InferErrors/InferError, call site patterns. Use when creating error types or reviewing error patterns.

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

The repository describes itself as: Open-source, local-first apps.

When your agent uses it

  • Creating error types
  • Reviewing error patterns

Example prompts

  • “Use the define-errors skill to defineerror from wellcrafted: variant factories, extractErrorMessage, InferErrors/InferError, call site patterns”
  • “/define-errors”

Workflow steps

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

  1. Simple variant: no input, static message
  2. Variant with structured fields: message computed from input
  3. Variant with cause: extractErrorMessage inside the factory
  4. Multiple variants in one object: discriminated union built-in
  5. Domain errors with specific operation failures

What it can do on your machine

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

Define Errors loads about 3.2k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 989 words of instructions outside code blocks.

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

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 989 words (~3,164 tokens).

“Ground API claims in the official wellcrafted-dev/wellcrafted source and tests for Epicenter's installed version. This skill owns variant construction, naming, fields, and type extraction. error-handling owns catch adaptation and Result consumption; logging owns diagnostic severity and sinks.”

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

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .agents/skills/define-errors of EpicenterHQ/epicenter.

Open the folder on GitHubat commit f9441c8

Compare with similar skills

Define Errors 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.

Define Errors compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Define Errors this skillEpicenterHQ/epicenter4.8k—~3.2kAutomated safety check: PassCustom licence
Error Handlingaffaan-m/ECC274k1 repos~2.7kAutomated safety check: PassMIT
Error Handlingthedaviddias/Front-End-Checklist74k—~416Automated safety check: PassMIT
Error Handlingaffaan-m/ECC274k—~2.4kAutomated safety check: PassMIT
N8n Error Handlingsickn33/agentic-awesome-skills47k1 repos~4.9kAutomated safety check: PassMIT
Error Handling Patternswshobson/agents40k10 repos~1kAutomated safety check: PassMIT

Similar skills

  • Error Handling

    affaan-m/ECC

    Patterns for robust error handling across TypeScript, Python, and Go.

    274k GitHub starsUsed in 1 repo~2.7k tokens
    DevelopmentAuto-check passed
  • Error Handling

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing scripts, client components, bundles, or runtime behavior related to Implement proper error handling.

    74k GitHub stars~416 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Error Handling

    affaan-m/ECC

    TypeScript、Python、Goにわたる堅牢なエラー処理のパターン。型付きエラー、エラー境界、リトライ、サーキットブレーカー、ユーザー向けエラーメッセージをカバーします。

    274k GitHub stars~2.4k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • N8n Error Handling

    sickn33/agentic-awesome-skills

    Design visible, structured, recoverable n8n failures using error outputs, retries, Error Trigger workflows, and HTTP error responses.

    47k GitHub starsUsed in 1 repo~4.9k tokens
    Productivity & AutomationAuto-check passed
  • Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications.

    40k GitHub starsUsed in 10 repos~1k tokens
    DevelopmentAuto-check passed
  • Factory MCP

    warpdotdev/warp

    Use the Warp Factory MCP to hand work to a software factory and collaborate with it — bundle local work and send it to the cloud, find factory tasks from a Slack thread / Linear ticket /…

    65k GitHub starsUsed in 1 repo~237 tokens
    Agent WorkflowsAuto-check passed

More from EpicenterHQ/epicenter

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

    Get Claude Code's second opinion on a proposal or implementation.

    4.8k GitHub stars~1.5k 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
  • Error Handling

    EpicenterHQ/epicenter

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

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

Questions about Define Errors

What does Define Errors do?

defineErrors from wellcrafted: variant factories, extractErrorMessage, InferErrors/InferError, call site patterns. Define Errors is an agent skill from EpicenterHQ/epicenter. defineErrors from wellcrafted: variant factories, extractErrorMessage, InferErrors/InferError, call site patterns.

When should I use Define Errors?

Define Errors fits situations like: creating error types; reviewing error patterns.

How do I install Define Errors in Claude Code?

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

How do I install Define Errors in Codex?

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

Can I use Define Errors 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 define-errors -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/define-errors, .gemini/skills/define-errors, .github/skills/define-errors and .opencode/skills/define-errors in your project.

What does Define Errors need to run?

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

Does Define Errors 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 Define Errors 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 Define Errors use?

Define Errors 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 Define Errors use?

About 3.2k tokens (SKILL.md is roughly 13k 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 Define Errors?

Skills that share tags, products or a category with Define Errors: Error Handling (affaan-m/ECC, 274k stars), Error Handling (thedaviddias/Front-End-Checklist, 74k stars), Error Handling (affaan-m/ECC, 274k stars) and N8n Error Handling (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Define Errors?

EpicenterHQ (a GitHub organization) maintains it in EpicenterHQ/epicenter, which has 4,818 GitHub stars. The repository holds 64 skills in this directory. The repository was last updated on October 7, 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.