polyglot-test-agent by github/awesome-copilot
npx skills add https://github.com/github/awesome-copilot --skill polyglot-test-agent一种利用协调的多智能体流水线,为任何编程语言生成全面、可运行单元测试的AI驱动技能。
在以下情况下使用此技能:
此技能在研究 → 规划 → 实施流水线中协调多个专业智能体:
┌─────────────────────────────────────────────────────────────┐
│ 测试生成器 │
│ 协调整个流水线并管理状态 │
└─────────────────────┬───────────────────────────────────────┘
│
┌───────────┼─────────────┐
▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌───────────────┐
│ 研究员 │ │ 规划师 │ │ 实施者 │
│ │ │ │ │ │
│ 分析代码库│→ │ 创建分阶段│→ │ 按阶段编写 │
│ │ │ 计划 │ │ 测试 │
└───────────┘ └───────────┘ └───────┬───────┘
│
┌─────────┬───────┼───────────┐
▼ ▼ ▼ ▼
┌─────────┐ ┌───────┐ ┌───────┐ ┌───────┐
│ 构建器 │ │ 测试器│ │ 修复器│ │ 代码整理器│
│ │ │ │ │ │ │ │
│ 编译代码│ │ 运行 │ │ 修复 │ │ 格式化│
│ │ │ 测试 │ │ 错误 │ │ 代码 │
└─────────┘ └───────┘ └───────┘ └───────┘
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
确保理解用户的要求和测试范围。当用户没有明确表达对测试风格、覆盖率目标或约定的强烈要求时,请参考 unit-test-generation.prompt.md 中的指导原则。该提示提供了发现约定、参数化策略、覆盖率目标(目标是80%)以及语言特定模式的最佳实践。
首先使用您的测试生成请求调用 polyglot-test-generator 智能体:
为 [要测试的路径或描述] 生成单元测试,遵循 [unit-test-generation.prompt.md](unit-test-generation.prompt.md) 指导原则
测试生成器将自动管理整个流水线。
polyglot-test-researcher 智能体分析您的代码库以了解:
输出:.testagent/research.md
polyglot-test-planner 智能体创建一个结构化的实施计划:
输出:.testagent/plan.md
polyglot-test-implementer 智能体按顺序执行每个阶段:
polyglot-test-builder 子智能体验证编译polyglot-test-tester 子智能体验证测试通过polyglot-test-fixer 子智能体polyglot-test-linter 子智能体进行代码格式化每个阶段完成后才开始下一个阶段,确保增量式进展。
所有流水线状态都存储在 .testagent/ 文件夹中:
| 文件 | 用途 |
|---|---|
.testagent/research.md | 代码库分析结果 |
.testagent/plan.md | 分阶段实施计划 |
.testagent/status.md | 进度跟踪(可选) |
为我在 C:\src\Calculator 的 Calculator 项目生成单元测试
为 src/services/UserService.ts 生成单元测试
为身份验证模块添加测试,重点关注边界情况
| 智能体 | 用途 | 工具 |
|---|---|---|
polyglot-test-generator | 协调流水线 | runCommands, codebase, editFiles, search, runSubagent |
polyglot-test-researcher | 分析代码库 | runCommands, codebase, editFiles, search, fetch, runSubagent |
polyglot-test-planner | 创建测试计划 | codebase, editFiles, search, runSubagent |
polyglot-test-implementer | 编写测试文件 | runCommands, codebase, editFiles, search, runSubagent |
polyglot-test-builder | 编译代码 | runCommands, codebase, search |
polyglot-test-tester | 运行测试 | runCommands, codebase, search |
polyglot-test-fixer | 修复错误 | runCommands, codebase, editFiles, search |
polyglot-test-linter | 格式化代码 | runCommands, codebase, search |
polyglot-test-fixer 智能体将尝试解决编译错误。请检查 .testagent/plan.md 以了解预期的测试结构。
请查看测试输出并调整测试预期。某些测试可能需要模拟依赖项。
在初始请求中指定您首选的框架:"为...生成 Jest 测试"
每周安装量
7.4K
代码仓库
GitHub 星标数
27.0K
首次出现
2026年2月18日
安全审计
安装于
codex7.3K
gemini-cli7.3K
opencode7.3K
github-copilot7.3K
cursor7.3K
kimi-cli7.3K
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:
This skill coordinates multiple specialized agents in a Research → Plan → Implement pipeline:
┌─────────────────────────────────────────────────────────────┐
│ 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 polyglot-test-generator agent with your test generation request:
Generate unit tests for [path or description of what to test], following the [unit-test-generation.prompt.md](unit-test-generation.prompt.md) guidelines
The Test Generator will manage the entire pipeline automatically.
The polyglot-test-researcher agent analyzes your codebase to understand:
Output: .testagent/research.md
The polyglot-test-planner agent creates a structured implementation plan:
Output: .testagent/plan.md
The polyglot-test-implementer agent executes each phase sequentially:
polyglot-test-builder subagent to verify compilationpolyglot-test-tester subagent to verify tests passpolyglot-test-fixer subagent if errors occurpolyglot-test-linter subagent for code formattingEach phase completes before the next begins, ensuring incremental progress.
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) |
Generate unit tests for my Calculator project at C:\src\Calculator
Generate unit tests for src/services/UserService.ts
Add tests for the authentication module with focus on edge cases
| Agent | Purpose | Tools |
|---|---|---|
polyglot-test-generator | Coordinates pipeline | runCommands, codebase, editFiles, search, runSubagent |
polyglot-test-researcher | Analyzes codebase | runCommands, codebase, editFiles, search, fetch, runSubagent |
polyglot-test-planner | Creates test plan | codebase, editFiles, search, runSubagent |
polyglot-test-implementer | Writes test files | runCommands, codebase, editFiles, search, runSubagent |
polyglot-test-builder |
The polyglot-test-fixer agent will attempt to resolve compilation errors. Check .testagent/plan.md for the expected test structure.
Review the test output and adjust test expectations. Some tests may require mocking dependencies.
Specify your preferred framework in the initial request: "Generate Jest tests for..."
Weekly Installs
7.4K
Repository
GitHub Stars
27.0K
First Seen
Feb 18, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex7.3K
gemini-cli7.3K
opencode7.3K
github-copilot7.3K
cursor7.3K
kimi-cli7.3K
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装
| Compiles code |
| runCommands, codebase, search |
polyglot-test-tester | Runs tests | runCommands, codebase, search |
polyglot-test-fixer | Fixes errors | runCommands, codebase, editFiles, search |
polyglot-test-linter | Formats code | runCommands, codebase, search |