Rust project setup
Set up a brand-new greenfield Rust crate or workspace after base-repo-setup, using modern Cargo layout, Edition 2024 when supported, explicit MSRV, rustfmt, Clippy, tests/docs, cargo-nextest when approved, cargo-deny/audit gates, and local just check validation. Use only for new Rust scaffolding, not migrations.From its SKILL.md
npx -y skills add nyquistwilder/personal-pi --skill rust-project-setupAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.0 KB, 881 tokens by cl100k_base, as published. Nobody here has run it
Rust Project Setup
Rule
Scaffold a brand-new Rust project; do not only propose a structure. Layer Rust-specific
conventions on top of base-repo-setup and target greenfield work only.
Greenfield Rust should be Cargo-first, safe by default, explicit about MSRV and features, and dependency-minimal until a real domain need exists.
Hard Stops
Stop before writing files when:
- The repository baseline is missing (
flake.nix,mise.toml,justfile,.gitignore). - The target already has
Cargo.toml,Cargo.lock,src/,tests/, or files that would be overwritten. - Crate name, app/library shape, workspace shape, edition, MSRV, license, or publish intent is unclear.
- The request is a migration of an existing Rust project; these skills are greenfield-only.
- Setup would introduce async runtime, HTTP framework, database, config framework, OpenTelemetry, unsafe code, FFI, or release automation without approval.
Required Decisions
Ask and confirm:
- Crate or workspace name. Use kebab-case package names and snake_case library crate names.
- Shape: binary app, library crate, mixed app+lib, or workspace.
- Edition. Recommend Rust 2024 when supported by the chosen stable toolchain.
- MSRV. Libraries need explicit MSRV; apps may track stable unless release policy says otherwise.
- License, description, repository URL, and publish intent.
- Whether CLI, HTTP API, async, database, config, observability, benchmarks, docs examples, or release automation are in scope. Default is no; use specialized skills later.
Greenfield Defaults
- Use stable Rust. Pin toolchain through repo policy when the project requires repeatability.
- Prefer
cargo new --binorcargo new --libshape, then adjust deliberately. - Use
src/main.rsfor binaries,src/lib.rsfor libraries, andtests/for integration tests. - Add a workspace only when multiple crates are requested.
- Track
Cargo.lockfor apps and binaries. Discuss lockfile policy for libraries and workspaces; default to tracking it in this personal baseline for reproducibility. - Keep dependencies empty initially unless generated code imports them.
- Use
rustfmt, Clippy,cargo test,cargo test --doc, andcargo doc --no-depsin validation. - Use
cargo-nextestonly when approved or already standard;cargo testremains the portable baseline. - Use
cargo-denyfor license/advisory policy andcargo-auditonly when the repo chooses it; do not add both without need.
Just Recipes
Keep just check as the canonical validation entrypoint. Prefer recipes like:
fmt:
cargo fmt --all
fmt-check:
cargo fmt --all -- --check
lint:
cargo clippy --all-targets --all-features -- -D warnings
test:
cargo test --all-targets --all-features
doc:
cargo doc --no-deps --all-features
check: fmt-check lint test doc
Add nextest, deny, audit, coverage, or bench recipes only when those tools are
approved and versioned through project tooling.
Workflow
- Verify the baseline repository files and Git root.
- Ask all required decisions.
- Create Cargo metadata, source skeleton, smoke tests, README updates, and just recipes.
- Add
.gitignoreentries for generated Rust artifacts only when missing (target/, coverage/profiling outputs). Do not ignoreCargo.lockwithout approval. - Run
cargo fmt,cargo test,cargo clippy,cargo doc, andjust check.
Completion
Report crate/workspace shape, edition/MSRV, lockfile policy, files created, dependencies added or avoided, commands run, validation results, and intentionally skipped optional items such as Tokio, Axum, Clap, SQLx, OpenTelemetry, CI, and release automation.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.