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.
npx skills add xobotyi/cc-foundry --skill rust-testinggit clone --depth 1 https://github.com/xobotyi/cc-foundryWrote 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.
[](https://agentmods.dev/skills/xobotyi/cc-foundry/rust-testing)<a href="https://agentmods.dev/skills/xobotyi/cc-foundry/rust-testing"><img src="https://agentmods.dev/badge/skills/xobotyi/cc-foundry/rust-testing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/xobotyi/cc-foundry/rust-testing"><img src="https://agentmods.dev/badge/skills/xobotyi/cc-foundry/rust-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00070 | $0.02312 |
| Opus 5.5 | $0.00028 | $0.00925 |
| Sonnet 5.5 | $0.00014 | $0.00462 |
| Haiku 4.5 | $0.00007 | $0.00231 |
Grade A, and why
rust-testing 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 1mo ago.
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.
How it starts
The opening of the file, as written. The whole thing — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust Testing
Prefer real implementations and hand-written fakes over heavy mocking — a test wired to a mock asserts how the code calls its collaborators, not what the code does. Tests are documentation that runs: a reader should learn the intended behavior from the test name, the arrange/act/assert shape, and the doctest examples on public items. Test the public contract, not the private call graph.
Route to Reference
- Test layout depth —
${CLAUDE_SKILL_DIR}/references/layout.mdUnit vs integration vs doctest mechanics,tests/crate-per-file model,tests/common/mod.rsshared-helper pattern, binary-cratelib.rssplit, doctest attributes (no_run,should_panic,ignore, hidden#lines),assert_matches!andpretty_assertionsusage - Property and snapshot testing, benchmarks —
${CLAUDE_SKILL_DIR}/references/property-and-snapshot.mdproptest vs quickcheck strategy authoring and shrinking, insta inline/file snapshots andcargo insta review, criterion harness setup andstd::hint::black_box - Mocking and fixtures —
${CLAUDE_SKILL_DIR}/references/mocking-and-fixtures.mdmockall#[automock]vsmock!, predicates and call counts, the trait-seam pattern for in-memory fakes, rstest#[case]/#[fixture]params, serial_test, assert_cmd + predicates for CLI integration - Async tests —
${CLAUDE_SKILL_DIR}/references/async-tests.md#[tokio::test]flavors,tokio::time::pause/advancefor deterministic timers, tokio-test macros; cross-references therustskill async reference for runtime semantics - Pinned crate versions —
${CLAUDE_SKILL_DIR}/references/versions.mddate-stamped dev-dependency versions for the testing ecosystem crates ("as of 2026-06")
Read the relevant reference before writing non-trivial tests in that area.
Test Layout
- Place unit tests in a
#[cfg(test)] mod testsblock in the same file as the code under test; bring the parent into scope withuse super::*.#[cfg(test)]keeps test code (and its helpers) out of the build artifact. - Use unit tests to exercise private items — Rust's privacy rules let a child
testsmodule reach its ancestors, so testing internals is possible. Reserve this for genuinely tricky private logic; prefer driving private code through the public API. - Place integration tests in the top-level
tests/directory, next tosrc/. Cargo compiles each file as its own crate, so they reach only the public API viause my_crate::...— exactly as an external consumer would. - Share integration-test helpers from
tests/common/mod.rs, nottests/common.rs. Themod.rsform is not compiled as a separate test crate, so it produces no spurious empty "running 0 tests" section. Import it withmod common;. - For a binary crate, keep
main.rsa thin shell that calls intolib.rs; integration tests then exercise the library crate, since only library crates expose items to externaluse. - Write doctests as
///examples on public items. They double as compiled documentation and run undercargo test --doc. Hide setup lines with a leading#and use```no_runfor examples that must compile but not run.
What ships with it
6 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.
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.
- 1mo ago First seen · 145 lines · 70 tokens per session scan A 2e4d27bd2d9c
rust-testing is a skill published in the GitHub repository xobotyi/cc-foundry (22 stars, last pushed 7d ago), licensed MIT. It adds 70 tokens to every session and 2,312 once invoked, about $0.0003 per session on Opus 5.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-04.
Other skills, from other repositories
rust-development
Idiomatisk Rust-utvikling med cargo, clippy, error handling, async/tokio, unsafe og testing.
rust-testing-quality
Use when writing, organizing, or running Rust tests — unit, integration, doc-tests, proptest, criterion benchmarks, or cargo-mutants. Not for CI pipeline wiring (rust-tooling-cicd).
testing-rust
Writes tests following TDD (using cargo test, proptest, and insta) best practices. Use when writing unit tests, integration tests, or property-based tests in Rust.
rust-best-practices
Write, review, refactor, or optimize Rust, including ownership, errors, Tokio, traits, tests, benchmarks, Clippy, and documentation. Excludes other languages and architecture unrelated to Rust idioms.
testing
Rust testing — unit/integration layout, mocking with mockall, async test patterns, property testing, snapshot testing. Use whenever writing or reviewing Rust tests, setting up test infrastructure, choosing mocking strategies, organizing test modules, debugging test failures, or when the user asks about testing…
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…