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

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.

agentmods
npx agentmods add agents/fschifone/claude-setup-wizard/test-writer
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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00039 $0.00457
Opus 5 $0.00019 $0.00229
Sonnet 5 $0.00008 $0.00091
Haiku 4.5 $0.00004 $0.00046

Measured 3d ago against content hash 13912c150824, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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. 3d 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 4mo ago), licensed MIT. It adds 39 tokens to every session and 457 once invoked, about $0.0002 per session on Opus 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

pydantic-ai-validator

Testing and validation specialist for Pydantic AI agents. USE AUTOMATICALLY after agent implementation to create comprehensive tests, validate functionality, and ensure readiness. Uses TestModel and FunctionModel for thorough validation.

coleam00/context-engineering-intro · 46 tokens

test-coverage-agent

Use this agent to analyse an entire module or directory for missing test coverage, then generate the missing tests. Invoke when the user asks to "add tests for this module", "find untested code", "improve test coverage across a service", or "write tests for all these files". Prefer this over the inline /test-gen…

kid-sid/claude-spellbook · 84 tokens

tester

Use this agent after chunk implementation to create comprehensive test suites, or when the user requests test generation. Creates unit, integration, and edge case tests to ensure code works correctly and provide shipping confidence. Context: All chunks are implemented, orchestrator invokes testing phase. user: "All…

drobins25/craft · 200 tokens

test-writer

Expert test writer for Go unit/integration tests. Generates comprehensive, maintainable tests. Use PROACTIVELY after code-writer completes.

nylas/cli · 32 tokens

phpt-author

Use to write new .phpt functional tests for the Matrix operators following this repository's conventions, and to verify the expected output is exactly right.

lisachenko/native-php-matrix · 33 tokens

test-writer

为已有行为新增或修复 Dart 单测、Flutter Widget 测试和集成测试;不补写缺失业务实现,也不负责原生端测试。触发词:缺测试、flaky、mocktail、testWidgets、integrationtest。.

bladeofgod/flutter-ai-harness · 59 tokens