Agent-native test generation

The test-generation layer for every coding agent.

TestGen helps Codex, Claude Code, Cursor, Cline, Continue, Roo Code, Gemini CLI, OpenCode, and MCP hosts generate tests safely. It detects repo frameworks, exposes machine-readable capabilities, creates review-first patches, and validates with your project tooling.

Codex Claude Code OpenCode Cursor Cline Continue Roo Code Gemini CLI MCP JS/TS Python Go Rust Java
Ask Codex: Use TestGen to analyze ./src and generate review-first unit tests.
doctor
repo readiness, frameworks, provider keys
capabilities
commands, schemas, language support
style match
uses nearby tests as framework and fixture context
patches
structured edits your agent can review
validate
write and test only after approval

Built for coding agents first.

TestGen gives every supported agent the same safe testing workflow.

๐Ÿง 

Codex skill

Install .codex/skills/testgen/SKILL.md so Codex knows when and how to generate tests.

โœ๏ธ

Claude Code command

Use the repo-local command to keep Claude in a dry-run, review-first testing flow.

โš™๏ธ

OpenCode command

Give OpenCode the same JSON contract, patch output, and write controls.

๐Ÿ”Œ

MCP server

Expose analyze, generate, and validate as MCP tools for hosts that prefer tool calls.

Agents should inspect before they edit.

TestGen gives LLM coding agents the commands, schemas, and repo context they need to stop guessing.

๐Ÿฉบ

Repo doctor

testgen doctor checks languages, frameworks, test folders, provider keys, ignored files, and suggests the safest first command.

๐Ÿ“ฆ

Capability manifest

testgen capabilities tells agents which commands, flags, languages, frameworks, schemas, and limitations are available.

๐Ÿงญ

Framework detection

Detect Jest, Vitest, pytest, unittest, Go testing, JUnit, xUnit, PHPUnit, RSpec, GoogleTest, Kotest, and more.

{}

Agent-readable schemas

Stable JSON schemas make analyze, generate, patch, validate, capabilities, and error outputs reliable for wrappers and MCP hosts.

One local engine behind every skill.

Users talk to their coding agent. The agent calls TestGen for scanning, generation, patches, and validation.

๐Ÿงช

Review-first generation

Agents start with dry-run artifacts and patches, not silent file writes.

๐Ÿงฌ

Repo-style adaptation

Generated tests follow existing frameworks, helpers, fixtures, mocks, names, and assertions.

๐Ÿ“Š

Cost-aware preflight

Analyze scope and estimated provider cost before sending generation requests.

๐Ÿงฉ

Thin wrappers

Agent files stay small. TestGen owns the actual orchestration.

โœ…

Validation path

After review, agents can write tests and validate them with the project workflow.

Multi-language by default.

TestGen currently supports JavaScript/TypeScript, Python, Go, Rust, Java, C#, PHP, Ruby, C++, and Kotlin.

JavaScript TypeScript

JS / TS

Jest, Vitest

Python

Python

pytest

Go

Go

testing, testify

Rust

Rust

cargo test

Agent-safe workflow

Analyze first.
Patch second.
Write last.

The agent skill is designed to avoid blind edits. It inspects the repo, generates dry-run output, explains the patch, and only writes files after review or explicit instruction.

1 Agent runs testgen analyze for scope and cost
2 Agent generates --dry-run --emit-patch --output-format json
3 Agent writes and validates only when allowed
Install the local engine
curl -fsSL https://raw.githubusercontent.com/princepal9120/testgen/main/install.sh | bash
Install the agent skill
curl -fsSL https://raw.githubusercontent.com/princepal9120/testgen/main/scripts/install-agent-skill.sh | bash
Ask your agent
Use TestGen to analyze this repo and generate review-first tests for ./src.

Agent onboarding stays simple.

Install once per repo, then use plain language with your coding agent.

๐Ÿ“ฆ

Repo-local files

Skills and commands live in the target repo so agents discover the workflow naturally.

๐Ÿ”’

Explicit writes

Dry-run mode is the default. File writes are a separate, intentional step.

๐Ÿ“˜

Docs for agents

The README and integrations docs focus on agent installation, prompts, and behavior.

๐Ÿ› ๏ธ

Contributor friendly

The engine remains testable and maintainable while the product stays skill-first.