# Dispatching Parallel Agents

> 需要并行执行多个独立任务时使用。将独立任务拆分为多个子代理同时执行，汇总结果。触发词：并行、同时做、parallel、concurrent、一边一边。

- **Type:** Skill
- **Install:** `agentstack add skill-yinqd3-workbuddy-skills-dispatching-parallel-agents`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [yinqd3](https://agentstack.voostack.com/s/yinqd3)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [yinqd3](https://github.com/yinqd3)
- **Source:** https://github.com/yinqd3/workbuddy-skills/tree/main/superpowers/dispatching-parallel-agents

## Install

```sh
agentstack add skill-yinqd3-workbuddy-skills-dispatching-parallel-agents
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 派发并行子代理

## 概述

当多个任务相互独立（不共享状态、不依赖对方结果）时，用并行子代理加速执行。

**开始前确认：** 这些任务真的独立吗？如果任务 B 依赖任务 A 的输出，不能并行。

## WorkBuddy 并行调度

使用 `Agent` 工具的 `run_in_background` 参数派发多个子代理并行运行。

## 使用场景

**适合并行：**
- 多个独立的代码审查
- 同时重构多个不相关的模块
- 并行数据获取/处理
- 同时运行不同类型的测试

**不适合并行：**
- 任务有顺序依赖
- 任务共享状态/文件
- 需要实时协调

## 调度模式

### 模式 1：扇出-汇总

```
派发 N 个子代理 → 等待全部完成 → 汇总结果
```

```markdown
# 示例：并行代码审查

GOAL: 审查三个独立模块的代码质量
派发 3 个子代理:
  - 子代理 A: 审查 src/auth/
  - 子代理 B: 审查 src/api/
  - 子代理 C: 审查 src/models/
等待全部完成 → 汇总审查报告
```

### 模式 2：扇出-优先

```
派发 N 个子代理 → 取最快的结果 → 取消其余
```

用于探索性任务，只需要一个可行方案。

## 调度协议

每个子代理的提示模板：

```
GOAL: [一句话 —— 这个子代理要完成什么]
CONTEXT: [为什么需要这个、相关背景]
FILES: [只涉及的文件路径]
CONSTRAINTS: [限制条件 —— TDD、不扩范围、不碰其他文件]
VERIFY: [如何确认成功]
REPORT: [需要的输出格式]
```

## 汇总

所有子代理完成后：
1. 检查每个子代理的输出
2. 对比一致性
3. 发现冲突时标记并请求用户决策
4. 汇总为统一报告

## 注意事项

- 并行子代理不共享内存，不要依赖对方的中间状态
- 避免并行修改同一个文件（会导致冲突）
- 设置合理的最大并行数（建议 3-5 个）
- 确保每个子代理有明确的成败标准

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [yinqd3](https://github.com/yinqd3)
- **Source:** [yinqd3/workbuddy-skills](https://github.com/yinqd3/workbuddy-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-yinqd3-workbuddy-skills-dispatching-parallel-agents
- Seller: https://agentstack.voostack.com/s/yinqd3
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
