Skill 詳細
code-testing-agent
Polyglot test generation and coverage workflow.
使用前に確認
自動レビューは関連性のみを確認し、安全性や推奨を保証しません。使用前に出典の説明を読んでください。
SKILL.md
これはレビュー時に保存された抜粋です。完全で最新の内容は外部ソースを確認してください。
---
name: code-testing-agent
description: >-
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 suite, improve/achieve coverage, extend an
existing suite to cover an untested method, or test an app, API, service,
module, library, or package. Applies to a single function, method or file as
much as to a whole project — scope changes how much of the workflow runs,
never whether the skill applies. Invoke it when the workspace looks sparse,
gutted or partially deleted — then test only the source that remains and
never restore missing source.
Polyglot: C#/.NET, Python, TypeScript/JavaScript, Go, Rust, Java, Ruby.
DO NOT USE FOR: running existing tests (use run-tests); analyzing coverage
reports (use coverage-analysis or crap-score); MSTest-specific test authoring
or modernization (use writing-mstest-tests).
license: MIT
---
# Code Testing Generation Skill
An AI-powered skill that generates comprehensive, workable unit tests for any programming language using a coordinated multi-agent pipeline.
## When to Use This Skill
Use this skill when you need to:
- Generate unit tests for an entire project or specific files
- Improve test coverage for existing codebases
- Create test files that follow project conventions
- Write tests that actually compile and pass
- Add tests for new features or untested code
## When Not to Use
- Running or executing existing tests (use the `run-tests` skill)
- Migrating between test frameworks (use migration skills)
- Writing tests specifically for MSTest patterns (use `writing-mstest-tests`)
- Debugging failing test logic
## How It Works
This skill coordinates multiple specialized agents in a **Research → Plan → Implement** pipeline:
### Pipeline Overview
```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 │
└─────────┘ └───────┘ └───────┘ └───────┘
```
## Step-by-Step Instructions
### Step 1: Determine the user request
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](unit-test-generation.prompt.md). This prompt provides best practices for discovering conventions, parameterization strategies, coverage goals (aim for 80%), and language-specific patterns.
### Step 2: Size the request before invoking anything
Match the machinery to the scope. Running the full pipeline on a one-file
request costs turns and tool calls without improving the tests.
| Scope | What it looks like | How to run it |
| --- | --- | --- |
| **Focused** | One function, class, or file; "tests for X only"; extending an existing suite with the missing cases | Skip the `.testagent/` artifacts and the sub-agent fan-out. Keep the requiremGitHub で全文を読む (外部ページ)