rust-testing-quality

rust-testing-quality is a skill for Claude Code, Codex from fusengine/agents. It costs 46 tokens per session (1,264 once invoked), scanned A, original, MIT.

A guide to writing and running Rust tests, including unit, integration, documentation, property-based tests, benchmarks, and mutation testing. It also explains which commands are needed for full coverage.

In plain words
What is it for?
Use it when adding, organizing, or running tests in a Rust project, including tests that generate many inputs or check benchmark performance.
Why use it?
It helps avoid missing tests or assuming a green test command checked everything. For example, Rust documentation tests need to be run separately from nextest.

Skill for Claude CodeCodex

Part of the fuse-rust plugin — 7 skills, 1 agent shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/fusengine/agents/rust-testing-quality
Any agent
npx skills add fusengine/agents --skill rust-testing-quality
Clone the repo
git clone --depth 1 https://github.com/fusengine/agents

Made for: Claude Code, Codex.

Or install fuse-rust, the plugin that ships this one along with the rest of its 7 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rust-testing-quality

README.md
[![agentmods](https://agentmods.dev/badge/skills/fusengine/agents/rust-testing-quality.svg)](https://agentmods.dev/skills/fusengine/agents/rust-testing-quality)
Your own site
<a href="https://agentmods.dev/skills/fusengine/agents/rust-testing-quality"><img src="https://agentmods.dev/badge/skills/fusengine/agents/rust-testing-quality.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,264 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.01264
Opus 5 $0.00023 $0.00632
Sonnet 5 $0.00009 $0.00253
Haiku 4.5 $0.00005 $0.00126

Measured today against content hash 9dc0df6bfc92, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

rust-testing-quality scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/rust-expert/skills/rust-testing-quality/SKILL.md · 138 lines

How it starts

The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.

It also covers the nextest doctest pitfall: cargo nextest run never runs doc-tests, so cargo test --doc must always be paired alongside it — a green nextest run alone is not full coverage.

Out of scope: CI pipeline wiring and gate ordering belong to rust-tooling-cicd; non-Rust test suites are not covered.

Rust Testing & Quality

Agent Workflow (MANDATORY)

Before ANY test work, spawn 3 agents in parallel, one Agent call each with a name:

  1. fuse-ai-pilot:explore-codebase - Map existing tests/, #[cfg(test)], benches/
  2. fuse-ai-pilot:research-expert - Verify current nextest/proptest/criterion docs via Context7/Exa
  3. mcp__context7__query-docs - Check crate-specific API (proptest strategies, criterion groups)

After implementation, run fuse-ai-pilot:sniper for validation.


Overview

Test kind Location Runs the code as
Unit #[cfg(test)] mod tests inside the source file Same crate, sees private items
Integration tests/*.rs (each file = own crate) External consumer, public API only
Doc-test ```rust blocks in /// docs Compiled + run as examples
Property proptest, inside unit or integration Generated random inputs + shrinking
Benchmark benches/*.rs with criterion Statistical timing, not correctness

Critical Rules

  1. nextest does NOT run doc-tests - cargo nextest run skips them by design. ALWAYS pair with cargo test --doc. Never treat a green nextest run as full coverage.
  2. Integration tests see only the public API - if a test needs private items, it belongs in #[cfg(test)], not tests/.
  3. Commit proptest-regressions/ - persisted failing seeds must be under version control so failures are reproducible.
  4. harness = false for criterion benches - required in Cargo.toml, or the built-in bench harness collides.
  5. Mutation testing is a gate, not a smoke test - cargo mutants is slow; run it in scheduled CI, not on every push.

Read the full file on GitHub · 138 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed 9dc0df6bfc92
  2. 2d ago First seen · 138 lines · 46 tokens per session scan A 516d8a008788

Subscribe to this mod's changes

rust-testing-quality is a skill published in the GitHub repository fusengine/agents (25 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 1,264 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

craft-pest

Testing Craft CMS 5 plugins and modules with Pest — test isolation, database safety, and the markhuot/craft-pest-core harness. ALWAYS load when writing, running, fixing, or reviewing tests for a Craft plugin or module, and whenever a suite touches a real Craft install. Covers why rollback is opt-in, tests/Pest.php +…

michtio/craftcms-claude-skills · 353 tokens

pinocchio-development

Comprehensive guide for building high-performance Solana programs using Pinocchio - the zero-dependency, zero-copy framework. Covers account validation, CPI patterns, optimization techniques, and migration from Anchor.

sendaifun/skills · 44 tokens

generate-tests

Generate unit tests for a .NET service following the coverage-kit conventions. Use when the user asks to 'generate tests', 'backfill tests', 'characterize this service', or 'add tests for' a target after coverage-init has run. Operates in characterization mode (freeze current behavior for existing code) or spec mode…

livlign/claude-skills · 179 tokens

rust-testing

Design Rust tests that catch real regressions — unit, integration, doc, property, snapshot, and golden tests, and differential tests that prove a port matches its source. Use when writing or reviewing Rust tests, when a change lands without tests, when deciding what form a test should take, when a port needs parity…

rewrite-rs/skills · 86 tokens

building-telegram-bots

Writes correct, version-aware Telegram bot code. Use when writing, extending, or debugging a Telegram bot in python-telegram-bot, aiogram, grammY, or Telegraf. Not for Telegram client API (TDLib), languages other than Python and Node.js, or non-Telegram platforms.

isvlasov/rageatc-oss · 68 tokens

phx-verify

Verify Elixir/Phoenix changes — compile, format, and test in one loop. Use after implementation, before PRs, or after fixing bugs.

oliver-kriska/claude-elixir-phoenix · 36 tokens