test-writer

test-writer is an agent for Claude Code from atretyak1985/swarmery. It costs 39 tokens per session (864 once invoked), scanned A, original, Apache-2.0.

An agent that writes automated tests for different parts of a software project. Test-driven development, or TDD, means writing tests before or alongside the code they check.

In plain words
What is it for?
Use it to create unit, integration, component, and end-to-end tests, including TDD workflows.
Why use it?
It helps cover new or existing behavior with tests instead of relying only on manual checks.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; mentions CLAUDE.md.

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 core plugin — 37 skills, 9 commands, 13 agents shipped together

Good fit Use it to create unit, integration, component, and end-to-end tests, including TDD workflows.

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 atretyak1985/swarmery
Claude Code
/plugin install core

Made for: Claude Code.

Or install core, the plugin that ships this one along with the rest of its 37 skills, 9 commands, 13 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/atretyak1985/swarmery/test-writer/github.svg)](https://agentmods.dev/agents/atretyak1985/swarmery/test-writer)
Your own site
<a href="https://agentmods.dev/agents/atretyak1985/swarmery/test-writer"><img src="https://agentmods.dev/badge/agents/atretyak1985/swarmery/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/atretyak1985/swarmery/test-writer"><img src="https://agentmods.dev/badge/agents/atretyak1985/swarmery/test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 864 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.00039 $0.00864
Opus 5.5 $0.00016 $0.00346
Sonnet 5.5 $0.00008 $0.00173
Haiku 4.5 $0.00004 $0.00086

Measured 2mo ago against content hash d2dfc455b195, 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/core/agents/test-writer.md · 100 lines

How it starts

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

Role

You write tests that would catch the bug the code could actually have. Read the code under test and the neighboring tests first; match the project's frameworks, fixtures, and mocking conventions (project.json → stack, CLAUDE.md, existing __tests__/spec layout) — never import a framework the repo doesn't use.

Sandbox preflight

You may be running inside a git worktree isolate. Before your first read or write, follow ${CLAUDE_PLUGIN_ROOT}/skills/code-standards/resources/sandbox-preflight.md: one operation per Bash call, and confirm ROOT and every path the task names before you rely on it.

What good looks like

  • Behavior over implementation. Assert observable outcomes and contracts; a test that breaks on a harmless refactor is a cost, not coverage.
  • The failure case is the point. Cover the error paths, boundaries, and the regression the brief names — not just the happy path. For TDD briefs, write the failing test first and show it failing.
  • Honest doubles. Mock at the boundary the project already mocks at; never mock the thing under test.
  • Deterministic. No sleeps, no ordering luck, no network unless the suite is explicitly integration/E2E and the project provides the harness.

Deliver

Run the new tests plus the touched suites before reporting. Deliver: files written, test count, what behavior each group pins, the run output, and — when the brief asked for coverage — the measured number against the target. A test you couldn't make pass honestly is reported as such, never skipped or weakened to green.

How to use

What it does

Writes tests in the project's own testing stack — unit through E2E — that pin behavior, cover failure paths, and run green (or intentionally red for TDD) before delivery, with the run output as proof.

When to use it

  • New code needs tests, or a bug fix needs its regression test.
  • TDD: you want the failing test before the implementation.
  • A module's coverage gaps were identified and need closing.

Read the full file on GitHub · 100 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 · -29 lines d2dfc455b195
  2. 2mo ago Changed · +28 lines 6871948f9965
  3. 2mo ago Changed · +8 lines 61eb1de0159a
  4. 3mo ago Changed · -187 lines · +14 tokens per session 33737d5fc324
  5. 3mo ago First seen · 280 lines · 25 tokens per session scan A 10500f62f3f3

Subscribe to this mod's changes

test-writer is an agent published in the GitHub repository atretyak1985/swarmery (9 stars, last pushed today), licensed Apache-2.0. It adds 39 tokens to every session and 864 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

test-writer compared with agents from other repositories

test-writer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
test-writeratretyak1985/swarmeryAgent9todayApache-2.0A39Claude Code
testerAgentWorkforce/relayAgent1.2ktodayApache-2.0A24Claude Code
test-generatortravisjneuman/.claudeAgent116yesterdayMITA27Claude Code
nestjs-testing-expertgiuseppe-trisciuoglio/developer-kitAgent3742mo agoMITA65Claude Code
qa-testerfaizkhairi/claude-code-blueprintAgent7419d agoMITA28Claude Code
test-engineerashrafmusa/agenticanaAgent24d agoMITA49Claude Code
R-testerRoxabi/roxabi-pluginsAgent102d agoAGPL-3.0A77Claude Code