Agent skill

Rust Error Handling

by Jxck in Jxck/sptth

A skill your agent uses when changing Rust code paths that return errors or log failures.

MITAuto-check passedDevelopment

Install Rust Error Handling

skills CLI
$ npx skills add Jxck/sptth --skill rust-error-handling -a claude-code

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

GitHub CLI
$ gh skill install Jxck/sptth rust-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/Jxck/sptth.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/rust-error-handling .claude/skills/rust-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
rust-error-handling
GitHub stars
133
Token cost
~298 tokens
SKILL.md length
134 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when changing Rust code paths that return errors or log failures.

  • Works in 4 steps: Add context at I/O and boundary calls → Use bail! for validation failures with… → Keep logs structured and… → …
  • Changing Rust code paths that return errors
  • SKILL.md covers Goal, Principles, Patterns and Checklist
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Rust Error Handling is an agent skill from Jxck/sptth. Use when changing Rust code paths that return errors or log failures. Ensures errors are actionable, consistent, and safe.

Its SKILL.md is about 300 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. It works with Rust. The repository describes itself as: reverse https proxy (https <- sptth) for local development. The licence is MIT.

When your agent uses it

  • Changing Rust code paths that return errors
  • Tasks that involve Error handling

Example prompts

  • “/rust-error-handling”

Workflow steps

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

  1. Add context at I/O and boundary calls
  2. Use bail! for validation failures with explicit reason.
  3. Keep logs structured and component-scoped (DNS, PROXY, TLS, etc.).
  4. Return typed status at boundaries (for HTTP/DNS behavior) and retain internal error cause.

What it can do on your machine

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

    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

Rust Error Handling loads about 298 tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 134 words of instructions outside code blocks.

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

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 Jxck/sptth at commit cd865e2, republished under its MIT licence (© Jxck). 134 words, ~298 tokens.

Download SKILL.mdSave it as .claude/skills/rust-error-handling/SKILL.md (or your agent's skills folder).
name
rust-error-handling
description
Use when changing Rust code paths that return errors or log failures. Ensures errors are actionable, consistent, and safe.

rust-error-handling Skill

Use this skill when changing Rust code paths that return errors or log failures.

Goal

Keep errors actionable, consistent, and easy to debug without leaking sensitive data.

Principles

  • Prefer anyhow::Context to add operation + resource context.
  • Keep top-level error messages short and user-facing.
  • Preserve root causes in chained errors.
  • Avoid swallowing errors silently.
  • Do not include secrets/keys/tokens in error text.

Patterns

  1. Add context at I/O and boundary calls:
    • file open/read/write
    • socket bind/send/recv
    • process execution
  2. Use bail! for validation failures with explicit reason.
  3. Keep logs structured and component-scoped (DNS, PROXY, TLS, etc.).
  4. Return typed status at boundaries (for HTTP/DNS behavior) and retain internal error cause.

Checklist

  • Error path explains what failed and where.
  • Caller receives enough info to act.
  • Logs are useful at info/debug/error levels.
  • No sensitive material is printed.

© Jxck, 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 skills/rust-error-handling of Jxck/sptth.

Open the folder on GitHubat commit cd865e2

Compare with similar skills

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

Rust Error Handling compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rust Error Handling this skillJxck/sptth133—~298Automated safety check: PassMIT
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT
Rust Async Patternsdiodeme/Gold-Band14310 repos~3.1kAutomated safety check: PassAGPL-3.0
SeekDB Code Reviewoceanbase/seekdb3.1k—~2.1kAutomated safety check: PassApache-2.0
Rust Engineerfarm-fe/farm5.6k1 repos~1.5kAutomated safety check: PassMIT
Cross-Language Coding Standardszereight/gitlab-mcp2k1 repos~1.4kAutomated safety check: PassMIT

Similar skills

  • 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
  • Rust Async Patterns

    diodeme/Gold-Band

    Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns.

    143 GitHub starsUsed in 10 repos~3.1k tokens
    DevelopmentAuto-check passed
  • SeekDB Code Review

    oceanbase/seekdb

    Reviews seekdb pull requests and diffs for real defects in correctness, resources, concurrency, security and tests, reporting only Blocker or Major findings.

    3.1k GitHub stars~2.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Rust Engineer

    farm-fe/farm

    Writes, reviews, and debugs idiomatic Rust code with memory safety and zero-cost abstractions.

    5.6k GitHub starsUsed in 1 repo~1.5k tokens
    DevelopmentAuto-check passed
  • Shared reference for naming, function size, complexity and error handling rules that reviewer agents apply across TypeScript, Python, Go, Rust, Java, C# and Swift.

    2k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Handling Rust Errors

    hashintel/hash

    HASH error handling patterns using error-stack crate. An agent skill from hashintel/hash.

    1.7k GitHub stars~1k tokensUpdated today
    DevelopmentAuto-check passed

More from Jxck/sptth

  • Rust Testing

    Jxck/sptth

    A skill your agent uses when adding or modifying tests. An agent skill from Jxck/sptth.

    133 GitHub stars~293 tokensUpdated 7 mo ago
    Auto-check passed
  • Sptth Dev

    Jxck/sptth

    A skill your agent uses when making code or documentation changes in this repository.

    133 GitHub stars~280 tokensUpdated 7 mo ago
    Auto-check passed
  • Update Version

    Jxck/sptth

    Update project versions and release tag in one consistent flow (Cargo.toml, xtask, docs, and git tag).

    133 GitHub stars~660 tokensUpdated 7 mo ago
    Auto-check passed
  • Use before merging security-relevant Rust changes. An agent skill from Jxck/sptth.

    133 GitHub stars~318 tokensUpdated 7 mo ago
    Auto-check passed
  • Health Check

    Jxck/sptth

    Run a repository-wide maintenance pass before merge/release.

    133 GitHub stars~801 tokensUpdated 7 mo ago
    Auto-check passed

Works with

Categories

Questions about Rust Error Handling

What does Rust Error Handling do?

A skill your agent uses when changing Rust code paths that return errors or log failures. Rust Error Handling is an agent skill from Jxck/sptth. Use when changing Rust code paths that return errors or log failures.

When should I use Rust Error Handling?

Rust Error Handling fits situations like: changing Rust code paths that return errors; tasks that involve Error handling.

How do I install Rust Error Handling in Claude Code?

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

How do I install Rust Error Handling in Codex?

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

Can I use Rust 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 Jxck/sptth --skill rust-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/rust-error-handling, .gemini/skills/rust-error-handling, .github/skills/rust-error-handling and .opencode/skills/rust-error-handling in your project.

What does Rust Error Handling need to run?

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

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

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

About 298 tokens (SKILL.md is roughly 1.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 Rust Error Handling?

Skills that share tags, products or a category with Rust Error Handling: Rust Best Practices (farm-fe/farm, 5.6k stars), Rust Async Patterns (diodeme/Gold-Band, 143 stars), SeekDB Code Review (oceanbase/seekdb, 3.1k stars) and Rust Engineer (farm-fe/farm, 5.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rust Error Handling?

Jxck (a GitHub user) maintains it in Jxck/sptth, which has 133 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on February 25, 2026.

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