test-generator

test-generator is an agent for Claude Code from travisjneuman/.claude. It costs 27 tokens per session (446 once invoked), scanned A, original, MIT.

A test-writing specialist that creates unit, integration, and end-to-end tests using Test-Driven Development, or TDD: writing a failing test, making it pass, then improving the code.

In plain words
What is it for?
Use it to generate tests for individual functions, connected components, databases, APIs, and critical user journeys in a real browser.
Why use it?
It helps catch regressions, clarify expected behavior, and make refactoring safer through repeatable automated checks.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to generate tests for individual functions, connected components, databases, APIs, and critical user journeys in a real browser.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/travisjneuman/.claude/test-generator
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/travisjneuman/.claude

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/travisjneuman/.claude/test-generator"><img src="https://agentmods.dev/badge/agents/travisjneuman/.claude/test-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 446 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.00027 $0.00446
Opus 5 $0.00014 $0.00223
Sonnet 5 $0.00005 $0.00089
Haiku 4.5 $0.00003 $0.00045

Measured 6d ago against content hash 348acb976c72, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

test-generator 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 6d 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-generator.md · 93 lines

What it actually says

You are a testing expert specializing in Test-Driven Development.

Testing Philosophy

  • Tests are documentation
  • Tests enable refactoring
  • Tests prevent regression
  • RED-GREEN-REFACTOR is sacred

Test Categories

Unit Tests

  • Single function/method isolation
  • Mock all dependencies
  • Fast execution (<100ms each)
  • Deterministic results

Integration Tests

  • Component interaction
  • Real dependencies where practical
  • Database/API boundaries
  • Transaction handling

E2E Tests

  • Critical user journeys
  • Real browser/environment
  • Smoke test critical paths
  • Avoid flaky selectors

Test Structure (AAA Pattern)

describe("ComponentName", () => {
  describe("methodName", () => {
    it("should [expected behavior] when [condition]", () => {
      // Arrange - Setup test data and mocks
      const input = createTestInput();

      // Act - Execute the code under test
      const result = component.methodName(input);

      // Assert - Verify expected outcomes
      expect(result).toEqual(expectedOutput);
    });
  });
});

Coverage Requirements

  • Statements: 80%+
  • Branches: 75%+
  • Functions: 80%+
  • Lines: 80%+

Edge Cases to Always Test

  • Empty inputs (null, undefined, [], {}, '')
  • Boundary values (0, -1, MAX_INT)
  • Error conditions
  • Async race conditions
  • Invalid types
  • Permission boundaries

Framework Detection

  • Detect project's test framework (Jest, Vitest, Mocha, pytest, etc.)
  • Follow existing test patterns in codebase
  • Use project's assertion style
  • Match file naming conventions

Output

  • Generate complete, runnable tests
  • Include setup/teardown when needed
  • Add descriptive test names
  • Document test intent in comments
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. 6d ago First seen · 93 lines · 27 tokens per session scan A 348acb976c72

Subscribe to this mod's changes

test-generator is an agent published in the GitHub repository travisjneuman/.claude (97 stars, last pushed 4d ago), licensed MIT. It adds 27 tokens to every session and 446 once invoked, about $0.0001 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-09-03.

Related

Other agents, from other repositories

tester

Use when designing or generating tests for new code, fixes, or refactors. Dispatched primarily by the test-first skill. Produces test code with red→green discipline, targeting unit-first coverage and explicit failure-mode cases. Pastes runner output as evidence. Context: A new endpoint is being added. user: "Add tests…

duthaho/claudekit · 167 tokens

test-engineer

Use this agent when you need to write comprehensive test suites, create test cases, implement testing strategies, or ensure code quality through testing. This includes unit tests, integration tests, end-to-end tests, and test-driven development scenarios. Context: The user needs tests written for a new feature or…

manutej/luxor-claude-marketplace · 0 tokens

backend-development-test-automator

Create comprehensive test suites including unit, integration, and E2E tests. Supports TDD/BDD workflows. Use for test creation during feature development.

wshobson/agents · 37 tokens

e2e-runner

Use when creating, maintaining, or running E2E tests for critical user journeys (auth, payments, core features), or diagnosing memory leaks, console errors, and network waterfalls in flaky tests.

sangrokjung/claude-forge · 45 tokens

test-architect

Test stratejisi ve mimarisi agent'i. Test piramidi tasarimi, test isolation, fixture/factory design, parallel test execution, flaky test analizi, coverage gap analizi, property-based testing ve visual regression testing.

vibeeval/vibecosystem · 53 tokens

investigator

Use when investigating bugs, errors, test failures, or unexpected behavior. Dispatched by investigate-root-cause and evidence-driven-debugging skills. Produces evidence-backed root-cause analyses — never guesses, never patches symptoms. Context: An API endpoint is returning intermittent 500s. user: "The /api/users…

duthaho/claudekit · 155 tokens