/dd:rust:testingfrom dd:rust
Provides Rust testing patterns: unit/integration layout, mocking with mockall, async tests, property testing with proptest, snapshot testing with insta, and coverage with cargo-llvm-cov.
Ships in dd: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.
None: SKILL.md is the whole skill.
#[cfg(test)] mod tests inside each source moduleunwrap()/expect() in test modules: #[allow(clippy::unwrap_used, clippy::expect_used)]tests/ directory at crate root — each file is a separate binary, public API onlytests/helpers/mod.rsparse_returns_error_for_empty_input#[tokio::test] for async testsmockall with #[automock] to generate mock implementationsproptest for input-space exploration — catches edge cases manual tests missprop_compose! for complex generatorsproptest! macro, not manual TestRunner — simpler and sufficient for most casesassert! / assert_eq! inside the closure — same assertion style as unit testsinsta for output-heavy assertions — serialized structs, CLI output, rendered templatesassert_snapshot! for strings, assert_json_snapshot! / assert_yaml_snapshot! for structured datacargo insta review — never commit without reviewing#[with_settings(snapshot_suffix => "case_name")] to distinguish parameterized snapshotsTestUser::builder().name("x").build()#[should_panic(expected = "message")] for expected panics — match on substring#[ignore] for slow tests — run with cargo test -- --ignoredcargo-llvm-cov for source-based coverage: cargo llvm-cov --htmlWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
6 skills in this plugin
/coreThe Rust conventions that apply to almost every edit — type design, error handling, ownership, async/tokio, module layout, comments and doc comments, code style, and naming. Use whenever writing, changing, or reviewing Rust code, designing types or error enums, dealing with borrows and lifetimes, writing async/tokio code, organizing modules or workspaces, choosing visibility, writing or shortening comments, doc comments, and module headers, refactoring functions to be shorter or flatter, naming anything, or when the user asks about idiomatic Rust. This is the default Rust skill — load it first; reach for serde, testing, linting, or performance on top of it when the task calls for them./lintingRust workspace lint configuration, clippy enforcement, and formatting rules. Use whenever setting up or modifying Cargo.toml lint configuration, configuring clippy or rustfmt, adding CI checks for Rust, or when the user asks about lint rules, formatting settings, or workspace-level lint inheritance./performanceRust performance — iterators, release profiles, inlining, cache layout, bounds checks, allocation profiling. Use whenever optimizing Rust code, choosing between iterators and loops, configuring release profiles, adding inline hints, profiling allocations, or when the user asks about performance patterns, benchmarking, or hot-path optimization in Rust./reviewComprehensive Rust code review — runs cargo checks, loads all Rust convention skills, reviews changes, and generates a structured report. Use when reviewing finished Rust changes, closing a slice that touched Rust, preparing a PR for merge, or auditing Rust code quality — not while writing the code./serdeRust serde serialization — derive patterns, snake_case defaults, enum representations, attributes, zero-copy deserialization. Use whenever working with serde in Rust, adding Serialize/Deserialize derives, configuring JSON/YAML/TOML serialization, handling optional fields, choosing enum representations, or when the user asks about serde attributes, custom serializers, or data format conversion in Rust.npx claudepluginhub napalmpapalam/skills --plugin rust