
关于
多代理编排模式。适用于多个独立任务可以使用不同领域专长并行运行,或全面分析需要多视角的场景。
name: parallel-agents description: "多智能体编排模式。适用于多个独立任务可以使用不同领域专业知识并行运行,或全面分析需要多角度视角的场景。" risk: unknown source: community date_added: "2026-02-27"
原生并行智能体
通过 Claude Code 内置 Agent 工具进行编排
概述
本技能通过 Claude Code 的原生智能体系统协调多个专业智能体。与外部脚本不同,这种方法将所有编排保持在 Claude 的控制范围内。
何时使用编排
适合:
- 需要多个专业领域的复杂任务
- 从安全、性能和质量角度进行代码分析
- 全面审查(架构 + 安全 + 测试)
- 需要后端 + 前端 + 数据库工作的功能实现
不适合:
- 简单的单领域任务
- 快速修复或小改动
- 一个智能体就足够的任务
原生智能体调用
单个智能体
Use the security-auditor agent to review authentication
顺序链
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.
带上下文传递
Use the frontend-specialist to analyze React components.
Based on those findings, have the test-engineer generate component tests.
恢复之前的工作
Resume agent [agentId] and continue with additional requirements.
编排模式
模式 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 findings
模式 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 recommendations
模式 3:安全审计
Agents: security-auditor → penetration-tester → synthesis
1. security-auditor: Configuration and code review
2. penetration-tester: Active vulnerability testing
3. Synthesize with prioritized remediation
可用智能体
| 智能体 | 专业领域 | 触发短语 |
|-------|-----------|-----------------|
| orchestrator | 协调 | "comprehensive", "multi-perspective" |
| security-auditor | 安全 | "security", "auth", "vulnerabilities" |
| penetration-tester | 安全测试 | "pentest", "red team", "exploit" |
| backend-specialist | 后端 | "API", "server", "Node.js", "Express" |
| frontend-specialist | 前端 | "React", "UI", "components", "Next.js" |
| test-engineer | 测试 | "tests", "coverage", "TDD" |
| devops-engineer | DevOps | "deploy", "CI/CD", "infrastructure" |
| database-architect | 数据库 | "schema", "Prisma", "migrations" |
| mobile-developer | 移动端 | "React Native", "Flutter", "mobile" |
| api-designer | API 设计 | "REST", "GraphQL", "OpenAPI" |
| debugger | 调试 | "bug", "error", "not working" |
| explorer-agent | 探索 | "explore", "map", "structure" |
| documentation-writer | 文档 | "write docs", "create README", "generate API docs" |
| performance-optimizer | 性能 | "slow", "optimize", "profiling" |
| project-planner | 规划 | "plan", "roadmap", "milestones" |
| seo-specialist | SEO | "SEO", "meta tags", "search ranking" |
| game-developer | 游戏开发 | "game", "Unity", "Godot", "Phaser" |
Claude Code 内置智能体
这些与自定义智能体协同工作:
| 智能体 | 模型 | 用途 | |-------|-------|---------| | Explore | Haiku | 快速只读代码库搜索 | | Plan | Sonnet | 规划模式中的研究 | | General-purpose | Sonnet | 复杂的多步骤修改 |
使用 Explore 进行快速搜索,使用自定义智能体获取领域专业知识。
综合协议
所有智能体完成后,进行综合:
## 编排综合
### 任务摘要
[完成了什么]
### 智能体贡献
| 智能体 | 发现 |
|-------|---------|
| security-auditor | 发现了 X |
| backend-specialist | 识别了 Y |
### 综合建议
1. **关键**:[来自智能体 A 的问题]
2. **重要**:[来自智能体 B 的问题]
3. **锦上添花**:[来自智能体 C 的增强]
### 行动项
- [ ] 修复关键安全问题
- [ ] 重构 API 端点
- [ ] 添加缺失的测试
最佳实践
- 可用智能体 - 17个专业智能体可供编排
- 逻辑顺序 - 发现 → 分析 → 实现 → 测试
- 共享上下文 - 将相关发现传递给后续智能体
- 单一综合 - 一份统一报告,而非分散输出
- 验证变更 - 始终包含 test-engineer 进行验证