Dispatching parallel agents
将多个独立问题域分配给并行子代理同时处理。每个独立问题域一个代理。触发短语:"并行"、"parallel"、"同时处理"。From its SKILL.md
npx -y skills add StringKe/ai-agents --skill dispatching-parallel-agentsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 9 stars9 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.9 KB, as published. Nobody here has run it
/dispatching-parallel-agents — 并行代理调度
当面对多个相互独立的任务时,为每个任务派遣一个独立的子代理并行执行。
适用场景
- 多个独立的 bug 需要同时修复
- 多个不相关的文件需要同时修改
- 需要同时从多个方向调研一个问题
- plan.md 中有多个互不依赖的任务
不适用场景
- 任务之间有先后依赖
- 多个任务修改同一个文件
- 需要统一的设计决策
流程
第一步:识别独立问题域
分析所有待处理的任务,将它们划分为独立的问题域。独立性判断标准:
- 修改不同的文件
- 不共享可变状态
- 不需要彼此的输出作为输入
第二步:为每个问题域准备上下文
为每个子代理准备独立的上下文包:
- 任务描述
- 相关文件列表
- 预期产出
- 约束条件
第三步:并行派遣
使用 Agent 工具同时派遣多个子代理。每个子代理的 prompt 包含:
- 任务描述和预期产出
- 相关文件路径
- 约束条件(不修改其他文件、遵循项目约定)
- 完成标准
关键:在单个回复中发起所有 Agent 调用,确保真正的并行执行。
第四步:收集和整合结果
所有子代理完成后:
- 收集每个子代理的执行结果
- 检查是否有冲突(不应该有,但需要确认)
- 运行编译和测试确认所有改动兼容
- 向用户汇总报告
代理数量指南
- 2 到 4 个并行代理:适合大多数场景
- 5+ 个并行代理:仅在任务真正独立且简单时使用
- 如果需要更多,考虑分批执行