dispatching-parallel-agents
Skill9 starsChanged 6 months agoMITView on GitHub
当同时面对 2 个及以上相互独立、无共享状态且无顺序依赖的任务时必须使用本技能
136 other projects use a version of this, 104 of them edited.
Adopted by
Most recently taken up by
- invergent-ai/surogatestheir own version, first seen Oct 5, 2026
- blas1n/claude-skillsedited, first seen Oct 4, 2026
- LayneChai/superpowers-dshedited, first seen Oct 3, 2026
- HanksChen0110/skillsedited, first seen Oct 3, 2026
- lsy041015/orchestratheir own version, first seen Oct 2, 2026
- Wenaixi/dsh-superpoweredited, first seen Oct 1, 2026
Used with
Projects with it also use diagnosing-superpowers, workflow-runner and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
obraSkilldiagnosing-superpowers
Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.
Also in 6 projects that use this
MorningStar0709Skillworkflow-runner
Run an agency-orchestrator style YAML workflow inside the current Trae conversation by simulating or coordinating multiple roles. Use when the user provides a `.yaml` or `.yml` workflow, asks for multi-role collaboration, says things like “用多个角色一起评审这个 PRD”“多角色协作”“先生成工作流再执行”“让产品经理、架构师、QA 一起看一下”, or wants roles such as product manager, architect, reviewer, or QA to work together. Supports layered execution, role prompting, variable interpolation, document-backed inputs, and parallel steps only when the current environment has a clear subagent mapping. Do not use for ordinary implementation plans, simple code changes, or tasks already covered by `writing-plans`, `executing-plans`, `subagent-driven-development`, or single-purpose review/debug skills.
Also in 5 projects that use this
MorningStar0709Skillchinese-git-workflow
Configure Git for domestic platforms and manage branching strategies suitable for Chinese teams. Use when the user asks to configure remotes, set up SSH, or manage Git workflows for Gitee, Coding, Jihu GitLab, or CNB, including requests like "配置国内 Git", "设置 Gitee 远程仓库", "推荐适合小团队的 Git 流程".
Also in 4 projects that use this
shibit-netSkillchinese-code-review
中文 review 沟通参考——话术模板、分级标注(必须修复/建议修改/仅供参考)、国内团队常见反模式应对。仅在用户显式 /chinese-code-review 时调用,不要根据上下文自动触发。
Also in 3 projects that use this
shibit-netSkillchinese-commit-conventions
中文 commit 与 changelog 配置参考——Conventional Commits 中文适配、commitlint/husky/commitizen 中文模板、conventional-changelog 中文配置。仅在用户显式 /chinese-commit-conventions 时调用,不要根据上下文自动触发。
Also in 3 projects that use this
MicrosoftSkilltesting-anti-patterns
Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking without understanding dependencies
Also in 4 projects that use this
- +1 more from shibit-net
Other versions136 projects use a version of this.
Word for word · 0
None found.
Edited · 104
- obra/superpowers★ 314k17% same
- jnMetaCode/superpowers-zh★ 8.3k17% same
- openai/plugins★ 7.3k17% same
- coco-research/coco★ 43714% same
- Ibrahim-3d/orchestrator-supaconductor★ 38015% same
- totvs/engpro-advpl-tlpp-skills★ 13815% same
- aaddrick/claude-pipeline★ 12915% same
- Houseofmvps/ultraship★ 12311% same
- LayneChai/superpowers-dsh★ 10217% same
- shibit-net/xuanji-community★ 9318% same
94 more not listed
Wrote their own version · 32
- GanyuanRan/Aegis★ 1.3ksame name
- KbWen/agentic-os★ 206same name
- thiientv/godmode★ 96same name
- withzombies/hyperpowers★ 80same name
- andreaswasita/copilot-agents-dojo★ 54same name
- KbWen/agent-virtual-office★ 35same name
- myths-labs/muse★ 35same name
- invergent-ai/surogates★ 27same name
- krzysztofsurdy/code-virtuoso★ 22same name
- CodingCossack/agent-skills-library★ 19same name
22 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- brainstormingSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-git-worktreesSkill
- using-superpowersSkill
- verification-before-completionSkill
- writing-plansSkill
- writing-skillsSkill
The file
Files
并行分派子智能体
概述
你将任务委派给拥有独立上下文的专用子智能体。通过精确构建它们的指令和上下文,确保它们保持专注并完成任务。它们绝不应继承你会话的上下文或历史记录——你要自行构建它们所需的全部信息。这样也能为你保留协调工作所需的上下文。
当你遇到多个互不相关的失败(不同的测试文件、不同的子系统、不同的缺陷)时,逐个排查会浪费时间。每次排查都是独立的,可以并行进行。
核心原则: 每个独立的问题域派一个智能体,让它们并发工作。
何时使用
digraph when_to_use {
"Multiple failures?" [shape=diamond];
"Are they independent?" [shape=diamond];
"Single agent investigates all" [shape=box];
"One agent per problem domain" [shape=box];
"Can they work in parallel?" [shape=diamond];
"Sequential agents" [shape=box];
"Parallel dispatch" [shape=box];
"Multiple failures?" -> "Are they independent?" [label="yes"];
"Are they independent?" -> "Single agent investigates all" [label="no - related"];
"Are they independent?" -> "Can they work in parallel?" [label="yes"];
"Can they work in parallel?" -> "Parallel dispatch" [label="yes"];
"Can they work in parallel?" -> "Sequential agents" [label="no - shared state"];
}使用时机:
- 3 个及以上测试文件因不同根因而失败
- 多个子系统独立损坏
- 每个问题无需依赖其他问题的上下文即可理解
- 排查之间无共享状态
不适用场景:
- 失败相互关联(修复一个可能会连带修复其他)
- 需要理解完整的系统状态
- 智能体之间会互相干扰
工作模式
1. 识别独立域
按照损坏的内容对失败进行分组:
- 文件 A 测试:工具审批流程
- 文件 B 测试:批量完成行为
- 文件 C 测试:中止功能
每个域都是独立的——修复工具审批不会影响中止测试。
2. 创建聚焦的子智能体任务
每个子智能体应获得:
- 明确的范围: 一个测试文件或子系统
- 清晰的目标: 让这些测试通过
- 约束: 不要修改其他代码
- 预期输出: 你发现了什么、修复了什么的总结
3. 并行派发
在同一个回复中发出全部三个子智能体派发请求——它们会并行运行:
Subagent (general-purpose): "Fix agent-tool-abort.test.ts failures"
Subagent (general-purpose): "Fix batch-completion-behavior.test.ts failures"
Subagent (general-purpose): "Fix tool-approval-race-conditions.test.ts failures"
# All three run concurrently.一次回复中的多个派发调用 = 并行执行。每次回复只发一个 = 顺序执行。
4. 审阅与整合
当子智能体返回时:
- 阅读每份总结
- 验证修复之间没有冲突
- 运行完整测试套件
- 整合所有变更
子智能体提示结构
优秀的子智能体提示应具备:
- 聚焦 - 一个清晰的问题域
- 自包含 - 理解问题所需的全部上下文
- 输出明确 - 子智能体应该返回什么?
修复 src/agents/agent-tool-abort.test.ts 中 3 个失败的测试:
1. "should abort tool with partial output capture" - 期望消息中包含 'interrupted at'
2. "should handle mixed completed and aborted tools" - 快速工具被中止而非完成
3. "should properly track pendingToolCount" - 期望得到 3 个结果,但实际为 0
这些都是时序/竞态条件问题。你的任务:
1. 阅读测试文件,理解每个测试验证的内容
2. 识别根因——是时序问题还是真实缺陷?
3. 通过以下方式修复:
- 将任意超时替换为基于事件的等待
- 如果发现中止实现存在缺陷,则修复
- 如果测试的是已变更的行为,则调整测试预期
不要只是增加超时时间——找到真正的问题。
返回:你发现了什么以及修复了什么的总结。常见错误
❌ 范围过大: "修复所有测试" - 子智能体会无从下手 ✅ 具体明确: "修复 agent-tool-abort.test.ts" - 范围聚焦
❌ 缺少上下文: "修复竞态条件" - 子智能体不知道位置 ✅ 提供上下文: 粘贴错误信息和测试名称
❌ 缺少约束: 子智能体可能会重构所有代码 ✅ 明确约束: "不要修改生产代码" 或 "仅修复测试"
❌ 输出模糊: "修复它" - 你不知道改了什么 ✅ 输出具体: "返回根因和变更总结"
何时不要使用
相互关联的失败: 修复一个可能会连带修复其他 — 应先一起调查 需要完整上下文: 理解问题需要查看整个系统 探索性调试: 你还不知道哪里出了问题 共享状态: 智能体之间会互相干扰(编辑相同文件、使用相同资源)
来自会话的真实示例
场景: 大规模重构后,3 个文件共 6 个测试失败
失败:
- agent-tool-abort.test.ts: 3 处失败(时序问题)
- batch-completion-behavior.test.ts: 2 处失败(工具未执行)
- tool-approval-race-conditions.test.ts: 1 处失败(执行次数为 0)
决策: 各域相互独立——中止逻辑、批量完成和竞态条件彼此分离
派发:
Agent 1 → Fix agent-tool-abort.test.ts
Agent 2 → Fix batch-completion-behavior.test.ts
Agent 3 → Fix tool-approval-race-conditions.test.ts结果:
- 智能体 1:将超时替换为基于事件的等待
- 智能体 2:修复事件结构缺陷(threadId 位置错误)
- 智能体 3:添加等待异步工具执行完成的逻辑
整合: 所有修复相互独立,无冲突,完整套件全部通过
节省时间: 3 个问题并行解决,而非顺序解决
核心收益
- 并行化 - 多项调查同时进行
- 聚焦 - 每个智能体范围更窄,需要跟踪的上下文更少
- 独立性 - 智能体之间互不干扰
- 速度 - 3 个问题在 1 个问题的时间内解决
验证
子智能体返回后:
- 审阅每份总结 - 理解变更内容
- 检查冲突 - 智能体是否编辑了相同代码?
- 运行完整套件 - 验证所有修复能否协同工作
- 抽查 - 智能体可能会出现系统性错误
实际效果
来自调试会话(2025-10-03):
- 3 个文件共 6 处失败
- 并行派发 3 个子智能体
- 所有调查并发完成
- 所有修复成功整合
- 智能体变更之间零冲突
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

