harmont-cli: Skill for Claude Code

.claude/skills/writing-rust-tests/SKILL.md

writing-rust-tests is a skill for Claude Code from harmont-dev/harmont-cli. It costs 84 tokens per session (1,822 once invoked), scanned A, original, Apache-2.0.

A set of rules for writing and running Rust tests in a Cargo workspace, which is a project containing multiple related Rust packages.

In plain words
What is it for?
Use it when adding unit or integration tests, expanding test cases, checking command-line programs, using temporary files, or running the Rust test suite.
Why use it?
It keeps tests consistent by requiring the project’s preferred test framework, shared test cases, property testing where appropriate, and repository-specific checks.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is harmont-dev/harmont-cli's own configuration. It tells Claude Code how to work on harmont-cli itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything harmont-cli configures →

Reuse

Borrowing it

Nothing to install: this file belongs to harmont-dev/harmont-cli. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/harmont-dev/harmont-cli/main/.claude/skills/writing-rust-tests/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/harmont-dev/harmont-cli

Made for: Claude Code.

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 writing-rust-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/harmont-dev/harmont-cli/writing-rust-tests/github.svg)](https://agentmods.dev/skills/harmont-dev/harmont-cli/writing-rust-tests)
Your own site
<a href="https://agentmods.dev/skills/harmont-dev/harmont-cli/writing-rust-tests"><img src="https://agentmods.dev/badge/skills/harmont-dev/harmont-cli/writing-rust-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.

agentmods 80×15 button for writing-rust-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/harmont-dev/harmont-cli/writing-rust-tests"><img src="https://agentmods.dev/badge/skills/harmont-dev/harmont-cli/writing-rust-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,822 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00084 $0.01822
Opus 5.5 $0.00034 $0.00729
Sonnet 5.5 $0.00017 $0.00364
Haiku 4.5 $0.00008 $0.00182

Measured 2mo ago against content hash 498a8ffbc50e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

writing-rust-tests 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 2mo 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.

.claude/skills/writing-rust-tests/SKILL.md · 151 lines

How it starts

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

Writing Rust Tests

Overview

This is a Cargo workspace (edition 2024). Tests here follow three non-negotiable defaults:

  1. #[rstest], not bare #[test]. Every test function is annotated #[rstest], even when it takes no cases yet. This keeps the whole suite uniform and lets any test grow cases without a rewrite.
  2. Parametrize with #[case], never duplicate. Two or more test functions that differ only in input/expected values ARE ONE parametrized test. A hand-rolled for loop over inputs IS a parametrized test written wrong.
  3. Reach for proptest when the property holds over a whole domain, not just the few points you picked.

Violating the letter of these rules is violating the spirit. "It's only two cases" and "a loop is basically the same" are how the suite rots into scattered, unreadable #[test] functions.

When to Use

  • Adding a new function/type and covering it with tests.
  • Adding cases to existing tests, or a new crates/<crate>/tests/*.rs integration test.
  • The user says "write tests", "add coverage", "test this", or "run the tests".
  • You are about to write #[test], a for loop inside a test, or the second near-identical test function.

The Decision

digraph t {
    "What am I testing?" [shape=diamond];
    "Same logic, different inputs?" [shape=diamond];
    "Property true over a whole domain?" [shape=diamond];
    "rstest + #[case] per input" [shape=box];
    "proptest! block" [shape=box];
    "single #[rstest] fn" [shape=box];

    "What am I testing?" -> "Same logic, different inputs?";
    "Same logic, different inputs?" -> "rstest + #[case] per input" [label="yes"];
    "Same logic, different inputs?" -> "Property true over a whole domain?" [label="no"];
    "Property true over a whole domain?" -> "proptest! block" [label="yes"];
    "Property true over a whole domain?" -> "single #[rstest] fn" [label="no"];
}

rstest and proptest are already workspace dev-deps (see crates/hm-common). If a crate needs them, add to its [dev-dependencies].

Read the full file on GitHub · 151 lines

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. 2mo ago First seen · 151 lines · 84 tokens per session scan A 498a8ffbc50e

Subscribe to this mod's changes

writing-rust-tests is a skill published in the GitHub repository harmont-dev/harmont-cli (21 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 84 tokens to every session and 1,822 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-08-30.

Related

writing-rust-tests compared with skills from other repositories

writing-rust-tests next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
writing-rust-testsharmont-dev/harmont-cliSkill213mo agoApache-2.0A84Claude Code
dd-code-generationDataDog/pupSkill1.0kyesterdayApache-2.0A16Claude Code
rust-testing-qualityfusengine/codexSkill225d agononeA46Claude Code, Codex
rust-checkHmbown/CodeWhaleSkill41k5d agoMITA15Claude Code, Codex
rust-crate-ciZaxbyHub/opencode-swarmSkill518yesterdayMITA60Claude Code
Agent Browser AutomationPramodDutta/qaskillsSkill2453d agoMITA37Claude Code, Codex
rust-systemsWrongStack/WrongStackSkill404yesterdayMITA93Claude Code