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 pproenca/dot-skills --skill rust-write-testsgit clone --depth 1 https://github.com/pproenca/dot-skillsWrote 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/pproenca/dot-skills/rust-write-tests)<a href="https://agentmods.dev/skills/pproenca/dot-skills/rust-write-tests"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/rust-write-tests/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/pproenca/dot-skills/rust-write-tests"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/rust-write-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00064 | $0.02344 |
| Opus 5.5 | $0.00026 | $0.00938 |
| Sonnet 5.5 | $0.00013 | $0.00469 |
| Haiku 4.5 | $0.00006 | $0.00234 |
Grade C, and why
rust-write-tests scanned grade C with 1 finding 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 3mo 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
assert_eq!(cmd.to_string(), "rm -rf /tmp/workspace/build"); How it starts
The opening of the file, as written. The whole thing — 247 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust Test Writing Skill
Write tests that catch real bugs. Every test must guard a specific invariant -- not just prove the code "works."
The "What Could Break?" Framework
Before writing any test, answer these four questions:
- What invariant does this code maintain? (e.g., "deserialized config always has a default profile")
- What edge case would violate it? (e.g., "empty TOML table, missing key, extra unknown key")
- What platform difference could surface? (e.g., "path separators, case sensitivity, symlink behavior")
- What would a future refactor accidentally break? (e.g., "field added to struct but not to Display impl")
If you can only answer #1, your test is a happy-path test. Answer all four and you have a regression suite.
The 5 Test Transformations
Each transformation shows a superficial test pattern and its expert replacement.
Transformation 1: Weak assertions -> whole-object comparison
// BEFORE: proves nothing about the rest of the struct
let result = parse_config(input)?;
assert!(result.is_ok());
// AFTER: catches any unexpected field change
use pretty_assertions::assert_eq;
let result = parse_config(input)?;
assert_eq!(result, Config {
name: "default".into(),
timeout: Duration::from_secs(30),
retries: 3,
verbose: false,
});
Transformation 2: Single happy-path -> targeted test suite
// BEFORE: one test, one path
#[test]
fn test_parse_config() {
let cfg = parse("valid input").unwrap();
assert!(cfg.is_valid());
}
// AFTER: 3-6 tests covering happy, error, edge, platform
#[test]
fn parse_config_returns_defaults_for_minimal_input() { .. }
#[test]
fn parse_config_rejects_negative_timeout() { .. }
#[test]
fn parse_config_preserves_unknown_fields_as_extensions() { .. }
#[test]
fn parse_config_handles_empty_string_gracefully() { .. }
#[cfg(windows)]
#[test]
fn parse_config_normalizes_backslash_paths() { .. }
Transformation 3: Inline test module -> sibling _tests.rs file
What ships with it
2 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.
- 3mo ago First seen · 247 lines · 64 tokens per session scan C ac7751514914
rust-write-tests is a skill published in the GitHub repository pproenca/dot-skills (231 stars, last pushed 3mo ago), licensed MIT. It adds 64 tokens to every session and 2,344 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
rust-write-tests compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| rust-write-testspproenca/dot-skills | Skill | 231 | 3mo ago | MIT | C | 64 | Claude Code, Codex |
| rust-best-practicespedronauck/skills | Skill | 660 | 5d ago | MIT | A | 48 | Claude Code |
| rust-developmentnavikt/copilot | Skill | 65 | yesterday | MIT | A | 27 | Claude Code, Codex |
| rust-testingxobotyi/cc-foundry | Skill | 23 | today | MIT | A | 70 | Claude Code |
| rust-testingrewrite-rs/skills | Skill | 33 | 10d ago | BSD-3-Clause | A | 86 | Claude Code, Codex |
| rust-testing-qualityfusengine/agents | Skill | 34 | 1mo ago | MIT | A | 46 | Claude Code |
| testing-rustqte77/claude-code-plugins | Skill | 3 | yesterday | Apache-2.0 | A | 39 | Claude Code |