parallel-agents
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNative Parallel Agents
原生并行Agents
Orchestration through Claude Code's built-in Agent Tool
通过Claude Code内置的Agent工具实现编排
Overview
概述
This skill enables coordinating multiple specialized agents through Claude Code's native agent system. Unlike external scripts, this approach keeps all orchestration within Claude's control.
该技能支持通过Claude Code的原生Agent系统协调多个专业Agent。与外部脚本不同,这种方式将所有编排操作置于Claude的控制范围内。
When to Use Orchestration
何时使用编排
✅ Good for:
- Complex tasks requiring multiple expertise domains
- Code analysis from security, performance, and quality perspectives
- Comprehensive reviews (architecture + security + testing)
- Feature implementation needing backend + frontend + database work
❌ Not for:
- Simple, single-domain tasks
- Quick fixes or small changes
- Tasks where one agent suffices
✅ 适用场景:
- 需要多领域专业能力的复杂任务
- 从安全、性能和质量角度进行代码分析
- 全面评审(架构+安全+测试)
- 需要后端+前端+数据库协同完成的功能实现
❌ 不适用场景:
- 简单的单领域任务
- 快速修复或小型变更
- 单个Agent即可完成的任务
Native Agent Invocation
原生Agent调用
Single Agent
单个Agent
Use the security-auditor agent to review authenticationUse the security-auditor agent to review authenticationSequential Chain
链式调用
First, use the explorer-agent to discover project structure.
Then, use the backend-specialist to review API endpoints.
Finally, use the test-engineer to identify test gaps.First, use the explorer-agent to discover project structure.
Then, use the backend-specialist to review API endpoints.
Finally, use the test-engineer to identify test gaps.With Context Passing
上下文传递
Use the frontend-specialist to analyze React components.
Based on those findings, have the test-engineer generate component tests.Use the frontend-specialist to analyze React components.
Based on those findings, have the test-engineer generate component tests.Resume Previous Work
恢复之前的工作
Resume agent [agentId] and continue with additional requirements.Resume agent [agentId] and continue with additional requirements.Orchestration Patterns
编排模式
Pattern 1: Comprehensive Analysis
模式1:综合分析
Agents: explorer-agent → [domain-agents] → synthesis
1. explorer-agent: Map codebase structure
2. security-auditor: Security posture
3. backend-specialist: API quality
4. frontend-specialist: UI/UX patterns
5. test-engineer: Test coverage
6. Synthesize all findingsAgents: explorer-agent → [domain-agents] → synthesis
1. explorer-agent: Map codebase structure
2. security-auditor: Security posture
3. backend-specialist: API quality
4. frontend-specialist: UI/UX patterns
5. test-engineer: Test coverage
6. Synthesize all findingsPattern 2: Feature Review
模式2:功能评审
Agents: affected-domain-agents → test-engineer
1. Identify affected domains (backend? frontend? both?)
2. Invoke relevant domain agents
3. test-engineer verifies changes
4. Synthesize recommendationsAgents: affected-domain-agents → test-engineer
1. Identify affected domains (backend? frontend? both?)
2. Invoke relevant domain agents
3. test-engineer verifies changes
4. Synthesize recommendationsPattern 3: Security Audit
模式3:安全审计
Agents: security-auditor → penetration-tester → synthesis
1. security-auditor: Configuration and code review
2. penetration-tester: Active vulnerability testing
3. Synthesize with prioritized remediationAgents: security-auditor → penetration-tester → synthesis
1. security-auditor: Configuration and code review
2. penetration-tester: Active vulnerability testing
3. Synthesize with prioritized remediationAvailable Agents
可用Agent
| Agent | Expertise | Trigger Phrases |
|---|---|---|
| Coordination | "comprehensive", "multi-perspective" |
| Security | "security", "auth", "vulnerabilities" |
| Security Testing | "pentest", "red team", "exploit" |
| Backend | "API", "server", "Node.js", "Express" |
| Frontend | "React", "UI", "components", "Next.js" |
| Testing | "tests", "coverage", "TDD" |
| DevOps | "deploy", "CI/CD", "infrastructure" |
| Database | "schema", "Prisma", "migrations" |
| Mobile | "React Native", "Flutter", "mobile" |
| API Design | "REST", "GraphQL", "OpenAPI" |
| Debugging | "bug", "error", "not working" |
| Discovery | "explore", "map", "structure" |
| Documentation | "write docs", "create README", "generate API docs" |
| Performance | "slow", "optimize", "profiling" |
| Planning | "plan", "roadmap", "milestones" |
| SEO | "SEO", "meta tags", "search ranking" |
| Game Development | "game", "Unity", "Godot", "Phaser" |
| Agent | 专业领域 | 触发短语 |
|---|---|---|
| 协调管理 | "comprehensive", "multi-perspective" |
| 安全审计 | "security", "auth", "vulnerabilities" |
| 安全测试 | "pentest", "red team", "exploit" |
| 后端开发 | "API", "server", "Node.js", "Express" |
| 前端开发 | "React", "UI", "components", "Next.js" |
| 测试工程 | "tests", "coverage", "TDD" |
| DevOps | "deploy", "CI/CD", "infrastructure" |
| 数据库架构 | "schema", "Prisma", "migrations" |
| 移动开发 | "React Native", "Flutter", "mobile" |
| API设计 | "REST", "GraphQL", "OpenAPI" |
| 调试排查 | "bug", "error", "not working" |
| 项目探索 | "explore", "map", "structure" |
| 文档撰写 | "write docs", "create README", "generate API docs" |
| 性能优化 | "slow", "optimize", "profiling" |
| 项目规划 | "plan", "roadmap", "milestones" |
| SEO优化 | "SEO", "meta tags", "search ranking" |
| 游戏开发 | "game", "Unity", "Godot", "Phaser" |
Claude Code Built-in Agents
Claude Code内置Agents
These work alongside custom agents:
| Agent | Model | Purpose |
|---|---|---|
| Explore | Haiku | Fast read-only codebase search |
| Plan | Sonnet | Research during plan mode |
| General-purpose | Sonnet | Complex multi-step modifications |
Use Explore for quick searches, custom agents for domain expertise.
这些Agent可与自定义Agent配合使用:
| Agent | 模型 | 用途 |
|---|---|---|
| Explore | Haiku | 快速只读代码库搜索 |
| Plan | Sonnet | 规划模式下的调研分析 |
| General-purpose | Sonnet | 复杂多步骤修改 |
快速搜索使用Explore,领域专业分析使用自定义Agent。
Synthesis Protocol
综合汇总规范
After all agents complete, synthesize:
markdown
undefined所有Agent完成任务后,需进行综合汇总:
markdown
undefinedOrchestration Synthesis
Orchestration Synthesis
Task Summary
Task Summary
[What was accomplished]
[What was accomplished]
Agent Contributions
Agent Contributions
| Agent | Finding |
|---|---|
| security-auditor | Found X |
| backend-specialist | Identified Y |
| Agent | Finding |
|---|---|
| security-auditor | Found X |
| backend-specialist | Identified Y |
Consolidated Recommendations
Consolidated Recommendations
- Critical: [Issue from Agent A]
- Important: [Issue from Agent B]
- Nice-to-have: [Enhancement from Agent C]
- Critical: [Issue from Agent A]
- Important: [Issue from Agent B]
- Nice-to-have: [Enhancement from Agent C]
Action Items
Action Items
- Fix critical security issue
- Refactor API endpoint
- Add missing tests
---- Fix critical security issue
- Refactor API endpoint
- Add missing tests
---Best Practices
最佳实践
- Available agents - 17 specialized agents can be orchestrated
- Logical order - Discovery → Analysis → Implementation → Testing
- Share context - Pass relevant findings to subsequent agents
- Single synthesis - One unified report, not separate outputs
- Verify changes - Always include test-engineer for code modifications
- 可用Agent - 可编排17个专业Agent
- 合理顺序 - 探索 → 分析 → 实现 → 测试
- 共享上下文 - 将相关发现传递给后续Agent
- 统一汇总 - 生成一份统一报告,而非多个独立输出
- 验证变更 - 代码修改后始终需包含test-engineer进行验证
Key Benefits
核心优势
- ✅ Single session - All agents share context
- ✅ AI-controlled - Claude orchestrates autonomously
- ✅ Native integration - Works with built-in Explore, Plan agents
- ✅ Resume support - Can continue previous agent work
- ✅ Context passing - Findings flow between agents
- ✅ 单会话管理 - 所有Agent共享上下文
- ✅ AI自主控制 - 由Claude自主完成编排
- ✅ 原生集成 - 与内置的Explore、Plan Agents兼容
- ✅ 支持恢复 - 可继续之前的Agent任务
- ✅ 上下文传递 - 发现结果可在Agent间流转