agentleFS
d-oitd-oit/rust-2026-template/.agents/skills/test-rust/SKILL.md

test-rust

Skill15 starsChanged 5 months agoMITView on GitHub

Run the complete test suite for a Rust project including unit tests, integration tests, doc tests, and coverage. Use nextest for parallel execution. Use when running tests, debugging failures, or checking coverage. Triggers: "run tests", "cargo test", "test suite", "coverage".

  • Installs packages

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    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:

    Run the complete test suite for a Rust project using best practices.

    line 21

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Skill: test-rust

Purpose

Run the complete test suite for a Rust project using best practices.

Prerequisites

  • cargo nextest (cargo install cargo-nextest)
  • cargo llvm-cov for coverage (cargo install cargo-llvm-cov)

Steps

1. Unit + integration tests

cargo nextest run --all-features --workspace

2. Doc tests

cargo test --workspace --doc --all-features

3. With coverage

cargo llvm-cov nextest --all-features --workspace --html

4. Report metrics

Call metrics-reporter skill.

Test Organization

src/lib.rs          # #[cfg(test)] mod tests {}
tests/              # Integration tests
benches/            # Criterion benchmarks

Success Criteria

  • All tests pass
  • Doc tests pass
  • Coverage >= 80%

Related Skills

  • build-rust, lint-rust, release-rust, metrics-reporter

Rationalizations

RationalizationReality
"Unit tests pass, so the code is correct."Unit tests don't catch integration issues. Run doc tests and integration tests too.
"Coverage is at 50%, that's probably fine."Below 80% coverage leaves significant untested code paths.
"I'll skip doc tests — they're just examples."Doc tests are compiled and run. They catch stale documentation and API mismatches.

Red Flags

  • Running cargo test without --all-features (hides feature-gated test failures)
  • Skipping doc tests (cargo test --workspace --doc --all-features)
  • Not using cargo-nextest for parallel test execution

References

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.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.