test-writer

test-writer is an agent for Claude Code from ihudak/ihudak-claude-plugins. It costs 98 tokens per session (2,322 once invoked), scanned A, original, MIT.

A test-writing agent that creates tests for new or changed behavior by examining a task plan and code diff. It detects the project's test framework but does not run the tests.

In plain words
What is it for?
It is for adding tests during implementation work when the project has a detected test framework.
Why use it?
It separates writing tests from checking whether they pass, so the caller can run verification afterward and ask for a test command when the framework is unclear.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the dev-workflows plugin — 5 commands, 12 agents, 1 hook shipped together

Good fit It is for adding tests during implementation work when the project has a detected test framework.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add ihudak/ihudak-claude-plugins
Claude Code
/plugin install dev-workflows

Made for: Claude Code.

Or install dev-workflows, the plugin that ships this one along with the rest of its 5 commands, 12 agents, 1 hook.

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-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/ihudak/ihudak-claude-plugins/test-writer/github.svg)](https://agentmods.dev/agents/ihudak/ihudak-claude-plugins/test-writer)
Your own site
<a href="https://agentmods.dev/agents/ihudak/ihudak-claude-plugins/test-writer"><img src="https://agentmods.dev/badge/agents/ihudak/ihudak-claude-plugins/test-writer/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-writer

Your own site · 80×15
<a href="https://agentmods.dev/agents/ihudak/ihudak-claude-plugins/test-writer"><img src="https://agentmods.dev/badge/agents/ihudak/ihudak-claude-plugins/test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 98 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,322 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.00098 $0.02322
Opus 5.5 $0.00039 $0.00929
Sonnet 5.5 $0.00020 $0.00464
Haiku 4.5 $0.00010 $0.00232

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

Security

Grade A, and why

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

plugins/dev-workflows/agents/test-writer.md · 131 lines

How it starts

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

Write tests for new or changed behavior based on a diff. DO NOT run the tests — the caller (the command) runs test-baseliner in verify mode separately.

Invoked from /implement at Phase 3.5 (SIMPLE / MODERATE, after Phase 3A implementation completes) and inside Phase 3B (SIGNIFICANT / HIGH-RISK, at step 4a — after implementation completes but before the diff is captured for Opus review). This agent runs after the edits, so it settles nothing about which framework the project has: it relays what the baseline recorded before them.

Inputs

The caller passes a structured brief:

  • Task description — what was implemented, verbatim from the user where possible
  • Plan — the approved plan from Phase 2A (standard) or the risk-planner plan from Phase 2B (Opus)
  • Diff — git add -N . && git diff output so new files are included. MANDATORY. Both Plan and Diff may be given inline or as an absolute file path — Read the file first when given a path On a read failure, follow the read-failure contract in ${CLAUDE_PLUGIN_ROOT}/references/context-management.md — Diff is evidence: hard stop, return the Diff: unreadable at <path> shape below (see Output) — a distinct marker from Framework: not detected, so the caller stops the run rather than applying the recorded skip decision to a file it could not read — and never re-derive the diff with a tool of your own. Plan is context: degrade to absent.
  • Project root — absolute path so files can be opened
  • Baseline — the ## Test Baseline block captured by test-baseliner in Pre-Phase 3.5 (identifies the detected framework + the command used + the set of pre-existing passing / failing tests). It is the sole source of framework and command here, and the list of test names already taken

Refuse to write tests without a diff and a baseline — ask the caller to supply them.

Steps

  1. Take the framework. The Baseline block is a required input and already records what test-baseliner detected and ran — read Framework and Command from it rather than re-deriving them here. test-baseliner owns the marker→framework table; a second copy of it in this file would drift, and this agent refuses to run without the baseline that supersedes it anyway. A baseline reading not detected is a not detected result for step 2.

Read the full file on GitHub · 131 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 Changed · -4 lines · +25 tokens per session ae82f6cc9b3c
  2. 3mo ago First seen · 135 lines · 73 tokens per session scan A 0129cb63dbea

Subscribe to this mod's changes

test-writer is an agent published in the GitHub repository ihudak/ihudak-claude-plugins (2 stars, last pushed 2mo ago), licensed MIT. It adds 98 tokens to every session and 2,322 once invoked, about $0.0004 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-31.

Related

test-writer compared with agents from other repositories

test-writer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
test-writerihudak/ihudak-claude-pluginsAgent22mo agoMITA98Claude Code
code-reviewerJose-Ribeir/claude-code-review-gateAgent310d agoApache-2.0A41Claude Code
docs-checkerJose-Ribeir/claude-code-review-gateAgent310d agoApache-2.0A117Claude Code
deep-reviewerJose-Ribeir/claude-code-review-gateAgent310d agoApache-2.0A69Claude Code
code-resolverJose-Ribeir/claude-code-review-gateAgent310d agoApache-2.0A56Claude Code
context-spotterJose-Ribeir/claude-code-review-gateAgent310d agoApache-2.0A68Claude Code
code-filterJose-Ribeir/claude-code-review-gateAgent310d agoApache-2.0A54Claude Code