Skip to main content
skill CX Codex

m06-error-handling — Claude Code skill: what it does, how to install

Guides the AI agent through Rust error handling patterns. Useful when deciding between Result, Option, panic!, thiserror, and anyhow.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add actionbook/rust-skills --skill m06-error-handling -a claude-code
Open on GitHub

What m06-error-handling does

This skill enforces structured error design in Rust projects. Instead of slapping .unwrap() or burying failures under generic types, the agent evaluates whether a failure is expected or an invariant bug. It directs library crates toward typed errors with thiserror and application code toward anyhow.

The instruction set includes explicit decision paths and anti-pattern warnings. It prompts the model to attach call context via .context() when using the ? operator. It flags silent error swallowing and unnecessary panics in production logic.

The skill is configured with user-invocable: false. The model triggers it automatically upon encountering Rust error types or propagation logic.

What it helps with

  • decide between Result, Option, and panic!
  • split error strategies between library crates (thiserror) and application code (anyhow)
  • replace unsafe .unwrap() calls with error propagation using ?
  • attach contextual messages to error propagation chains

Example prompts for the agent

  • Refactor this parser function to return a proper Result instead of panicking with unwrap.
  • Should I use thiserror or anyhow for this database module?
  • Help me propagate this IO error with descriptive context.

How to install m06-error-handling

1Skills CLI (Vercel)

npx skills add actionbook/rust-skills --skill m06-error-handling -a claude-code

2Manually: put the files in place

~/.claude/skills/m06-error-handling/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/m06-error-handling/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about m06-error-handling

How to install m06-error-handling in Claude Code?

Run npx skills add actionbook/rust-skills --skill m06-error-handling -a claude-code. The skill file will be placed at ~/.claude/skills/m06-error-handling/SKILL.md.

What does m06-error-handling do?

It guides AI coding agents to make principled decisions about Rust errors, separating expected failures, missing values, and unrecoverable bugs.

When does the skill choose thiserror over anyhow?

It recommends thiserror for library boundaries where callers need typed error variants. It selects anyhow for applications where easy propagation and call-chain context take priority.

Similar skills

All skills for Programming languages →

From the same set33

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor