agentleFS
huialihuiali/rust-skills/skills/rust-testing/SKILL.md

rust-testing

Skill47 starsChanged 9 months agoMITView on GitHub

Use this skill for detailed, production-ready guidance in this Rust domain. How do we keep tests deterministic, fast, and meaningful?

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill for detailed, production-ready guidance in this Rust domain.

    line 7
  2. Distinctive:

    Use unit tests for logic, integration for contracts

    line 15
  3. Distinctive:

    Use property tests for invariants

    line 16
  4. Distinctive:

    Use loom/criterion for concurrency/perf confidence

    line 17
  5. Distinctive:

    Verify with tests, linting, and scenario-specific checks.

    line 24

“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

name: rust-testing description: "Rust testing expert for unit, integration, async, property-based, concurrency, and benchmark testing workflows."---

Rust Testing Skill

Use this skill for detailed, production-ready guidance in this Rust domain.

Core Question

How do we keep tests deterministic, fast, and meaningful?

Solution Patterns

- Use unit tests for logic, integration for contracts - Use property tests for invariants - Use loom/criterion for concurrency/perf confidence

Workflow

1. Reproduce and isolate the issue with a minimal failing case. 2. Choose the smallest safe design that satisfies constraints. 3. Implement with explicit ownership, errors, and boundaries. 4. Verify with tests, linting, and scenario-specific checks.

Review Checklist

- [ ] Correct behavior for both success and failure paths. - [ ] Ownership and API boundaries are explicit. - [ ] Error handling and diagnostics are actionable. - [ ] Performance-sensitive paths are measured. - [ ] Regression tests cover the changed behavior.

Common Pitfalls

- Fixing flakes with sleep - Over-mocking - Slow tests in default CI path

Verification Commands

cargo test
cargo test -- --nocapture
cargo bench
cargo nextest run

Related Skills

- rust-concurrency - rust-performance - rust-database

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.