Agent skill

Error Handling

by celeriant in celeriant/celeriant-db

Error handling patterns in Celeriant. An agent skill from celeriant/celeriant-db.

Apache-2.0Auto-check passedDevelopment

Install Error Handling

skills CLI
$ npx skills add celeriant/celeriant-db --skill error-handling -a claude-code

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

GitHub CLI
$ gh skill install celeriant/celeriant-db 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/celeriant/celeriant-db.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/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
114
Token cost
~550 tokens
SKILL.md length
209 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
Apache-2.0

At a glance

Error handling patterns in Celeriant. An agent skill from celeriant/celeriant-db.

  • Works in 4 steps: Add a variant with typed fields to the… → Write manual From impl if it converts… → Add the mapping in error_to_response()… → …
  • Creating new error types
  • SKILL.md covers Typed Enum Variants, Not Strings, No thiserror, Conversion Chain and Client Boundary, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Error Handling is an agent skill from celeriant/celeriant-db. Error handling patterns in Celeriant. Typed enum variants over strings, manual From impls, no thiserror. Use when creating new error types, handling errors, or converting errors to client responses.

Its SKILL.md is about 550 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. The repository describes itself as: Fast, distributed per-aggregate event log with strict ordering and optimistic concurrency control. The licence is Apache-2.0.

When your agent uses it

  • Creating new error types
  • Handling errors
  • Converting errors to client responses

Example prompts

  • “/error-handling”

Workflow steps

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

  1. Add a variant with typed fields to the appropriate error enum
  2. Write manual From impl if it converts from a lower-level error
  3. Add the mapping in error_to_response() if it can reach clients
  4. Pick the right error code from error_codes.rs

What it can do on your machine

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

    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 loads about 550 tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 209 words of instructions outside code blocks.

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

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 celeriant/celeriant-db at commit d071a6d, republished under its Apache-2.0 licence (© celeriant). 209 words, ~550 tokens.

Download SKILL.mdSave it as .claude/skills/error-handling/SKILL.md (or your agent's skills folder).
name
error-handling
description
Error handling patterns in Celeriant. Typed enum variants over strings, manual From impls, no thiserror. Use when creating new error types, handling errors, or converting errors to client responses.

Error Handling

Typed Enum Variants, Not Strings

Every error is a typed enum variant with typed fields carrying contextual data. Callers match on variants and use the fields to make decisions. No string parsing.

rust
// This is what errors look like here
ShardWriteError::OptimisticConcurrencyViolation {
    expected_version: u64,
    current_aggregate_version: u64,
}

Strings are acceptable for: I/O errors, catch-all infrastructure failures where you can't enumerate the cases, and wrapping errors that don't implement Clone/Send (common with glommio and io_uring error types).

No thiserror

thiserror encourages #[error("...")] string formatting at creation time, losing structured data. We use manual From implementations instead. They make error flow explicit, preserve typed data through the chain, and only convert to strings at the client boundary.

Conversion Chain

std::io::Error / GlommioError / bincode::Error
            -> RotatingLogError / WireFormatError
            -> ShardCacheError / ShardFsyncError
            -> ShardReadError / ShardWriteError
            -> ShardError
            -> ErrorResponse (to client, via error_to_response())

Only use ? (auto-From) when context is preserved. If two different calls in the same function produce the same error type, convert explicitly so you know which one failed.

Client Boundary

All errors sent to clients become ErrorResponse { correlation_id, error_code, error_message }. String formatting happens here and nowhere else. Error codes are defined in celeriant_msg/src/error_codes.rs. The conversion lives in celeriant_runtimes/src/sharded/connection_handler.rs.

Adding a New Error

  1. Add a variant with typed fields to the appropriate error enum
  2. Write manual From impl if it converts from a lower-level error
  3. Add the mapping in error_to_response() if it can reach clients
  4. Pick the right error code from error_codes.rs

© celeriant, Apache-2.0. 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/error-handling of celeriant/celeriant-db.

Open the folder on GitHubat commit d071a6d

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 skillceleriant/celeriant-db114—~550Automated safety check: PassApache-2.0
Native Data FetchingCherryHQ/cherry-studio-app4k6 repos~2.9kAutomated safety check: NotesMIT
Zodjasonjgardner/blockbench-mcp-plugin4883 repos~1.4kAutomated safety check: PassGPL-3.0
Akka.NET Best PracticesAaronontheweb/dotnet-skills1.2k1 repos~3.3kAutomated safety check: PassMIT
Windmill Rust Backend Patternswindmill-labs/windmill18k—~869Automated safety check: PassCustom licence
Rust SkillsJMBeresford/retrom2.1k1 repos~9.5kAutomated 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
  • Zod

    jasonjgardner/blockbench-mcp-plugin

    Zod schema validation best practices for type safety, parsing, and error handling.

    488 GitHub starsUsed in 3 repos~1.4k tokens
    DevelopmentAuto-check passed
  • Akka.NET Best Practices

    Aaronontheweb/dotnet-skills

    Guidance for Akka.NET actor systems covering EventStream versus DistributedPubSub, supervision, Props versus DependencyResolver, work distribution and testable cluster code.

    1.2k GitHub starsUsed in 1 repo~3.3k tokens
    DevelopmentAuto-check passed
  • Windmill Rust Backend Patterns

    windmill-labs/windmill

    Sets Rust conventions for the Windmill backend: error types, SQLx queries, JSON handling, async rules, module layout and rust-analyzer navigation.

    18k GitHub stars~869 tokensUpdated today
    DevelopmentAuto-check passed
  • Rust Skills

    JMBeresford/retrom

    Comprehensive Rust coding guidelines with 265 rules across 26 categories.

    2.1k GitHub starsUsed in 1 repo~9.5k tokens
    DevelopmentAuto-check passed
  • Rust Skills

    noh-rs/nohrs

    Comprehensive Rust coding guidelines with 179 rules across 14 categories.

    156 GitHub stars~5.3k tokensUpdated 5 days ago
    DevelopmentAuto-check passed

More from celeriant/celeriant-db

All 13 skills in this repo
  • Testing

    celeriant/celeriant-db

    How to write and run tests in Celeriant. An agent skill from celeriant/celeriant-db.

    114 GitHub stars~951 tokensUpdated 9 days ago
    Auto-check passed
  • Understanding Celeriant Structure

    celeriant/celeriant-db

    Celeriant codebase architecture, crate responsibilities, and how they fit together.

    114 GitHub stars~803 tokensUpdated 9 days ago
    Auto-check passed
  • Extract A Type

    celeriant/celeriant-db

    Refactor a named Rust type or its surrounding code with an agreed scope.

    114 GitHub stars~934 tokensUpdated 9 days ago
    Auto-check passed
  • Client Server Protocol

    celeriant/celeriant-db

    Celeriant's client-server protocol invariants, network behavior, failure modes, and shard routing.

    114 GitHub stars~1.6k tokensUpdated 9 days ago
    Auto-check passed
  • Database Architecture

    celeriant/celeriant-db

    Core architecture invariants for Celeriant. An agent skill from celeriant/celeriant-db.

    114 GitHub stars~1.5k tokensUpdated 9 days ago
    Auto-check passed
  • Glommio Locking Patterns

    celeriant/celeriant-db

    Locking patterns for Glommio's single-threaded async executors.

    114 GitHub stars~876 tokensUpdated 9 days ago
    Auto-check passed

Questions about Error Handling

What does Error Handling do?

Error handling patterns in Celeriant. An agent skill from celeriant/celeriant-db. Error Handling is an agent skill from celeriant/celeriant-db. Error handling patterns in Celeriant.

When should I use Error Handling?

Error Handling fits situations like: creating new error types; handling errors; converting errors to client responses.

How do I install Error Handling in Claude Code?

Run `npx skills add celeriant/celeriant-db --skill error-handling -a claude-code`. Or copy the skill folder (.claude/skills/error-handling in celeriant/celeriant-db) 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 celeriant/celeriant-db --skill error-handling -a codex`. Or copy the skill folder (.claude/skills/error-handling in celeriant/celeriant-db) 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 celeriant/celeriant-db --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 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 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 is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Error Handling use?

About 550 tokens (SKILL.md is roughly 2.2k 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?

Skills that share tags, products or a category with Error Handling: Native Data Fetching (CherryHQ/cherry-studio-app, 4k stars), Zod (jasonjgardner/blockbench-mcp-plugin, 488 stars), Akka.NET Best Practices (Aaronontheweb/dotnet-skills, 1.2k stars) and Windmill Rust Backend Patterns (windmill-labs/windmill, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Error Handling?

celeriant (a GitHub organization) maintains it in celeriant/celeriant-db, which has 114 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on September 28, 2026.

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