Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add fusengine/agents --skill rust-error-handlinggit clone --depth 1 https://github.com/fusengine/agentsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/fusengine/agents/rust-error-handling)<a href="https://agentmods.dev/skills/fusengine/agents/rust-error-handling"><img src="https://agentmods.dev/badge/skills/fusengine/agents/rust-error-handling/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/fusengine/agents/rust-error-handling"><img src="https://agentmods.dev/badge/skills/fusengine/agents/rust-error-handling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00021 | $0.01118 |
| Opus 5.5 | $0.00008 | $0.00447 |
| Sonnet 5.5 | $0.00004 | $0.00224 |
| Haiku 4.5 | $0.00002 | $0.00112 |
Grade A, and why
rust-error-handling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.
It also covers the recoverable-errors-vs-panics decision — Result for anything a caller could reasonably recover from, panic!/unwrap/expect reserved for broken invariants — and the rule that anyhow::Error must never leak into a library's public API.
Out of scope: general ownership/borrowing design belongs to rust-core-language; async-runtime-specific error handling is not covered here.
Rust Error Handling
The consensus split: thiserror for libraries, anyhow for applications. A library
exposes a typed error its callers can match; an application wants one ergonomic error
type and rich context. Getting this boundary right is the whole discipline.
Agent Workflow (MANDATORY)
- fuse-ai-pilot:explore-codebase — is this crate a library (published API, other code depends on it) or a binary/application? That answer picks the tool.
- fuse-ai-pilot:research-expert — confirm current
thiserror/anyhowAPI before writing derives (verification chain: fuse-browser fast-path ondocs.rs/thiserroranddocs.rs/anyhow→ Context7 → Exa). - After writing, run fuse-ai-pilot:sniper and
cargo clippy.
The rule
| Crate kind | Tool | Why |
|---|---|---|
| Library (others depend on it) | thiserror |
Typed enum, #[derive(Error)], callers can match on variants |
| Application (binary, top level) | anyhow |
anyhow::Result<T>, ? everywhere, .context() for breadcrumbs |
| Simple / dep-free | hand-written std::error::Error |
No dependency when one or two variants suffice |
Critical Rules
- Never expose
anyhow::Errorin a library's public API. It erases the type, so callers cannot match or handle specific failures. Return a typedenumerror. thiserror is designed to not appear in your public API — switching to/from a hand-written impl is not a breaking change. - Applications use
anyhow; libraries usethiserror. Do not pullanyhowinto a reusable library's signatures. - Add context at each layer in application code:
.context("...")/.with_context(|| ...)turns "No such file or directory" into a traceable chain. #[from]for zero-boilerplate conversion, so?lifts a source error into your enum.#[from]implies#[source]— never write both.- Errors are values; panics are bugs. Use
Resultfor anything a caller could reasonably recover from. Reservepanic!/unwrap/expectfor broken invariants.
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago Changed 8a3ec75c6d85
- 3mo ago First seen · 89 lines · 21 tokens per session scan A 4fd3253bbf34
rust-error-handling is a skill published in the GitHub repository fusengine/agents (34 stars, last pushed 1mo ago), licensed MIT. It adds 21 tokens to every session and 1,118 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
rust-error-handling compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| rust-error-handlingfusengine/agents | Skill | 34 | 1mo ago | MIT | A | 21 | Claude Code |
| polarsK-Dense-AI/scientific-agent-skills | Skill | 60k | 4d ago | MIT | A | 47 | Claude Code |
| pinocchio-developmentsendaifun/skills | Skill | 129 | 4mo ago | Apache-2.0 | A | 44 | Claude Code, Codex |
| building-telegram-botsisvlasov/rageatc-oss | Skill | 10 | 4mo ago | MIT | A | 68 | Claude Code |
| pennylaneK-Dense-AI/scientific-agent-skills | Skill | 60k | 4d ago | MIT | A | 74 | Claude Code |
| architectoliver-kriska/claude-elixir-phoenix | Skill | 580 | today | MIT | A | 47 | Claude Code |
| phx-documentoliver-kriska/claude-elixir-phoenix | Skill | 580 | today | MIT | A | 50 | Claude Code, Codex |