dispatching-parallel-agents
2
总安装量
2
周安装量
#65222
全站排名
安装命令
npx skills add https://github.com/doanchienthangdev/omgkit --skill dispatching-parallel-agents
Agent 安装分布
opencode
2
antigravity
2
claude-code
2
github-copilot
2
codex
2
kimi-cli
2
Skill 文档
Dispatching Parallel Agents
Quick Start
- Analyze – Identify independent vs dependent tasks
- Group – Create parallel groups with no shared dependencies
- Specialize – Assign agents by expertise (explorer, implementer, reviewer)
- Dispatch – Fan-out tasks with timeouts and concurrency limits
- Aggregate – Combine results using merge, consensus, or priority
- Handle Errors – Retry failed, continue with partial, or fail-fast
Features
| Feature | Description | Guide |
|---|---|---|
| Task Analysis | Identify parallelizable work | No data deps, no shared files, no state |
| Agent Specialization | Match agent type to task | Explorer, implementer, tester, reviewer |
| Fan-Out/Fan-In | Parallel dispatch and aggregation | Promise.all for dispatch, merge results |
| Concurrency Limits | Control parallel agent count | Prevent resource exhaustion |
| Timeout Handling | Bound execution time per agent | Race with timeout, handle gracefully |
| Error Strategies | Handle partial failures | Retry, continue, or fail-fast |
Common Patterns
# Parallel Execution Model
[Main Agent (Orchestrator)]
|
[Task Analysis & Distribution]
|
+---------------+---------------+
| | |
[Agent A] [Agent B] [Agent C]
(Task 1) (Task 2) (Task 3)
| | |
+-------+-------+-------+-------+
|
[Aggregation & Integration]
|
[Final Response]
TIMING:
Sequential: ââââââââââââââââââââââââââââ
Parallel: ââââââââââââ (max of tasks)
// Fan-out/Fan-in Pattern
const [security, performance, style] = await Promise.all([
spawnAgent({ type: 'reviewer', focus: 'security' }),
spawnAgent({ type: 'reviewer', focus: 'performance' }),
spawnAgent({ type: 'reviewer', focus: 'style' }),
]);
return combineReviews([security, performance, style]);
// Parallelization Criteria
CAN PARALLELIZE:
- Independent code changes (different files)
- Research on different topics
- Tests for different modules
- Multi-concern code reviews
CANNOT PARALLELIZE:
- Tasks with data dependencies
- Sequential workflow steps
- Tasks modifying same files
- Tasks sharing mutable state
# Agent Specialization
| Type | Strengths | Best For |
|------|-----------|----------|
| explorer | Finding files, patterns | Initial exploration |
| implementer | Writing production code | Features, bug fixes |
| tester | Test design, edge cases | Unit/integration tests |
| reviewer | Issue identification | Code review, security |
| documenter | Clear explanations | Docs, comments |
Best Practices
| Do | Avoid |
|---|---|
| Identify truly independent tasks first | Parallelizing tasks that share state |
| Use specialized agents for concerns | One agent doing everything |
| Set appropriate timeouts per agent | Unbounded execution time |
| Handle partial failures gracefully | Ignoring failed agent results |
| Use concurrency limits | Spawning unlimited agents |
| Aggregate results meaningfully | Skipping result combination |
| Document dependencies between tasks | Assuming order of completion |
| Clean up agent resources | Resource leaks from agents |
Related Skills
optimizing-tokens– Efficient context per agentthinking-sequentially– Order dependent taskswriting-plans– Plan parallel execution phasesexecuting-plans– Execute with parallel steps