Agent skill · software engineering · aiskillstore

senior-rust-practices

This skill should be used when the user asks about "rust workspace", "rust best practices", "cargo workspace setup", "rust code organization", "rust dependency management", "rust testing strategy", "rust project", "scalable rust", "rust CI setup", or needs guidance on senior-level Rust development patterns, workspace design, code organization strategies, or production-ready Rust architectures.

Why this skill is useful

Adds detailed executable scripts and specific architectural patterns for Rust projects that are not commonly found in public documentation.

What it needs

About 5k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

Senior Rust Development Practices Battle-tested patterns for Rust workspace architecture, code organization, dependencies, and testing that scale from prototype to production. Git Worktree Workflow Compliance All coding work MUST happen in git worktrees. Before making any code changes: 1. Create a worktree: git worktree add ~/.claude/worktrees/$(basename $(pwd))/<task> -b feat/<task> 2. Work in that directory 3. Use /merge to consolidate changes back to main Never edit files directly in the main worktree. Completion Requirements Before completing ANY Rust task, you MUST: 1. Run tests: cargo test --workspace 2. Run linting: trunk check 3. Fix any issues before declaring done If trunk has formatting issues, run trunk fmt to auto-fix. Workspace Architecture Start from "One Product = One Repo = One Workspace" Use a Rust workspace when you have: Multiple crates that ship together (binary + libraries) Shared tooling / CI Shared versioning policy Canonical workspace structure: Keep Crates "Thin" and Boundaries "Hard" Layered architecture: core: Pure logic, types, validation, algorithms. Minimal deps. adapters: IO boundaries (db, network, rpc, filesystem). Trait-based boundary, minimal leakage. app / service: Wiring (DI), config, runtime, orchestration. bins: CLI/daemon that just calls "app". Critical rule: If core imports tokio, reqwest, or sqlx, you've already lost the separation. Default to a Small Number of Crates Too many crates is busywork. Start with 2–5 max. Split only when: Compile times are painful and boundaries are real You need separate release cadence You need different dependency profiles (no-std, wasm, etc.) Workspace Dependencies: Centralize Versions, Not Architecture In root Cargo.toml, use workspace dependencies to keep versions aligned: In crate Cargo.toml: This reduces version drift and security churn. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/senior-rust-practices

View the source on GitHub

Browse the @skills marketplace