rust-cookbook

Installation
SKILL.md
Contains Shell Commands

This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.

Rust Cookbook

Idiomatic recipes for common Rust tasks, adapted from Cookin' with Rust. Each recipe is task → crate → pattern. This skill is the broad index; where a dedicated skill exists (reqwest-rust, clap-rust, tokio-rust, anyhow-rust, walkdir-rust, tempfile-rust, clickhouse, rocksdb, sui-sdk-js...), defer to it for depth.

How to use

  1. Find the task category below.
  2. Use the crate named — these are the cookbook's current, battle-tested choices. Confirm the latest version on crates.io/docs.rs before pinning.
  3. Adapt the pattern. Prefer returning anyhow::Result<T> from fallible recipe code and propagating with ? (see anyhow-rust).

Crate baseline: regex 1.12, semver 1.0, num 0.4, chrono 0.4, rand 0.9 (rand::rng()), clap 4 (Command/derive). These recipes assume a recent toolchain — std::sync::LazyLock/LazyCell (used below over lazy_static) need Rust 1.80+, and rand 0.9 dropped thread_rng()/gen_range. Check your MSRV before pinning; on older toolchains fall back to lazy_static/once_cell and rand 0.8 APIs.

Crate selection map

Installs
18
Repository
avbel/ai-skills
GitHub Stars
2
First Seen
Jul 18, 2026