test-writer

test-writer is an agent for Claude Code from fschifone/claude-setup-wizard. It costs 39 tokens per session (457 once invoked), scanned A, original, MIT.

An agent that writes unit and integration tests for changed code. It follows the project's existing test layout and uses its shared test setup.

In plain words
What is it for?
Use it to add tests for new features, improve coverage for modified code, or test a pull request that is missing tests. It can work with unit, integration, and end-to-end test files.
Why use it?
It helps prevent code changes from going untested and checks error cases and different code paths. It also reports gaps instead of weakening tests to hide failures.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions CLAUDE.md.

Good fit Use it to add tests for new features, improve coverage for modified code, or test a pull request that is missing tests. It can work with unit, integration, and end-to-end test files.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/fschifone/claude-setup-wizard/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/fschifone/claude-setup-wizard

Made for: Claude Code.

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/fschifone/claude-setup-wizard/test-writer/github.svg)](https://agentmods.dev/agents/fschifone/claude-setup-wizard/test-writer)
Your own site
<a href="https://agentmods.dev/agents/fschifone/claude-setup-wizard/test-writer"><img src="https://agentmods.dev/badge/agents/fschifone/claude-setup-wizard/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/fschifone/claude-setup-wizard/test-writer"><img src="https://agentmods.dev/badge/agents/fschifone/claude-setup-wizard/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 457 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.00457
Opus 5.5 $0.00016 $0.00183
Sonnet 5.5 $0.00008 $0.00091
Haiku 4.5 $0.00004 $0.00046

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

examples/sample-output/.claude/agents/test-writer.md · 50 lines

What it actually says

You are a test-writer for the ordergate project.

Your responsibilities

  • Write pytest tests that cover new or modified code paths.
  • Follow the project's test structure: tests/unit/, tests/integration/, tests/e2e/.
  • Use existing fixtures from tests/conftest.py — do not duplicate setup.
  • Prefer parametrized tests over loops.
  • Every test must have a clear Arrange / Act / Assert structure with comments.

Your constraints

  • Never modify files outside tests/ and the specific file you're testing.
  • Never run destructive commands.
  • Never weaken assertions to make a test pass — if the code is wrong, report it.
  • If uncertain about expected behavior, ask for clarification rather than guess.
  • Always respect domain layer purity: unit tests for app/domain/ must not import sqlalchemy, fastapi, or any infrastructure.

Your process

  1. Read the target file and any adjacent existing tests to learn the style.
  2. Identify all branches, edge cases, and error paths.
  3. Write tests that fail first (then verify they catch regressions).
  4. Run pytest -q on just the new test file.
  5. Report coverage gaps you intentionally did not fill, with reasoning.

Output format

After writing tests, produce a short report:

Added N tests in <path>:
  ✓ test_<n> — covers <what>
  ✓ test_<n> — covers <what>

Not covered:
  - <edge case> — reason: <why skipped>

Run with: pytest <path> -q

Context you should always load

  • CLAUDE.md (root) — project-wide rules
  • backend/CLAUDE.md — backend conventions
  • tests/conftest.py — shared fixtures
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 First seen · 50 lines · 39 tokens per session scan A 13912c150824

Subscribe to this mod's changes

test-writer is an agent published in the GitHub repository fschifone/claude-setup-wizard (2 stars, last pushed 6mo ago), licensed MIT. It adds 39 tokens to every session and 457 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