From rust-skills
Choose the right Rust project shape before implementation, including crate type, Cargo package or workspace layout, edition and MSRV checks, validation commands, package boundaries, and documentation updates. Use when a user wants to start, restructure, or extend a Rust project and the binary, library, workspace, CLI, service, proc macro, FFI, embedded, no_std, or maintenance shape is not already settled.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rust-skills:choose-project-shapeThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Pick the smallest correct Rust project shape before code changes begin.
Pick the smallest correct Rust project shape before code changes begin.
The practical decision is what kind of crate or workspace the user needs, where package boundaries should sit, whether MSRV or edition policy already exists, and which validation commands should prove the work.
Use repo-local Rust files, checked-out dependency sources, Dash MCP or Dash HTTP for installed Rust docsets, and then official Rust documentation when Dash/local coverage is missing or stale. Check one of those source-specific paths before making claims about Rust, Cargo, rustup, formatting, linting, testing, or package behavior:
cargo newTranslate any documentation rule into the concrete repository decision it changes.
Cargo.tomlCargo.lockrust-toolchain.toml or rust-toolchain.cargo/config.tomlrustfmt.toml or .rustfmt.tomlclippy.tomlsrc/main.rssrc/lib.rstests/examples/benches/crates/no_std targetcargo fmt --check for formatting-sensitive changescargo clippy --all-targets --all-features when lint coverage matterscargo test for behaviorcargo build for compile checks without testscargo package for publishable crate surfacesUse a single binary package for small command-line tools. Add a library target only when the CLI has reusable logic that tests or downstream callers should exercise directly.
Handoff:
rust:bootstrap-cargo-project for new project creationrust:testing-workflow for behavior coveragerust:tooling-style-workflow for formatting, linting, and toolchain alignmentUse a library package when the primary output is an API consumed by tests, examples, binaries, or downstream users. Keep public API surface small and document package validation if publishing is expected.
Handoff:
rust:testing-workflow for unit, integration, and doctest coveragerust:package-workflow when crate metadata or publication mattersUse a workspace only when more than one package needs shared dependency resolution, coordinated tests, or separate crate boundaries.
Good reasons include a library plus CLI package, a proc macro companion crate, integration-test support crates, or multiple crates that ship together. Avoid a workspace when a module split inside one crate would be enough.
Use a dedicated proc macro crate. Keep parsing and code generation tests explicit because failures are often easier to understand with fixture-style coverage.
no_stdTreat these as explicit constraint-driven shapes. Check existing target, build script, linker, feature, and CI configuration before changing layout.
Return:
Chosen shape: binary crate, library crate, CLI, service, workspace, proc macro, FFI, embedded or no_std, or maintenance pass.Project boundary: package, crate, workspace member, or module split.Compatibility policy: edition, MSRV, toolchain, and feature constraints.Validation path: exact format, lint, build, test, or package commands.Documentation updates: README, roadmap, package notes, or repo-local guidance.Next skill: the next Rust skill to use.npx claudepluginhub gaelic-ghost/socket --plugin rust-skillsCreates, edits, and verifies skills using a test-driven development approach with pressure scenarios and subagents.