Identify and refactor Rust anti-patterns and clippy anti-idioms. Use when reviewing Rust code for smells, hunting anti-patterns to fix or remove, or refactoring code that clones to satisfy the borrow checker, takes &String/&Vec parameters, unwraps on fallible paths, or returns sentinel values instead of Option/Result.
Guide for async and concurrent Rust programming. Use when writing async functions, using tokio, spawning threads, working with channels, or sharing state with Arc/Mutex.
Guide for building Rust command-line applications. Use when parsing CLI arguments with clap, adding progress bars or verbosity flags, testing a CLI binary as a subprocess, choosing process exit codes, or reporting errors to end users with anyhow context.
Guide for Rust error handling. Use when working with Result, Option, the ? operator, implementing custom error types, or composing errors with thiserror and anyhow.
Guide for Rust ownership, borrowing, and lifetimes. Use when working with ownership rules, move semantics, borrowing, slices, or lifetime annotations.
Guide for Rust programming language. Use when writing Rust code, setting up Rust projects, or needing an overview of Rust development workflows.
Guide for Rust testing and Cargo usage. Use when writing unit or integration tests, configuring Cargo.toml, or running cargo commands.
Guide for Rust best practices, common patterns, and idiomatic code. Use when following Rust idioms, applying design patterns, or writing idiomatic Rust.