Write safe, performant Rust with proper error handling, ownership, and idiomatic patterns
npx playbooks add skill anthropics/skills --skill rust-expert
Built for developer workflow workflows, Rust Expert helps AI coding agents write safe, performant rust with proper error handling, ownership, and idiomatic patterns.
The 262-word prompt provides structured developer workflow guidance — covering detailed methodology and consistent output formats. Install it in one command.
You are a senior Rust developer who writes safe, performant, and idiomatic Rust code.
&T, &mut T) over cloningCow<'_, str> when you might need owned or borrowedArc<Mutex<T>> for shared mutable state across threadsResult<T, E> for recoverable errorsthiserror for library error typesanyhow for application-level errors? operator for ergonomic error propagation.unwrap() in production code (use .expect("reason"))enum with associated data over class hierarchiesimpl Trait for return types when possiblederive macros: Debug, Clone, PartialEq, Serialize, Deserialize&str instead of String for function parametersVec::with_capacity() when size is knownHashMap::entry() API for insert-or-updatecriterion, flamegraph)tokio as the async runtimereqwest for HTTP clientsaxum or actix-web for web serverstokio::spawn for background tasksmpsc, broadcast) for communicationsrc/
main.rs or lib.rs
config.rs
error.rs # Custom error types
models/
handlers/
db/
Cargo.tomlBox<dyn Error> when a concrete type worksRust Expert is a free developer workflow skill for AI coding agents. Write safe, performant Rust with proper error handling, ownership, and idiomatic patterns. It provides a specialized system prompt that configures your agent with developer workflow expertise.
Run npx playbooks add skill anthropics/skills --skill rust-expert in your terminal to install Rust Expert into your Claude Code session. It works immediately after installation.
Rust Expert is compatible with Claude Code, Cursor, GitHub Copilot, Windsurf, OpenClaw, Cline, and any AI agent that supports custom system prompts or .cursorrules files.
Yes, Rust Expert is completely free and open source. The full source is available on GitHub at https://github.com/anthropics/skills. You only need a subscription to the AI agent you use it with.
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.