Install any skill in seconds. Free to start, no credit card required.
Get Started Free →MANDATORY ENTRY POINT for generating or writing tests. Invoke this skill before editing files whenever the user asks to generate tests, write/add unit tests, scaffold a test project or pytest/Vitest/Jest suite, create comprehensive tests, improve/achieve coverage, or test an app, API, service, repository, route, module, library, or package. Supports C#/.NET, Python, TypeScript/JavaScript, Go, Rust, Java, and Ruby. For sparse, gutted-looking, synthetic, or incomplete workspaces, test only the sou
.claude/skills/managedcode-code-testing-agent/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 14% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 51% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 70% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 18% | 0% |
| case-18 | ✗→✓ | ▲ Improved | -8% | 0% |
An AI-powered skill that generates comprehensive, workable unit tests for any programming language using a coordinated multi-agent pipeline.
Use this skill when you need to:
run-tests skill)writing-mstest-tests)This skill coordinates multiple specialized agents in a Research → Plan → Implement pipeline:
text┌─────────────────────────────────────────────────────────────┐ │ TEST GENERATOR │ │ Coordinates the full pipeline and manages state │ └─────────────────────┬───────────────────────────────────────┘ │ ┌─────────────┼─────────────┐ ▼ ▼ ▼ ┌───────────┐ ┌───────────┐ ┌───────────────┐ │ RESEARCHER│ │ PLANNER │ │ IMPLEMENTER │ │ │ │ │ │ │ │ Analyzes │ │ Creates │ │ Writes tests │ │ codebase │→ │ phased │→ │ per phase │ │ │ │ plan │ │ │ └───────────┘ └───────────┘ └───────┬───────┘ │ ┌─────────┬───────┼───────────┐ ▼ ▼ ▼ ▼ ┌─────────┐ ┌───────┐ ┌───────┐ ┌───────┐ │ BUILDER │ │TESTER │ │ FIXER │ │LINTER │ │ │ │ │ │ │ │ │ │ Compiles│ │ Runs │ │ Fixes │ │Formats│ │ code │ │ tests │ │ errors│ │ code │ └─────────┘ └───────┘ └───────┘ └───────┘
Make sure you understand what user is asking and for what scope. When the user does not express strong requirements for test style, coverage goals, or conventions, source the guidelines from unit-test-generation.prompt.md. This prompt provides best practices for discovering conventions, parameterization strategies, coverage goals (aim for 80%), and language-specific patterns.
Start by calling the code-testing-generator agent with your test generation request:
textGenerate unit tests for [path or description of what to test], following the [unit-test-generation.prompt.md](unit-test-generation.prompt.md) guidelines. Treat the current workspace as authoritative even when it is sparse, gutted-looking, synthetic, or missing tracked files; never restore or reconstruct it.
The Test Generator will manage the entire pipeline automatically.
If code-testing-generator is unavailable, do not skip the workflow. Execute the same Research → Plan → Implement sequence inline, create the .testagent/ artifacts described below, and apply the same completion contract.
For multi-file requests:
.testagent/research.md.find-untested-sources once and consume its pairing and suggested-path output; do not repeat that discovery manually.code-testing-extensions only when the repository has no representative tests and the base extension is insufficient.Do not report completion until all of these are true:
.testagent/research.md records the bounded target inventory, existing testconventions, and the acceptance checklist.
.testagent/plan.md maps each checklist item to a planned test or an explicitblocker.
Fix missing mock seams, boundary cases, state transitions, and property combinations even when coverage already passes. In the final summary, cite at least one generated test name for every checklist item so completion is auditable; if an item has no test to cite, keep implementing or report it as blocked. For non-behavioral requirements such as scaffolding, scope limits, commands, or coverage artifacts, cite the relevant file, command, or report instead of forcing a test-name mapping.
test-gap-analysis and assertion-quality when available; otherwise perform the equivalent review inline and record the findings and fixes in .testagent/status.md.
The final response MUST include a compact Requirement | Evidence table. Behavioral rows cite exact generated test names. Non-behavioral rows cite the relevant project file, validation command, or coverage report. A generic list of tested areas is not a substitute for requirement-by-requirement evidence.
All pipeline state is stored in .testagent/ folder:
| File | Purpose | | ------------------------ | ---------------------------- | | .testagent/research.md | Codebase analysis results | | .testagent/plan.md | Phased implementation plan | | .testagent/status.md | Progress tracking (optional) |
| Agent | Purpose | | -------------------------- | -------------------- | | code-testing-generator | Coordinates pipeline | | code-testing-researcher | Analyzes codebase | | code-testing-planner | Creates test plan | | code-testing-implementer | Writes test files | | code-testing-builder | Compiles code | | code-testing-tester | Runs tests | | code-testing-fixer | Fixes errors | | code-testing-linter | Formats code |
The code-testing-fixer agent will attempt to resolve compilation errors. Check .testagent/plan.md for the expected test structure. Call the code-testing-extensions skill and read the language-specific extension file for error code references (e.g., dotnet.md for .NET).
Most failures in generated tests are caused by wrong expected values in assertions, not production code bugs:
[Ignore] or [Skip] just to make them passSpecify your preferred framework in the initial request: "Generate Jest tests for..."
Tests that depend on external services, network endpoints, specific ports, or precise timing will fail in CI environments. Focus on unit tests with mocked dependencies instead.
During phase implementation, build only the specific test project for speed. After all phases, run a full non-incremental workspace build to catch cross-project errors.
Other measured skills in the registry, with their headline benchmark lift.