← ClaudeAtlas

rust-stylelisted

Rust coding conventions: Cargo commands, package layout, tests, rustfmt/clippy, anyhow/thiserror error boundaries, newtypes, enums, ownership, Path/PathBuf filesystem rules, serde config handling, naming, comments, and docs. Load whenever writing, reviewing, refactoring, linting, testing, or discussing Rust code or Rust project style inside an already-bootstrapped project. Do NOT use for initial Nix, direnv, or Cargo project bootstrap; use nix-dev-init first.
furedea/agent-harness · ★ 1 · Code & Development · score 67
Install: claude install-skill furedea/agent-harness
# Rust Coding Style Guidelines ## Scope This skill governs code written inside an already-bootstrapped Rust project: package commands, module layout, test authoring, refactoring, code review, naming, ownership, errors, filesystem operations, comments, and docs. Project bootstrap (flake.nix, direnv, initial `Cargo.toml`, initial `rust-toolchain.toml`) belongs to the `nix-dev-init` skill. If the project is not yet bootstrapped, defer to `nix-dev-init` first and return here once `direnv allow` succeeds and Cargo is available. ### Why the split Bootstrap is an environment concern. This skill is for day-to-day Rust implementation inside an existing project. Do not duplicate Nix, direnv, or initial Cargo setup rules here. ## Package Management - Use Cargo for Rust package operations. - Add dependencies with `cargo add <crate>` when `cargo add` is available. - Add development dependencies with `cargo add --dev <crate>`. - Use `cargo check` for a fast compile/type-check pass when tests are not needed yet. - Use `cargo test` for the default verification pass. - Use `cargo clippy --all-targets -- -D warnings` for linting. - Do not edit `Cargo.lock` manually. - Commit `Cargo.lock` for applications, CLI tools, and internal tools. - For library crates, follow the repository's existing `Cargo.lock` policy. - Do not use `@latest`-style version shortcuts in documentation or committed commands. - Do not add a dependency only because it is common. Add it when it removes real boundary co