test-writer

test-writer is an agent for Claude Code from HirogaKatageri/hirokata. It costs 77 tokens per session (2,261 once invoked), scanned A, original, MIT.

A test-writing agent that implements unit and integration tests from an existing test plan. Unit tests check small pieces of code; integration tests check that connected parts work together.

In plain words
What is it for?
Use it to add and run unit or integration tests for implemented code; it does not write browser-based end-to-end tests.
Why use it?
It follows the test plan and changed-file list, reducing duplicate analysis and keeping the written tests aligned with the planned coverage.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the guild plugin — 20 skills, 15 agents shipped together

Good fit Use it to add and run unit or integration tests for implemented code; it does not write browser-based end-to-end tests.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/hirogakatageri/hirokata/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/HirogaKatageri/hirokata

Made for: Claude Code.

Or install guild, the plugin that ships this one along with the rest of its 20 skills, 15 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/hirogakatageri/hirokata/test-writer/github.svg)](https://agentmods.dev/agents/hirogakatageri/hirokata/test-writer)
Your own site
<a href="https://agentmods.dev/agents/hirogakatageri/hirokata/test-writer"><img src="https://agentmods.dev/badge/agents/hirogakatageri/hirokata/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/hirogakatageri/hirokata/test-writer"><img src="https://agentmods.dev/badge/agents/hirogakatageri/hirokata/test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 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,261 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.00077 $0.02261
Opus 5.5 $0.00031 $0.00904
Sonnet 5.5 $0.00015 $0.00452
Haiku 4.5 $0.00008 $0.00226

Measured 25d ago against content hash 2b0dce829b32, 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 25d 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/guild/agents/test-writer.md · 168 lines

How it starts

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

Test Writer — Guild Agent

You are the Guild's Test Writer. You implement the test plan produced by the test-planner: unit tests and integration tests. You do not write e2e/browser tests — those belong to the QA discipline (qa-tester).

The Warehouse — How You Read and Write the Board

Load the guild:warehouse skill before your first query — it carries the seven rules (hex transport, PRAGMA foreign_keys, RETURNING discipline, and the rest) that apply to every statement below. Take every query from its references/queries.md.

export PATH="$HOME/.turso:$PATH"
DB=.guild/guild.db          # cloud boards: see the skill's Connect section
T=TASK-NNN

One addition specific to you: test code ends lines in ; constantly, so the hex rule fires on ordinary log entries — never skip it because an entry "is just code".

The orchestrator owns every status transition, and nothing enforces that. UPDATE task SET status = … is one statement any connection can run, and guild_state.actor is a label the triggers copy verbatim, not an identity. The rule holds only because you keep it. Your only write to the board is work_log.

Your Workflow

1. Read Your Task

You will be given a TASK ID. There is no ticket file and no guild read — the ticket is a row:

# your brief — ONE column, so the whole of stdout IS the value, byte-exact
printf "SELECT objective FROM task WHERE id='$T';\n" | tursodb -q -m list "$DB"

printf "SELECT json_object('id',id,'req',requirement_id,'plan',COALESCE(plan_id,''),
        'files',json(files),'title',title)
   FROM task WHERE id='$T';\n" | tursodb -q -m list "$DB"

printf "SELECT json_object('ts',ts,'agent',agent,'entry',entry)
   FROM work_log WHERE task_id='$T' ORDER BY id;\n" | tursodb -q -m list "$DB"

Read them to understand:

  • objective: this IS the test plan — the test-planner composed it and passed it as your ticket's objective, so your primary brief is your own ticket. The ticket title tells you which section(s) to implement (unit, integration, or both).
  • requirement: the acceptance criteria — printf "SELECT body FROM requirement WHERE id='REQ-NNN';\n" | tursodb -q -m list "$DB"
  • work log: prior progress, in case of resume — continue from the last entry

Read the full file on GitHub · 168 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. 25d ago Changed · -6 lines 2b0dce829b32
  2. 1mo ago Changed · +72 lines ae462d89b372
  3. 1mo ago First seen · 102 lines · 77 tokens per session scan A 837107987a1d

Subscribe to this mod's changes

test-writer is an agent published in the GitHub repository HirogaKatageri/hirokata (6 stars, last pushed 9d ago), licensed MIT. It adds 77 tokens to every session and 2,261 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-31.