← ClaudeAtlas

setup-rust-skillslisted

Configure a Rust repo for this skill set — lint and format configuration, and a recorded project posture (edition, MSRV, async runtime, no_std, unsafe policy) at docs/agents/rust.md.
rewrite-rs/skills · ★ 2 · AI & Automation · score 76
Install: claude install-skill rewrite-rs/skills
# Setup Rust Skills Configuration is a promise the tooling keeps. Every other skill in this set reads the lint level and the recorded posture before running a verification step, and this skill is the one that writes both. It runs only when the user invokes it — it drops files into the repo, and the model never decides that on its own. The whole run is governed by one rule: **read before writing, and never overwrite a deliberate setting.** ## What this writes, and the one rule Three artifacts: the lint configuration — the levels in `Cargo.toml` and the knobs in `clippy.toml` — a `rustfmt.toml`, and `docs/agents/rust.md`. If an artifact already exists, the change is presented as a diff for approval; existing keys are left alone unless the user says otherwise, and only missing keys are added. ## Detect first, ask second Read `Cargo.toml`, the crate root, and `rust-toolchain.toml`. Ask only about what could not be detected, and ask in one batch rather than one question at a time. The five facts to end up with: | Fact | Usually detected from | |---|---| | Edition | `[package].edition` or `[workspace.package].edition` | | MSRV | `rust-version`, `clippy.toml` `msrv`, or the CI job that builds on the oldest compiler | | Async runtime | `tokio`, `async-std`, or `smol` in the dependencies — or none | | `no_std` posture | `#![no_std]` at the crate root | | Unsafe policy | `#![forbid(unsafe_code)]`, an existing `unsafe_code` level, or the absence of one | The unsafe policy lands a