Skip to main content
subagent CX Codex

test-engineer · qdhenry — Claude Code subagent: test generation and coverage

test-engineer writes unit, integration and end-to-end tests for the code you just finished, then reports coverage by line, branch and function. Useful when a feature works but nothing guards it.

no license ★ 1,357 updated 2026-03-01

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/test-engineer.md
Open on GitHub

What test-engineer does

A Claude subagent that writes tests for code you already have and measures how much of it they touch. Its description tells Claude to call it whenever code is written or changed, so it is meant to stay in the loop instead of running once.

The instructions walk through three stages. First it hunts for files with no tests and runs npm test -- --coverage. Then planning: function signatures, boundaries, failure cases, test data. Then the tests themselves, built around setup, action and assertion, with mocks and isolation. Coverage targets are fixed: lines above 90%, branches above 85%, functions above 95%, critical paths at 100%. It finishes with a markdown report that breaks coverage down by module and lists the lines still uncovered.

It holds Read, Write, Edit, Bash, Grep and Glob, so it can edit test files and run the suite itself. The numbers come from npm test -- --coverage; a project without that script leaves the percentages empty and the report a summary of code.

What it helps with

  • write unit tests for a function that just landed
  • find source files with no test file at all
  • read a coverage report by module and spot uncovered branches
  • cover validation errors and failure paths
  • guard critical paths before a release

Example prompts for the agent

  • Use the test-engineer subagent to add tests for UserService, including the validation errors.
  • Run test-engineer and show me which modules fall short on coverage.
  • Have test-engineer write a regression test for the bug we just fixed.

How to install test-engineer

Manually: put the files in place

.claude/agents/test-engineer.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-engineer

How do I install test-engineer in Claude Code?

Copy the agent file into your project at .claude/agents/test-engineer.md.

What does test-engineer do?

It writes tests for new or changed code, from unit and integration cases to end-to-end and regression ones, and produces a coverage report split by module.

What coverage does it aim for?

Lines above 90%, branches above 85%, functions above 95%, and full coverage of critical paths.

Similar subagents

All subagents for Testing and QA →

test-engineer by other authors comes first.

test-engineer official Anthropic The test-engineer subagent captures legacy behavior in tests and compares it with a rewritten implementation. Use it before changing existing modules. CX Codex 9,715installs test-engineer alirezarezvani The test-engineer subagent examines code and plans tests from unit checks to integration and E2E scenarios. Use it when basic test scaffolding needs deeper coverage. CX Codex ★ 788repo stars test-engineer managedcode test-engineer — a subagent for generating, repairing, and improving tests across languages. Works with your project's existing test framework and coordinates specialists for bulk test generation and quality assessment. CX Codex ★ 521repo stars test-engineer Samarth Gupta test-engineer generates tests for critical business logic right after a feature or bug fix, skipping tests written purely to inflate coverage numbers. CX Codex ★ 276repo stars test-coverage cognitedata test-coverage — a skill that finds coverage gaps in a Flows app and closes them: configures tooling, writes the missing tests, refactors code for testability. CX Codex +1 1,900installs test-automator zhaono1 test-automator writes unit, integration and E2E tests, sets up a framework and reports coverage. Useful when a project has few tests or they have drifted. CX Codex +1 823installs test-gaps ruvnet test-gaps detects missing test coverage and suggests tests to write. Helpful right after adding a new feature or before cutting a release. CX Codex +1 755installs test-audit mblode test-audit — a skill for Claude Code, Cursor, Codex and other agents that removes low-value tests from a suite down to a measured target while keeping coverage. Runs as a focused directory audit or a whole-repo campaign with a numeric goal. CX Codex +1 283installs python-testing affaan-m A pytest skill for Python testing with TDD, fixtures, mocks, parametrization, and coverage checks. Use it when building or reviewing test suites. CX Codex +1 6,800installs tdd-workflow Affaan Mustafa tdd-workflow makes the agent write tests before code and keep coverage at 80% or higher across unit, integration and Playwright E2E suites. CX Codex +1 ★ 6,739repo stars

From the same set112

The whole set →
full-stack-developer full-stack-developer — a subagent for full-cycle web engineering that crafts interfaces, builds server logic, and connects databases. Useful when delivering end-to-end features across the entire stack. CX Codex ★ 1,357repo stars handoff-continue handoff-continue writes a handoff document about the current work and starts a fresh Claude session in a Zellij pane with that document as its input. CX Codex +1 ★ 1,357repo stars decision-navigator decision-navigator structures complex choices, scores trade-offs, and quantifies risk factors. Useful when you need to assess the reversibility and consequences of technical plans. CX Codex ★ 1,357repo stars dependency-mapper The dependency-mapper command connects code dependencies, Linear tasks, and Git history into project maps. Use it to spot cycles, blockers, and task order. CX Codex +1 ★ 1,357repo stars audit-layer-boundaries audit-layer-boundaries analyzes architectural layer boundaries in Rust projects. It catches mixed responsibilities, misplaced database logic, and boundary leaks. CX Codex +1 ★ 1,357repo stars skill-generator-agent skill-generator-agent turns a skill spec into files on disk: SKILL.md, helper scripts, reference docs. Then it checks frontmatter and layout. CX Codex ★ 1,357repo stars milestone-tracker milestone-tracker aggregates milestone data from Linear, GitHub, and git history to calculate burn-down velocity and spot schedule risks. CX Codex +1 ★ 1,357repo stars audit-dependencies audit-dependencies audits dependency direction in Rust projects and flags layer violations. Use it when reviewing architecture or preparing a refactor. CX Codex +1 ★ 1,357repo stars

Project sponsors

Companies that keep this analytics open