# test-generator

This subagent studies code changes and project test conventions before outlining useful test cases. Use it when new or changed logic needs coverage.

- subagent · `type=agent` · Claude Code · 1182 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/development-team/test-generator.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/agents/test-generator

## What it does

test-generator starts by mapping the project’s testing context: frameworks, file naming, test layout, mocking style, utilities, and guidance in `CLAUDE.md`. It then examines the changed code, public entry points, dependencies, state changes, failures, and boundary values.

The result is an actionable test plan covering unit, integration, and e2e scenarios. Each case includes a project-style name, category, setup, actions, expected assertions, and priority. The report also points to test file locations, lists mock or fixture needs, and can include code samples that match the surrounding style.

The subagent can use `Glob`, `Grep`, `LS`, `Read`, `BashOutput`, and related tools while inspecting the repository. Because it reads `CLAUDE.md`, that file’s testing guidance affects the generated plan.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --agent development-team/test-generator
```

2. **Manually: put the files in place**
- File: `.claude/agents/test-generator.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/test-generator.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/test-generator.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/development-team/test-generator.md

## When to use it
- map code changes to missing tests
- surface boundary and failure scenarios
- choose unit, integration, or e2e coverage
- list required mocks, fixtures, and test data
- rank proposed checks by priority

## Example prompts
- Review the changes in this branch and prepare a test plan that follows the repository conventions.
- Inspect the existing tests for this module, then propose coverage for the new behavior.
- Find failure and boundary cases in the changed code and provide test examples in the project’s style.

## Similar
- [code-reviewer](https://affpapa.org/en/nevibecode/agents/anthropic-code-reviewer.md) — subagent · 31050 installs
- [code-reviewer](https://affpapa.org/en/nevibecode/agents/code-reviewer.md) — subagent · 31050 installs
- [test-engineer](https://affpapa.org/en/nevibecode/agents/test-engineer.md) — subagent · 9715 installs
- [code-reviewer](https://affpapa.org/en/nevibecode/agents/voltagent-community-code-reviewer.md) — subagent · 31050 installs
- [fullstack-developer](https://affpapa.org/en/nevibecode/agents/fullstack-developer.md) — subagent · 18117 installs
- [prompt-engineer](https://affpapa.org/en/nevibecode/agents/voltagent-community-prompt-engineer.md) — subagent · 16078 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 495 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
