rust

Guide Rust developers in writing idiomatic, safe, and efficient code.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/curphey/bosun --skill rust-curphey
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust
Source: https://github.com/curphey/bosun/tree/main/skills/rust
Command: npx skills add https://github.com/curphey/bosun --skill rust-curphey

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Rust's strict ownership, lifetime tracing, and error-handling complexity can hinder developers from writing safe, efficient code. This skill guides you to write idiomatic Rust, perform effective code reviews, and diagnose ownership or lifetime issues to improve reliability and maintainability.

Core Features & Use Cases

  • Idiomatic error handling with Result/Option using ? and thiserror/anyhow.
  • Clear ownership and borrowing patterns, including lifetimes and interior mutability.
  • Concurrency patterns with async/await, Tokio, and safe synchronization.
  • Code-review practices and practical examples across common Rust tasks to raise the baseline of code quality.

Quick Start

Provide a Rust code sample or repository snippet and ask me to review it for idiomatic ownership, error handling, and concurrency patterns.

Frequently Asked Questions about rust

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write idiomatic Rust error handling with Result, Option, and the ? operator?

Idiomatic Rust error handling uses Result and Option with the ? operator for propagation, leveraging thiserror for library errors and anyhow for application-level error aggregation.

What is the best way to resolve Rust ownership and lifetime borrowing issues during code review?

Resolve Rust ownership and lifetime issues by applying clear borrowing patterns, tracing lifetimes, and using interior mutability to ensure safe, efficient memory access without compile errors.

How do I implement safe concurrency patterns in Rust using async/await and Tokio?

Implement safe Rust concurrency using async/await with Tokio for runtime management, ensuring safe synchronization across threads to prevent data races while maintaining performance.

Why does my Rust code fail clippy lints and how can I make it more idiomatic?

Rust code fails clippy lints when non-idiomatic patterns are used; resolve them by applying best-practice ownership, error handling, and trait design patterns suggested during review.

Can I use thiserror and anyhow together for Rust error management?

Yes, use thiserror to define custom library error types and anyhow to handle application-level errors dynamically, providing a robust idiomatic Rust error management strategy.

When do I need interior mutability in Rust and how does it affect safety?

Use interior mutability in Rust when you need mutable access through immutable references, utilizing patterns like RefCell to maintain borrowing rules and ensure memory safety.