No slash command · from fuse-rust
Organizes and runs Rust tests: unit, integration, doc-tests, proptest, criterion benchmarks, and cargo-mutants. Covers nextest doctest pitfall and test organization patterns.
Ships in fuse-rust. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
It also covers the nextest doctest pitfall: cargo nextest run never runs doc-tests, so
cargo test --doc must always be paired alongside it — a green nextest run alone is not
full coverage.
Out of scope: CI pipeline wiring and gate ordering belong to rust-tooling-cicd; non-Rust test suites are not covered.
Before ANY test work, spawn 3 agents in parallel, one Agent call each with a name:
tests/, #[cfg(test)], benches/After implementation, run fuse-ai-pilot:sniper for validation.
| Test kind | Location | Runs the code as |
|---|---|---|
| Unit | #[cfg(test)] mod tests inside the source file | Same crate, sees private items |
| Integration | tests/*.rs (each file = own crate) | External consumer, public API only |
| Doc-test | ```rust blocks in /// docs | Compiled + run as examples |
| Property | proptest, inside unit or integration | Generated random inputs + shrinking |
| Benchmark | benches/*.rs with criterion | Statistical timing, not correctness |
cargo nextest run skips them by design. ALWAYS pair with cargo test --doc. Never treat a green nextest run as full coverage.#[cfg(test)], not tests/.proptest-regressions/ - persisted failing seeds must be under version control so failures are reproducible.harness = false for criterion benches - required in Cargo.toml, or the built-in bench harness collides.cargo mutants is slow; run it in scheduled CI, not on every push.my_crate/
├── src/
│ └── lib.rs # unit tests in #[cfg(test)] + doc-tests in ///
├── tests/
│ └── api.rs # integration tests (public API)
├── benches/
│ └── throughput.rs # criterion, harness = false
└── proptest-regressions/ # committed failing seeds
→ See test-suite.md for the complete example
| Topic | Reference | When to Consult |
|---|---|---|
| Test organization | test-organization.md | Deciding unit vs integration vs doc, running with nextest |
| Property & mutation | property-and-mutation.md | Adding proptest strategies or cargo-mutants |
| Template | When to Use |
|---|---|
| test-suite.md | Scaffolding unit + integration + doc + proptest |
| criterion-bench.md | Adding a criterion benchmark |
cargo nextest run --all-features # unit + integration, fast, parallel
cargo test --doc # doc-tests — NOT covered by nextest
use proptest::prelude::*;
proptest! {
#[test]
fn round_trips(n in 0u32..10_000) {
prop_assert_eq!(decode(&encode(n)), n);
}
}
→ See test-suite.md for the full file
cargo nextest run + cargo test --doc together in every CI gate#[test] (use criterion in benches/)proptest-regressions/ — commit itcargo mutants on every push (schedule it instead)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
7 skills in this plugin
/rust-async-concurrencyUse when writing async Rust — spawning tasks, sharing state across tasks/threads, choosing channels vs mutexes, or hitting Send-bound errors with async traits. Not for HTTP service structure (rust-web-backend) or sync-only ownership (rust-core-language)./rust-core-languageUse when writing or reviewing idiomatic Rust — edition 2024 ownership/borrowing design, or fixing LLM pitfalls (clone tax, unwrap infestation, indexed loops). Not for error-type design (rust-error-handling) or SOLID layout (solid-rust)./rust-ecosystem-cratesUse when choosing crates for a Rust project — serialization, CLI, async runtime, web, database, HTTP client, error handling, observability. Not for API usage details of an already-chosen crate./rust-error-handlingUse when designing Rust error handling — thiserror vs anyhow, typed error enums,npx claudepluginhub fusengine/claude-plugins --plugin fuse-rustOther plugins' skills for the same job