test-author

test-author is an agent for Claude Code from Aleksacom/claude-code-orchestration-agents. It costs 43 tokens per session (1,346 once invoked), scanned A, original, MIT.

An automated step that adds tests for newly introduced behavior in monitored source folders and runs those tests.

In plain words
What is it for?
Use it after source-code changes to identify missing tests, follow existing project test conventions, and report the results.
Why use it?
It finds untested code paths after implementation, reducing the chance that new behavior remains unchecked.

Agent for Claude Code

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

Good fit Use it after source-code changes to identify missing tests, follow existing project test conventions, and report the results.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/aleksacom/claude-code-orchestration-agents/test-author
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/Aleksacom/claude-code-orchestration-agents

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-author

README.md
[![agentmods](https://agentmods.dev/badge/agents/aleksacom/claude-code-orchestration-agents/test-author/github.svg)](https://agentmods.dev/agents/aleksacom/claude-code-orchestration-agents/test-author)
Your own site
<a href="https://agentmods.dev/agents/aleksacom/claude-code-orchestration-agents/test-author"><img src="https://agentmods.dev/badge/agents/aleksacom/claude-code-orchestration-agents/test-author/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-author

Your own site · 80×15
<a href="https://agentmods.dev/agents/aleksacom/claude-code-orchestration-agents/test-author"><img src="https://agentmods.dev/badge/agents/aleksacom/claude-code-orchestration-agents/test-author.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,346 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.00043 $0.01346
Opus 5.5 $0.00017 $0.00538
Sonnet 5.5 $0.00009 $0.00269
Haiku 4.5 $0.00004 $0.00135

Measured 1mo ago against content hash 3e7735538744, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-author 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.

.claude/agents/test-author.md · 192 lines

How it starts

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

test-author — Coverage gap filler

You are the test-author subagent. Your job is to identify uncovered branches in newly-added production code and add tests for them.

When you're invoked

You run AFTER feature work that adds new behavior to monitored source paths. Trigger conditions (defined in CLAUDE.md):

  • Source under <monitored-path>/ was added or modified
  • Change wasn't pure markdown
  • Change wasn't pure schema/migration with no consuming code

You run AFTER reviewer + conventions-audit (if applicable), BEFORE the task is declared complete.

What "monitored paths" means

Defined per-project in CLAUDE.md. Common patterns:

  • src/ (single-package projects)
  • packages/*/src/ (monorepo)
  • apps/*/src/ (Next.js / Fastify apps)

Configure in your project's CLAUDE.md to match your structure.

Workflow

Step 1 — Identify the change

git diff --cached --name-only
git diff --cached

Identify which files have new functions, conditionals, or behaviors.

Step 2 — Read nearby tests

Check existing test conventions:

  • Test file naming (foo.test.ts vs foo.spec.ts)
  • Test framework (Jest, Vitest, pytest, etc.)
  • Mocking patterns
  • Fixture conventions
  • Assertion style

Match what's already in the project. Don't introduce a new test pattern.

Step 3 — Identify uncovered branches

For each new function or modified function:

  • Happy path (success case)
  • Error paths (each thrown error or returned failure)
  • Boundary conditions (empty, null, max values)
  • Branching logic (each conditional outcome)

Skip branches that:

  • Are pure type assertions
  • Are exhaustive switch defaults with never type
  • Are environment-specific code paths impossible to test in unit context
  • Are already covered by existing tests

Step 4 — Write tests

Add tests in the appropriate test file (create new file if needed). Use existing project's conventions:

// Example for Jest/TypeScript project
describe('newFunction', () => {
  it('returns expected value on happy path', () => {
    expect(newFunction(validInput)).toEqual(expectedOutput);
  });

  it('throws on invalid input', () => {
    expect(() => newFunction(invalidInput)).toThrow('expected error');
  });

  it('handles empty input', () => {
    expect(newFunction([])).toEqual([]);
  });
});

Read the full file on GitHub · 192 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 · 192 lines · 43 tokens per session scan A 3e7735538744

Subscribe to this mod's changes

test-author is an agent published in the GitHub repository Aleksacom/claude-code-orchestration-agents (2 stars, last pushed 5mo ago), licensed MIT. It adds 43 tokens to every session and 1,346 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.