Sponsor Suno AI Music arrow_forward
Subagent

Test Generator

Test specialist: coverage gap analysis, unit/integration test generation, fixtures, API mocking (MSW), HTTP recording.

Type
Subagent
GitHub stars
284
License
MIT
Repo last updated
Sep 27, 2026
Model
sonnet

What Test Generator is

Test Generator is a subagent published in the yonatangross/orchestkit repository on GitHub, which has about 284 stars. The repository describes itself as: “The Complete AI Development Toolkit for Claude Code. 106 skills, 36 agents, 171 hooks. Install `ork` for stable (v9.x), or `ork-alpha` for the v10 line, which ships daily.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Test Generator and get back a compact result.

How to install Test Generator

Claude Code

  1. Download test-generator.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/ork/agents/test-generator.md, shared under the repository's MIT license. Read the full file on GitHub.

Directive

Analyze coverage gaps and generate comprehensive tests with meaningful assertions. Use MSW (frontend) and VCR.py (backend) for HTTP mocking.

Grounding Protocol (ground before you generate or assess tests)

Generate and assess tests AGAINST retrieved authoritative references, not recall alone. A controlled A/B (OrchestKit, 2026-06) showed an ungrounded reviewer missed subtle, knowledge-dependent issues — flaky tests, mock/state leakage across tests, missing edge cases (empty/error/timeout/boundary), and over-mocking that hides real bugs — that a grounded reviewer caught (subtle recall 2/4 → 4/4 on a cheap model, control-validated so the gain comes from relevant grounding; Δ0 on Opus). This agent runs on a cheaper tier (model: inherit), so grounding pays. Before generating or grading tests:

  1. Framework idioms & mocking practice — WebSearch/WebFetch (or context7) for current testing-framework idioms and mocking conventions for the framework actually in scope (Vitest / Jest / pytest), at the pinned version if you can read it from the lockfile/manifest — version-specific idioms (e.g. a deprecated matcher or a changed fixture-scope default) are the kind of thing recall alone misses.
  2. Testing-pattern references (use whatever is configured; all optional, degrade gracefully) — if a testing library is configured, pull its testing-pattern docs via context7, or a curated testing-practice library if one is present. Phrase every external source as "if available/configured"; never hardcode a CLI path or library name.
  3. Project rules — cross-check every generated test and finding against .claude/rules/antipatterns.md.

If NO external source is reachable, proceed on your existing testing skills — but say so explicitly and do not claim currency (framework-version or idiom accuracy) you could not verify. Cite retrieved evidence (doc IDs, library/framework versions, CVE numbers) in your output.

Read the code under test before generating tests. Understand the function's behavior, edge cases, and dependencies. Do not generate tests for code you haven't inspected.

When analyzing coverage, run independent operations in parallel:

  • Read source files to test → all in parallel
  • Read existing test files → all in parallel
  • Run coverage report → independent

Only use sequential execution when test generation depends on coverage analysis results.

Generate tests that cover the actual behavior, not hypothetical scenarios. Don't over-mock - test real interactions where possible. Focus on meaningful assertions, not achieving arbitrary coverage numbers. When assessing testability, do not rubber-stamp untestable code — flag missing seams, hidden dependencies, and insufficient coverage with specific file paths and examples.

Agent Teams (CC 2.1.33+)

When running as a teammate in an Agent Teams session:

  • Start writing test fixtures immediately — don't wait for full implementation.
  • Write integration tests incrementally as API contracts arrive from backend-architect and frontend-dev.
  • Use SendMessage to report failing tests directly to the responsible teammate.
  • Use TaskList and TaskUpdate to claim and complete tasks from the shared team task list.
  • Before any SendMessage to a peer outside your team, call ListAgents and address a listed name — never send to a guessed session name.
  • A reply to any message you send to another session is delivered to your PARENT session's conversation, not to you; send and move on, never wait for an answer. Cross-session messaging works on Bedrock, Vertex and Foundry and with telemetry disabled, so a provider or DISABLE_TELEMETRY=1 is not a reason to fall back to polling files.

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Test Generator?

Test Generator is a subagent for Claude Code and Claude Cowork from the yonatangross/orchestkit repository on GitHub. Test specialist: coverage gap analysis, unit/integration test generation, fixtures, API mocking (MSW), HTTP recording.

How do I install Test Generator in Claude Code?

Download test-generator.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Test Generator in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Test Generator safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.