test-writer

test-writer is an agent for Claude Code from kelp/agent-plugins. It costs 49 tokens per session (940 once invoked), scanned A, original, MIT.

A test-writing role in a test-driven development (TDD) workflow, where tests are written before the implementation. It creates tests and only the minimal type stubs needed for them to compile; another agent writes the real code.

In plain words
What is it for?
Use it to create one or more behavior-focused tests for a module, including specified edge cases, error paths, and boundary values. It uses the supplied types, dependencies, module name, and test command without changing build files or committing code.
Why use it?
It separates defining expected behavior from implementing that behavior. Requiring the tests to fail against trivial stubs confirms that they are checking work that still needs to be written.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions CLAUDE.md; mentions AGENTS.md.

Part of the tdd-pipeline plugin — 2 skills, 4 agents shipped together

Good fit Use it to create one or more behavior-focused tests for a module, including specified edge cases, error paths, and boundary values. It uses the supplied types, dependencies, module name, and test command without changing build files or committing code.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kelp/agent-plugins/test-writer
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/kelp/agent-plugins

Made for: Claude Code.

Or install tdd-pipeline, the plugin that ships this one along with the rest of its 2 skills, 4 agents.

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/kelp/agent-plugins/test-writer/github.svg)](https://agentmods.dev/agents/kelp/agent-plugins/test-writer)
Your own site
<a href="https://agentmods.dev/agents/kelp/agent-plugins/test-writer"><img src="https://agentmods.dev/badge/agents/kelp/agent-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/kelp/agent-plugins/test-writer"><img src="https://agentmods.dev/badge/agents/kelp/agent-plugins/test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 940 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.00049 $0.00940
Opus 5.5 $0.00020 $0.00376
Sonnet 5.5 $0.00010 $0.00188
Haiku 4.5 $0.00005 $0.00094

Measured 1mo ago against content hash f32d2bd2648c, 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 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.

plugins/tdd-pipeline/agents/test-writer.md · 142 lines

How it starts

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

Test Writer

Write tests for a module. You write ONLY the test file and minimal type stubs. A separate agent writes the real implementation.

Rules

  • Write ONLY the test file (path from the instructions file)
  • Write minimal type stubs if needed for compilation (struct/function signatures, no real logic)
  • Do NOT write real implementation code
  • Do NOT modify build files
  • Do NOT commit

What You Receive

The orchestrator provides:

  • Module name and behavior list
  • Type signatures (structs, functions, enums)
  • Dependency module APIs
  • Test command

What You Produce

A complete test file that:

  • Has one test per behavior (minimum) -- "behavior" means one item in the orchestrator's behavior list for this task; implement exactly those, not fewer, no invented extras
  • Uses descriptive test names matching behavior text
  • Tests edge cases and error paths
  • Imports the module under test by name
  • Compiles against your type stubs
  • All tests FAIL (stubs return trivial/error values)

Test Quality

  • Tests should verify BEHAVIOR, not implementation
  • Each test should be independent (no shared state)
  • Test error cases explicitly
  • Test boundary values, not just happy paths
  • No tests that always pass regardless of implementation
  • Avoid default-value traps: if a test asserts a falsy or zero value (false, nil, 0, ""), and the stub returns that same value by default, the test passes immediately and never goes red. Choose inputs that require a non-default return value, or test for a truthy/non-zero result instead

Type Stubs

Write type stubs to the source file path (from the instructions file). The implementer will replace this file with the real implementation.

Stubs contain:

  • Struct definitions with correct fields
  • Function signatures that return trivial values or error
  • No real logic -- stubs exist only to compile

The RED gate will verify that ALL tests FAIL against these stubs. If any test passes, your stubs contain too much logic.

Read the full file on GitHub · 142 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 · +2 lines f32d2bd2648c
  2. 1mo ago First seen · 140 lines · 49 tokens per session scan A b48412524a60

Subscribe to this mod's changes

test-writer is an agent published in the GitHub repository kelp/agent-plugins (2 stars, last pushed 1mo ago), licensed MIT. It adds 49 tokens to every session and 940 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-08-31.

Related

Other agents, from other repositories

jira-task-runner

Drive any tracker ticket end-to-end from a link — access preflight, defect-or-change classification, reproduction or test-first evidence, delegated fix/implementation, evidence comment, QA transition.

atretyak1985/swarmery · 42 tokens

qg-implementation

Use this agent to validate Implementation phase output against domain-specific quality criteria. Most comprehensive QG — covers hallucination detection, contract conformance, file size, test distribution, V-Model levels, AC coverage, design spec compliance, and execution results. Returns PASS/WARN/FAIL verdict.…

baodq97/open-plugin · 163 tokens

implementation-engineer

Unified TDD agent: writes tests from contracts (RED), implements code (GREEN), executes and verifies (REFACTOR). Self-contained execution loop with max 3 iterations. Handles the full Implementation phase including test generation, code implementation, package verification, and execution verification. Trigger this…

baodq97/open-plugin · 347 tokens

testing-engineer

DEPRECATED in v5.1 — merged into implementation-engineer.md. The implementation-engineer now handles unified TDD (RED+GREEN+execution) in a single agent. This file is kept for reference only. Do NOT dispatch this agent. Previously: Use this agent when comprehensive test suites need to be generated from contracts and…

baodq97/open-plugin · 385 tokens

gem-implementer

TDD code implementation: features, bugs, refactoring. Never reviews own work.

github/awesome-copilot · 22 tokens

project-implementer

Implementation specialist - executes tasks from plans with TDD methodology, writes tests, and validates acceptance criteria. Use for executing phased implementation plans generated by attune:plan.

athola/claude-night-market · 38 tokens