Parallel Agent Orchestration
Overview
This skill provides patterns for orchestrating multiple specialized agents to work in parallel on complex tasks. Use this for comprehensive code reviews, research-and-implement workflows, and multi-project coordination.
Core Orchestration Patterns
Pattern 1: Parallel Review (Fan-Out/Fan-In)
Launch multiple review agents simultaneously, then consolidate findings.
Use for: Comprehensive code review, pre-PR checks, security audits
Workflow:
- •Identify review dimensions needed
- •Launch agents in parallel (use Task tool multiple times in single message)
- •Wait for all agents to complete
- •Synthesize and deduplicate findings
- •Prioritize and present results
Example:
Launch in parallel: - security-reviewer: "Review authentication changes for vulnerabilities" - performance-optimizer: "Analyze database query performance" - code-reviewer: "Review code quality and conventions" - silent-failure-hunter: "Check error handling completeness" Then synthesize findings into prioritized action items.
Pattern 2: Research & Implement (Sequential Phases)
Explore codebase, design architecture, implement, then review.
Use for: New feature development, major refactoring
Workflow:
Phase 1 - Exploration (parallel):
- •code-explorer: "Analyze similar features"
- •code-explorer: "Map relevant architecture"
- •code-explorer: "Find patterns to follow"
Phase 2 - Design (parallel):
- •code-architect: "Design minimal approach"
- •code-architect: "Design clean architecture approach"
Phase 3 - Implementation:
- •Implement chosen approach
Phase 4 - Review (parallel):
- •security-reviewer, performance-optimizer, test-engineer
Pattern 3: Multi-Project Coordination
Work across multiple projects or repositories simultaneously.
Use for: Monorepo changes, cross-project refactoring
Workflow:
- •Identify all affected projects
- •Launch exploration agents per project (parallel)
- •Identify cross-cutting concerns
- •Plan coordinated changes
- •Implement with consistency checks
Pattern 4: Continuous Quality Pipeline
Automated quality gates throughout development.
Use for: Maintaining code quality during implementation
Workflow:
- •After each significant change, launch self-reviewer
- •On security-sensitive code, auto-trigger security-reviewer
- •Before completion, run orchestrator for full review
- •Record learnings for future sessions
Agent Selection Guide
| Concern | Agent | When to Use |
|---|---|---|
| Security | security-reviewer | Auth code, user input, credentials |
| Performance | performance-optimizer | Queries, loops, data processing |
| Testing | test-engineer | New features, bug fixes |
| Documentation | documentation-writer | APIs, complex logic |
| Quality | code-reviewer (plugin) | All code changes |
| Architecture | code-architect (plugin) | Design decisions |
| Exploration | code-explorer (plugin) | Understanding code |
| Error handling | silent-failure-hunter (plugin) | Critical paths |
Synthesis Best Practices
- •Deduplicate: Multiple agents may find same issue
- •Prioritize: Critical > High > Medium > Low
- •Resolve conflicts: When agents disagree, note both perspectives
- •Aggregate metrics: Combine severity ratings
- •Executive summary: Provide high-level overview first
Example Orchestration Prompts
Comprehensive Review: "Launch security-reviewer, performance-optimizer, code-reviewer, and silent-failure-hunter in parallel to review unstaged changes. Synthesize findings prioritized by severity."
Research & Implement: "First launch 3 code-explorer agents to analyze [feature area], then launch 2 code-architect agents to design approaches, present options for my approval, then implement and review."
Quick Security Check: "Launch security-reviewer focused on the authentication module changes."
Full Pre-PR Review: "Use orchestrator to coordinate a comprehensive review before I create the PR."