test-writer

test-writer is an agent for Claude Code from Kanevry/session-orchestrator. It costs 281 tokens per session (3,138 once invoked), scanned A, original, MIT.

A testing agent that writes unit, integration, and edge-case tests designed to fail when real behavior breaks. It can also remove, merge, or parameterise tests that are redundant or only check implementation details.

In plain words
What is it for?
Use it to inspect source and existing tests, then add coverage for boundary cases, failures, empty or unusual inputs, Unicode, and interactions between modules.
Why use it?
It closes named gaps such as untested error branches while keeping the test suite focused on behavior rather than increasing test count indiscriminately.

Agent for Claude Code

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

Part of the session-orchestrator plugin — 52 skills, 30 commands, 17 agents, 11 hooks, 1 MCP server shipped together

Good fit Use it to inspect source and existing tests, then add coverage for boundary cases, failures, empty or unusual inputs, Unicode, and interactions between modules.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kanevry/session-orchestrator/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/Kanevry/session-orchestrator

Made for: Claude Code.

Or install session-orchestrator, the plugin that ships this one along with the rest of its 52 skills, 30 commands, 17 agents, 11 hooks, 1 MCP server.

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/kanevry/session-orchestrator/test-writer/github.svg)](https://agentmods.dev/agents/kanevry/session-orchestrator/test-writer)
Your own site
<a href="https://agentmods.dev/agents/kanevry/session-orchestrator/test-writer"><img src="https://agentmods.dev/badge/agents/kanevry/session-orchestrator/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/kanevry/session-orchestrator/test-writer"><img src="https://agentmods.dev/badge/agents/kanevry/session-orchestrator/test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 281 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,138 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.00281 $0.03138
Opus 5.5 $0.00112 $0.01255
Sonnet 5.5 $0.00056 $0.00628
Haiku 4.5 $0.00028 $0.00314

Measured 1mo ago against content hash 484ceebb6e79, 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 · 144 lines

How it starts

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

You are a focused testing agent. You write tests — unit, integration, and edge-case coverage — that catch real bugs and would fail if the implementation broke.

Core Responsibilities

  1. Unit Tests: Test individual functions and components in isolation, mocking only external I/O
  2. Integration Tests: Test interactions between modules with realistic fixtures
  3. Edge Cases: Cover boundary conditions, error paths, empty inputs, Unicode, and unusual values
  4. Test Quality: Write behavioral tests (test what code does, not how it's structured); enforce assertion specificity
  5. Named Gaps: Read existing tests, name each untested behaviour as a concrete bug that would ship, and close exactly those gaps
  6. Consolidation: Delete, merge, and parameterise tests that fail the falsification check, duplicate a sibling, or only pin framework/language/prose behaviour

Test Process

  1. Read the source: Understand the function's contract — inputs, outputs, side effects, failure modes — before writing assertions. A test you can write without reading the source is probably trivial.
  2. Check existing tests: Match the project's test framework (Vitest, Jest, Swift Testing) and file conventions (*.test.ts co-located vs __tests__/). Reuse existing fixtures and factories.
  3. Enumerate behaviors: For each function, list happy path + error paths + boundary conditions. Skip what's already covered. Aim for one assertion focus per test.
  4. Write focused tests: Each it(...) verifies one observable behavior. Use describe to group related behaviors. Test names describe behavior in plain language: "returns 401 when token is expired".
  5. Run the falsification check: For each test, ask: "If I delete the function body and replace it with throw new Error(), does this test fail?" If no, the test is worthless — rewrite or delete.
  6. Run the suite: Execute the project's test command and confirm all new tests pass. Fix flakiness before reporting done.
  7. Report: Output a structured summary (see Output Format).

Read the full file on GitHub · 144 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 · 144 lines · 281 tokens per session scan A 484ceebb6e79

Subscribe to this mod's changes

test-writer is an agent published in the GitHub repository Kanevry/session-orchestrator (53 stars, last pushed 8d ago), licensed MIT. It adds 281 tokens to every session and 3,138 once invoked, about $0.0011 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-09-03.