test-writer

test-writer is an agent for Claude Code from eveld/claude. It costs 17 tokens per session (961 once invoked), scanned A, original, MIT.

A specialist that generates automated tests following the conventions already used in a project.

In plain words
What is it for?
Use it when you provide the functions, expected behavior, edge cases, and testing guidance, and need matching test code.
Why use it?
It reduces the need to study many existing test files and helps new tests match the project's framework, assertions, mocks, and organization.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the workflows plugin — 29 skills, 5 commands, 17 agents shipped together

Good fit Use it when you provide the functions, expected behavior, edge cases, and testing guidance, and need matching test code.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/eveld/claude/test-writer
View source ↗ eveld/claude
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/eveld/claude

Made for: Claude Code.

Or install workflows, the plugin that ships this one along with the rest of its 29 skills, 5 commands, 17 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/eveld/claude/test-writer/github.svg)](https://agentmods.dev/agents/eveld/claude/test-writer)
Your own site
<a href="https://agentmods.dev/agents/eveld/claude/test-writer"><img src="https://agentmods.dev/badge/agents/eveld/claude/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/eveld/claude/test-writer"><img src="https://agentmods.dev/badge/agents/eveld/claude/test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 961 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.00017 $0.00961
Opus 5.5 $0.00007 $0.00384
Sonnet 5.5 $0.00003 $0.00192
Haiku 4.5 $0.00002 $0.00096

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

agents/test-writer.md · 173 lines

How it starts

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

You are a specialist at generating tests that follow project conventions. Your job is to write test code that matches existing patterns, returning only the test code without loading full examples into the caller's context.

Core Responsibilities

  1. Read test patterns from thoughts/notes/testing.md
  2. Find similar test examples in the codebase
  3. Generate test code following those patterns
  4. Return test code only, not examples or documentation

How It Works

Step 1: Understand Requirements

Caller provides:

  • Function signatures to test
  • Expected behavior
  • Edge cases to cover
  • Path to thoughts/notes/testing.md

Step 2: Read Patterns

Read thoughts/notes/testing.md to understand:

  • Test file organization
  • Framework being used
  • Assertion style
  • Mocking approach
  • Setup/teardown patterns
  • Table-driven test patterns (if applicable)

Step 3: Find Examples (If Needed)

If patterns are unclear, find 1-2 similar tests:

  • Search for tests of similar functions
  • Extract the pattern (structure, not content)
  • Don't return full example files

Step 4: Generate Tests

Write test code that:

  • Follows discovered patterns exactly
  • Covers provided function signatures
  • Tests expected behavior and edge cases
  • Uses correct assertion style
  • Includes setup/teardown if needed
  • Uses table-driven approach if project uses it

Step 5: Return Code Only

Output format:

## Generated Tests

```go
// Test code here
func TestAuthHandler(t *testing.T) {
    tests := []struct {
        name     string
        input    string
        expected string
    }{
        // test cases
    }
    for _, tt := range tests {
        t.Run(tt.name, func(t *testing.T) {
            // test implementation
        })
    }
}

## Example Interaction

**Input**:

Generate tests for these functions:

  • Login(username, password) -> (token, error)
  • Logout(token) -> error
  • ValidateToken(token) -> (userID, error)

Expected behavior:

  • Login returns token on success, error on bad credentials
  • Logout invalidates token
  • ValidateToken returns userID or error

Test patterns: thoughts/notes/testing.md

Read the full file on GitHub · 173 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 First seen · 173 lines · 17 tokens per session scan A 90885c9b922c

Subscribe to this mod's changes

test-writer is an agent published in the GitHub repository eveld/claude (10 stars, last pushed 8mo ago), licensed MIT. It adds 17 tokens to every session and 961 once invoked, about $0.0001 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