igmarin/agent-profiles/rust-error-handling
Claude Code and agent skill by igmarin/agent-profiles
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
'Result over panic. thiserror in libs, anyhow in bins. ? propagation,
Install
npx vskill@latest install igmarin/agent-profiles/rust-error-handlingSKILL.md
Resolve skill names through ../../skill-map.json; use the source pack to disambiguate. Load only the workflow and resources needed for the authorized task.
Error handling
Apply the execution contract before this procedure.
Goal
Recoverable failure is Result. Panics are bugs, not control flow.
Inputs / outputs
- In: a fallible operation
- Out:
Result<T, E>with a usefulE, or a typed panic only for invariants
Reads / writes
- Read: the fallible fn and its callers
- Write: none unless a playbook opened the task
Approval
Adding thiserror / anyhow if they are not already in Cargo.toml.
RULES — no exceptions
- Library crates: preserve the existing typed error API; use a small handwritten
enumor existingthiserrordependency implementingErrorand needed conversions - Binary / app crates: use the existing error convention;
anyhowwith.context()is an option when already installed, not a required dependency ?to propagate;Fromimpls make?work- No
.unwrap()on user/IO/parse paths .expect("…")only for proven invariants (a bug if it fires)- Messages: lowercase, no trailing punctuation
- Preserve
source(#[source]/.context()) - Document
# Errorson public fallible fns
Example
Steps
- Classify: recoverable vs invariant
- Recoverable →
Result+? - If the crate is a lib, keep
Etyped; if a bin,anyhowis enough
Validation
No new unwrap/expect on IO/parse. cargo test covers the error variant.
Pitfalls
| ❌ | ✅ | |
|---|---|---|
unwrap in a lib | ? | |
expect("failed") on a missing file | Err + context | |
Swallow with let _ = | return or log once at the edge |
Integration
Predecessor: rust-essentials. Successor: none.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/rust-developer/skills/rust-error-handling/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/igmarin/agent-profiles/rust-error-handling)