Skip to main content
subagent

test-generator — Claude Code subagent: tests and install

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

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --agent development-team/test-generator
Open on GitHub

What test-generator 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.

What it helps with

  • 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 for the agent

  • 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.

How to install test-generator

1claude-code-templates

npx claude-code-templates@latest --agent development-team/test-generator

2Manually: put the files in place

.claude/agents/test-generator.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about test-generator

How do I install test-generator in Claude Code?

Run npx claude-code-templates@latest --agent development-team/test-generator, then use the file .claude/agents/test-generator.md.

What does test-generator do?

It examines code changes, existing tests, and repository conventions, then produces a detailed test plan with setup, actions, assertions, categories, and priorities.

Which project conventions does test-generator inspect?

It checks CLAUDE.md, test structure, naming patterns, mocking practices, and the project’s approach to unit, integration, and e2e tests.

Similar subagents

All subagents for Testing and QA →

From the same set495

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor