test-write

test-write is a command for Claude Code from dwarvesf/dwarves-kit. It costs 47 tokens per session (1,342 once invoked), scanned A, original, MIT.

A command that turns an already-reviewed test plan into real tests that can run in the project. It only proceeds when the plan has a current SOLID verdict, meaning the review found it complete enough to use.

In plain words
What is it for?
Use it to create executable test cases, with one test case for each row in the approved coverage matrix.
Why use it?
It prevents unreviewed, missing, or outdated test plans from being turned into test code.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the kit plugin — 14 skills, 39 commands, 31 agents, 9 hooks shipped together

Good fit Use it to create executable test cases, with one test case for each row in the approved coverage matrix.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/dwarvesf/dwarves-kit/test-write
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.

Clone the repo
git clone --depth 1 https://github.com/dwarvesf/dwarves-kit

Made for: Claude Code.

Or install kit, the plugin that ships this one along with the rest of its 14 skills, 39 commands, 31 agents, 9 hooks.

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 test-write

README.md
[![agentmods](https://agentmods.dev/badge/commands/dwarvesf/dwarves-kit/test-write/github.svg)](https://agentmods.dev/commands/dwarvesf/dwarves-kit/test-write)
Your own site
<a href="https://agentmods.dev/commands/dwarvesf/dwarves-kit/test-write"><img src="https://agentmods.dev/badge/commands/dwarvesf/dwarves-kit/test-write/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 test-write

Your own site · 80×15
<a href="https://agentmods.dev/commands/dwarvesf/dwarves-kit/test-write"><img src="https://agentmods.dev/badge/commands/dwarvesf/dwarves-kit/test-write.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,342 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.00047 $0.01342
Opus 5.5 $0.00019 $0.00537
Sonnet 5.5 $0.00009 $0.00268
Haiku 4.5 $0.00005 $0.00134

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

Security

Grade A, and why

test-write 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.

commands/test-write.md · 61 lines

How it starts

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

You are a test-write dispatcher. Your job is to take a spec's ALREADY-REVIEWED ## Test plan (post /kit:test-plan-review-team, verdict SOLID) and turn it into real, executing test code by dispatching kit:test-writer. You do no test-design work yourself , resolution and gating only, same coordinator shape as test-harden.md.

Process

Bracket the phase for timing before starting: bash lib/gate/gate-ledger.sh outcome <rid> test-write start.

Step 1: Find the active spec

Detect the active docs/specs/SPEC-NNN-<slug>.md the same branch-aware way /kit:test-plan uses. If several specs match, ask the user which one, do not auto-pick.

Step 2: Require a fresh SOLID verdict

Read the spec's ## Test plan and ## Test plan critique sections. All of the following must hold, or you stop (see Step 3):

  1. Present. The spec has both a ## Test plan and a ## Test plan critique section. Missing either -> stop.
  2. Exactly one match. grep -c "^## Test plan critique" on the spec is exactly 1. Zero means no critique ever ran; more than one means the replace-not-stack rule (test-plan-review-team.md Step 5) was violated somewhere and the file is not trustworthy , either way, stop rather than guess which copy is current.
  3. Verdict is SOLID. The critique's ### Verdict: line reads exactly SOLID, not REVISE or RECONSIDER, and there is exactly one ### Verdict: line (more than one is the same untrustworthy-file case as check 2).
  4. Fresh, not stale. Compare the Date: line under ## Test plan against the Date: line under ## Test plan critique. The critique's date must be on or after the plan's date. If the plan's date is later, the plan was rewritten after the critique ran (e.g. a re-run of /kit:test-plan) and the SOLID verdict no longer describes the matrix in front of you , treat as stale, same as missing.

This is the same freshness/exactly-one-match discipline /kit:test-harden codifies for its own verdict read, reused inline here rather than re-derived, since test-harden.md had not landed in this repo as of this writing.

Read the full file on GitHub · 61 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. 1mo ago Changed 7aa39a34feaa
  2. 1mo ago First seen · 61 lines · 47 tokens per session scan A e25ecbfc8a66

Subscribe to this mod's changes

test-write is a command published in the GitHub repository dwarvesf/dwarves-kit (12 stars, last pushed yesterday), licensed MIT. It adds 47 tokens to every session and 1,342 once invoked, about $0.0002 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.