agentsclimarketplace

Rust test

Skill nyquistwilder/personal-pi/skills/rust-test

Rust testing workflow for unit, integration, doc, snapshot, property, async, regression, and coverage-aware tests in greenfield Cargo projects. Use for creating, improving, validating, or reviewing Rust tests.From its SKILL.md

Install
npx -y skills add nyquistwilder/personal-pi --skill rust-test

Assembled 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

2.6 KB, 528 tokens by cl100k_base, as published. Nobody here has run it

Rust Test

Rule

Test public behavior with deterministic tests. Prefer unit tests near implementation, integration tests for crate behavior, doctests for documented examples, and regression tests for bugs.

Hard Stops

Stop before:

  • Tests touch production services, real secrets, user files, live databases, or shared mutable infrastructure.
  • Adding test dependencies such as insta, proptest, quickcheck, testcontainers, wiremock, mockall, or Tokio test utilities without approval or project precedent.
  • Snapshot tests would hide unclear behavior instead of documenting an intentional contract.
  • Async or concurrency tests rely on sleeps rather than deterministic synchronization.

Defaults

  • Use #[test], module-level unit tests, tests/*.rs integration tests, and doctests.
  • Use #[tokio::test] only for Tokio projects; keep runtime features explicit.
  • Use tempfile when filesystem isolation is needed and approved.
  • Use assert_eq!/matches! and meaningful failure messages; avoid over-broad snapshots.
  • Use insta only for stable structured output where focused assertions are worse.
  • Use proptest for parsers, serializers, normalizers, and invariant-heavy code.
  • Use wiremock or local axum/hyper test servers for HTTP clients; never call live services by default.
  • Use cargo-nextest when already configured; otherwise cargo test is the baseline.

Workflow

  1. Inspect existing tests, features, fixtures, and wrapper commands.
  2. For bugs, write or run a focused failing regression test first when practical.
  3. Cover success, failure, edge cases, cancellation, and public error behavior.
  4. Keep fixtures small and local; use files only when file format/path behavior is contract.
  5. Run targeted cargo test <name> or package-specific tests.
  6. Run full cargo test --all-targets --all-features or project wrapper.
  7. Run doctests, async tests, property seeds, snapshots, or coverage only when relevant.
  8. Run just check before handing back.

Coverage

Use cargo llvm-cov only when configured or approved. Coverage is a signal; do not add weak assertions or test-only branches to raise a number. Prefer assertions that would fail for real regressions.

Completion

Report tests added, commands run, async/snapshot/property/container choices, coverage result when measured, and remaining untested risk.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,736. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.