parallel-agents

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Native 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 authentication
Use the security-auditor agent to review authentication

Sequential 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 findings
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

Pattern 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 recommendations
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

Pattern 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 remediation

Agents: security-auditor → penetration-tester → synthesis

1. security-auditor: Configuration and code review
2. penetration-tester: Active vulnerability testing
3. Synthesize with prioritized remediation

Available Agents

可用Agent

AgentExpertiseTrigger Phrases
orchestrator
Coordination"comprehensive", "multi-perspective"
security-auditor
Security"security", "auth", "vulnerabilities"
penetration-tester
Security Testing"pentest", "red team", "exploit"
backend-specialist
Backend"API", "server", "Node.js", "Express"
frontend-specialist
Frontend"React", "UI", "components", "Next.js"
test-engineer
Testing"tests", "coverage", "TDD"
devops-engineer
DevOps"deploy", "CI/CD", "infrastructure"
database-architect
Database"schema", "Prisma", "migrations"
mobile-developer
Mobile"React Native", "Flutter", "mobile"
api-designer
API Design"REST", "GraphQL", "OpenAPI"
debugger
Debugging"bug", "error", "not working"
explorer-agent
Discovery"explore", "map", "structure"
documentation-writer
Documentation"write docs", "create README", "generate API docs"
performance-optimizer
Performance"slow", "optimize", "profiling"
project-planner
Planning"plan", "roadmap", "milestones"
seo-specialist
SEO"SEO", "meta tags", "search ranking"
game-developer
Game Development"game", "Unity", "Godot", "Phaser"

Agent专业领域触发短语
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 Built-in Agents

Claude Code内置Agents

These work alongside custom agents:
AgentModelPurpose
ExploreHaikuFast read-only codebase search
PlanSonnetResearch during plan mode
General-purposeSonnetComplex multi-step modifications
Use Explore for quick searches, custom agents for domain expertise.

这些Agent可与自定义Agent配合使用:
Agent模型用途
ExploreHaiku快速只读代码库搜索
PlanSonnet规划模式下的调研分析
General-purposeSonnet复杂多步骤修改
快速搜索使用Explore,领域专业分析使用自定义Agent

Synthesis Protocol

综合汇总规范

After all agents complete, synthesize:
markdown
undefined
所有Agent完成任务后,需进行综合汇总:
markdown
undefined

Orchestration Synthesis

Orchestration Synthesis

Task Summary

Task Summary

[What was accomplished]
[What was accomplished]

Agent Contributions

Agent Contributions

AgentFinding
security-auditorFound X
backend-specialistIdentified Y
AgentFinding
security-auditorFound X
backend-specialistIdentified Y

Consolidated Recommendations

Consolidated Recommendations

  1. Critical: [Issue from Agent A]
  2. Important: [Issue from Agent B]
  3. Nice-to-have: [Enhancement from Agent C]
  1. Critical: [Issue from Agent A]
  2. Important: [Issue from Agent B]
  3. 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

最佳实践

  1. Available agents - 17 specialized agents can be orchestrated
  2. Logical order - Discovery → Analysis → Implementation → Testing
  3. Share context - Pass relevant findings to subsequent agents
  4. Single synthesis - One unified report, not separate outputs
  5. Verify changes - Always include test-engineer for code modifications

  1. 可用Agent - 可编排17个专业Agent
  2. 合理顺序 - 探索 → 分析 → 实现 → 测试
  3. 共享上下文 - 将相关发现传递给后续Agent
  4. 统一汇总 - 生成一份统一报告,而非多个独立输出
  5. 验证变更 - 代码修改后始终需包含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间流转