← ClaudeAtlas

lang-rustlisted

Use when writing or reviewing Rust (.rs) code or crates — idiomatic style, cargo fmt/clippy, Result/Option error handling (thiserror/anyhow), ownership/borrowing, minimal justified unsafe, and Rust's top safety/security pitfalls. Triggers on Cargo.toml/Cargo.lock, tokio, axum/actix projects.
StielChancellor/VibeGod-Tech-Team · ★ 0 · AI & Automation · score 65
Install: claude install-skill StielChancellor/VibeGod-Tech-Team
# Rust — idiomatic & safe The language lens for Rust work. Backs the build agents at Stage 6. Honors `_shared/vibegod-principles.md` (simplicity, surgical, no silent error-swallowing, consistency, cost-awareness). Defer security depth to `secure-coding` and test discipline to `test-driven-development`. ## Fits in the pipeline Stage 6 (Build): write code to this standard. Stage 7 (per-feature QA): the code-quality-reviewer + security-engineer lenses check it against this skill. Priority: **user > skills > default.** ## Style & layout - Cargo workspace; lib + thin bin. Modules by feature; `pub` only what the API needs. Prefer owned types at boundaries, borrows internally. Lean on the type system (newtypes, enums, `#[non_exhaustive]`) to make illegal states unrepresentable. - Derive `Debug`/`Clone`/`PartialEq` where sensible; implement `From`/`TryFrom` for conversions. Iterators over manual loops; avoid premature `clone()` to "fix" borrow errors — restructure instead. ## Toolchain (canonical) - **Format:** `cargo fmt` (enforced). **Lint:** `cargo clippy -- -D warnings` (deny warnings in CI). - **Test:** `cargo test` (unit `#[cfg(test)]` modules + `tests/` integration); doctests for examples. - **Build:** `cargo build`; committed `Cargo.lock` for binaries. ## Error handling - Return `Result<T, E>` / `Option<T>` — make fallibility explicit; propagate with `?`. - **Libraries:** typed errors via **`thiserror`**; do NOT `unwrap()`/`expect()`/`panic!` in library code path