/pproenca:rust-testingfrom pproenca
Rust testing patterns for CLI applications, libraries, and frameworks. This skill should be used when writing, reviewing, or refactoring Rust tests including unit tests, integration tests, mocking, async testing, and CI integration. Triggers on tasks involving Rust testing, cargo test, mockall, proptest, tokio test, or test organization.
Ships in pproenca. 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.
Comprehensive testing guide for Rust applications, covering CLI testing, library testing, async patterns, and CI integration. Contains 42 rules across 8 categories, prioritized by impact to guide test design, mocking strategies, and CI optimization.
Reference these guidelines when:
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Test Organization | CRITICAL | org- |
| 2 | Mocking and Test Doubles | CRITICAL | mock- |
| 3 | Async Testing | HIGH | async- |
| 4 | Property-Based Testing | HIGH | prop- |
| 5 | Test Fixtures and Setup | MEDIUM | fix- |
| 6 | Assertions and Error Testing | MEDIUM | assert- |
| 7 | CI Integration | MEDIUM | ci- |
| 8 | Test Performance | LOW-MEDIUM | perf- |
org-unit-test-modules - Use cfg(test) modules for unit testsorg-integration-tests-directory - Place integration tests in tests directoryorg-shared-test-utilities - Use tests/common/mod.rs for shared utilitiesorg-binary-crate-pattern - Extract logic from main.rs into lib.rsorg-test-naming - Name tests after behavior not implementationorg-test-cli-with-assert-cmd - Use assert_cmd for CLI testingmock-trait-based-design - Design for testability with traitsmock-automock-attribute - Use mockall automock for complex mockingmock-avoid-mocking-owned-types - Avoid mocking types you ownmock-expect-call-counts - Verify mock call counts explicitlymock-predicate-arguments - Use predicates to verify mock argumentsmock-returning-sequences - Use sequences for multiple return valuesmock-static-methods - Use mock! macro for static methodsasync-tokio-test-macro - Use tokio::test for async test functionsasync-time-control - Use paused time for timeout testingasync-mock-io - Use tokio_test for mocking async IOasync-spawn-blocking - Test spawn_blocking with multi-threaded runtimeasync-test-channels - Use channels for testing async communicationprop-proptest-basics - Use proptest for property-based testingprop-custom-strategies - Create custom strategies for domain typesprop-shrinking - Use shrinking to find minimal failing casesprop-invariant-testing - Test invariants instead of specific valuesfix-rstest-fixtures - Use rstest fixtures for test setupfix-rstest-parametrized - Use rstest case for parameterized testsfix-temp-directories - Use TempDir for file system testsfix-test-context - Use test-context for setup and teardownfix-once-cell-shared-state - Use OnceCell for expensive shared setupassert-specific-errors - Assert specific error types not just is_errassert-should-panic - Use should_panic for panic testingassert-debug-display - Implement Debug for clear failure messagesassert-custom-messages - Add context to assertions with custom messagesassert-floating-point - Use approximate comparison for floating pointassert-collection-contents - Assert collection contents not just lengthci-cargo-nextest - Use cargo-nextest for faster CIci-caching - Cache Cargo dependencies in CIci-test-isolation - Ensure test isolation in parallel CIci-coverage - Generate coverage reports in CIperf-compile-time - Reduce test compilation timeperf-test-filtering - Filter tests for faster feedback loopsperf-avoid-io-in-unit-tests - Avoid real IO in unit testsperf-parallel-test-execution - Configure parallel test threadsperf-benchmark-critical-paths - Benchmark critical paths with CriterionRead individual reference files for detailed explanations and code examples:
| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |
assets/templates/_template.md (opens in a new tab)metadata.json (opens in a new tab)references/_sections.md (opens in a new tab)references/assert-collection-contents.md (opens in a new tab)references/assert-custom-messages.md (opens in a new tab)references/assert-debug-display.md (opens in a new tab)references/assert-floating-point.md (opens in a new tab)references/assert-should-panic.md (opens in a new tab)references/assert-specific-errors.md (opens in a new tab)references/async-mock-io.md (opens in a new tab)references/async-spawn-blocking.md (opens in a new tab)references/async-test-channels.md (opens in a new tab)references/async-time-control.md (opens in a new tab)references/async-tokio-test-macro.md (opens in a new tab)references/ci-caching.md (opens in a new tab)references/ci-cargo-nextest.md (opens in a new tab)references/ci-coverage.md (opens in a new tab)references/ci-test-isolation.md (opens in a new tab)references/fix-once-cell-shared-state.md (opens in a new tab)references/fix-rstest-fixtures.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ulpi-io/plugin-marketplace --plugin pproenca48 skills in this plugin
/chrome-extensionchrome-extension-uiChrome Extensions UX/UI design and implementation guidelines for popups, side panels, content scripts, and options pages. Triggers on tasks involving browser extension UI, manifest v3, chrome APIs./chrome-extension-uiChrome Extensions UX/UI design and implementation guidelines for popups, side panels, content scripts, and options pages. Triggers on tasks involving browser extension UI, manifest v3, chrome APIs./clean-architectureProvides implementation patterns for Clean Architecture, Hexagonal Architecture (Ports & Adapters), and Domain-Driven Design in Java 21+ Spring Boot 3.5+ applications. Use when structuring layered architectures, separating domain logic from frameworks, implementing ports and adapters, creating entities/value objects/aggregates, or refactoring monolithic codebases for testability and maintainability.Other plugins' skills for the same job