rust-stylelisted
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