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 VersoXBT/claude-initial-setup --skill error-handling-rustgit clone --depth 1 https://github.com/VersoXBT/claude-initial-setupWrote 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/versoxbt/claude-initial-setup/error-handling-rust)<a href="https://agentmods.dev/skills/versoxbt/claude-initial-setup/error-handling-rust"><img src="https://agentmods.dev/badge/skills/versoxbt/claude-initial-setup/error-handling-rust/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/versoxbt/claude-initial-setup/error-handling-rust"><img src="https://agentmods.dev/badge/skills/versoxbt/claude-initial-setup/error-handling-rust.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00062 | $0.01955 |
| Opus 5 | $0.00031 | $0.00978 |
| Sonnet 5 | $0.00012 | $0.00391 |
| Haiku 4.5 | $0.00006 | $0.00196 |
Grade A, and why
error-handling-rust 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 8d 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 — 259 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust Error Handling
Handle errors idiomatically in Rust using Result, Option, the ? operator,
and well-structured custom error types for robust, composable error propagation.
When to Use
- Designing error types for a library or application
- Propagating errors with the ? operator
- Converting between error types with From
- Choosing between thiserror (libraries) and anyhow (applications)
- Handling Option and Result in method chains
Core Patterns
Pattern 1: Result and the ? Operator
Use Result<T, E> for operations that can fail. The ? operator unwraps
success or returns the error early.
use std::fs;
use std::io;
fn read_config(path: &str) -> Result<Config, io::Error> {
let content = fs::read_to_string(path)?; // returns Err early if fails
let config: Config = serde_json::from_str(&content)
.map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?;
Ok(config)
}
// Chain multiple fallible operations
fn process_file(path: &str) -> Result<Summary, AppError> {
let content = fs::read_to_string(path)?; // io::Error -> AppError via From
let data = parse_data(&content)?; // ParseError -> AppError via From
let summary = analyze(&data)?; // AnalyzeError -> AppError via From
Ok(summary)
}
Pattern 2: Custom Error Types with thiserror
Use thiserror for library error types with automatic Display and From implementations.
use thiserror::Error;
#[derive(Debug, Error)]
pub enum StorageError {
#[error("item not found: {id}")]
NotFound { id: String },
#[error("duplicate key: {key}")]
DuplicateKey { key: String },
#[error("connection failed after {attempts} attempts")]
ConnectionFailed { attempts: u32 },
#[error("serialization error")]
Serialization(#[from] serde_json::Error),
#[error("I/O error")]
Io(#[from] std::io::Error),
}
// Usage
fn get_item(id: &str) -> Result<Item, StorageError> {
let data = fs::read_to_string(format!("data/{id}.json"))?; // auto-converts io::Error
let item: Item = serde_json::from_str(&data)?; // auto-converts serde error
Ok(item)
}
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.
- 8d ago First seen · 259 lines · 62 tokens per session scan A e10a1196ab18
error-handling-rust is a skill published in the GitHub repository VersoXBT/claude-initial-setup (4 stars, last pushed 4mo ago), licensed MIT. It adds 62 tokens to every session and 1,955 once invoked, about $0.0003 per session on Opus 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.
Other skills, from other repositories
sota-rust
State-of-the-art Rust engineering (2026) for writing and auditing Rust code. Covers idiomatic ownership and API design, error handling and panic policy, unsafe discipline with Miri, async/tokio (cancellation safety, structured concurrency, graceful shutdown), security and supply chain (cargo audit/deny/vet, integer…
implement
Use in the Implement phase whenever writing or editing production Java code, or fixing a bug, in a Spring/Spring Boot project. Enforces test-first (red-green-refactor), executes the approved plan step by step, and honors the project's path-scoped tech-stack rules and the task's enforcement set. Preloaded into…
rust_expert
Systems programming with Rust. Ownership, borrowing, lifetimes, and safety patterns.
claudehut-workflow
Use at the start of every session and whenever beginning a coding task in a Java/Spring backend - establishes the ClaudeHut 7-phase agentic workflow, the complexity-tier routing that lets small tasks skip deliberation phases, and the laws that govern which skills and rules must fire. Injected at session start; also…
temporal-python-testing
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.
rust-patterns
Rust: ownership, lifetimes, async (Tokio), Result/anyhow/thiserror, traits, unsafe. Triggers: Rust, borrow checker, lifetime, Tokio, cargo, trait, impl, Result, unsafe, clippy.