dispatching-parallel-agents
Skill5 starsChanged 8 months agoMITView on GitHub
当面对 2 个以上可以独立进行、无共享状态或顺序依赖的任务时使用
190 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- DemonDamon/AgenticXtheir own version, first seen Nov 9, 2026
- roundpilot/superpowers-antigravitytheir own version, first seen Nov 8, 2026
- REPOZY/superpowers-optimizedtheir own version, first seen Nov 8, 2026
- lingyired/status-triotheir own version, first seen Nov 8, 2026
- lhbsaa/apex-unifiedtheir own version, first seen Nov 8, 2026
- afawfawffaf/my-skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use diagnosing-superpowers, condition-based-waiting and 5 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 19 projects that use this
kntismSkillcondition-based-waiting
Use when tests have race conditions, timing dependencies, or inconsistent pass/fail behavior - replaces arbitrary timeouts with condition polling to wait for actual state changes, eliminating flaky tests from timing guesses
Also in 3 projects that use this
xfstudioSkillcontext-driven-development
Use this skill when working with Conductor's context-driven
Also in 3 projects that use this
EvezArtSkillanalytics-dashboard
User behavior tracking and analytics dashboards
Also in 3 projects that use this
frankxaiSkilldefense-in-depth
Use when invalid data causes failures deep in execution, requiring validation at multiple system layers - validates at every layer data passes through to make bugs structurally impossible
Also in 3 projects that use this
MicrosoftSkillroot-cause-tracing
Use when errors occur deep in execution and you need to trace back to find the original trigger - systematically traces bugs backward through call stack, adding instrumentation when needed, to identify source of invalid data or incorrect behavior
Also in 4 projects that use this
Other versions190 projects use a version of this.
Word for word · 4
- shibit-net/xuanji-community★ 90100% same
- GEd520/legados★ 75100% same
- xjxj71/ai-token-usage-statistics★ 1100% same
- sueryue/Claude-Skillls★ 0100% same
Edited · 3
- jnMetaCode/superpowers-zh★ 8.4k95% same
- rzx007/openharness-ts★ 395% same
- rzx007/Vykor★ 395% same
Wrote their own version · 183
- obra/superpowers★ 314ksame name
- openai/plugins★ 7.8ksame name
- farm-fe/farm★ 5.6ksame name
- lingyired/status-trio★ 1.8ksame name
- GanyuanRan/Aegis★ 1.4ksame name
- pcvelz/superpowers★ 1.3ksame name
- DemonDamon/AgenticX★ 1ksame name
- coco-research/coco★ 797same name
- koaning/wigglystuff★ 455same name
- derHaken/SuperAntigravity★ 439same name
173 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 repository19 other files it gives its agents.
- brainstormingSkill
- chinese-code-reviewSkill
- chinese-commit-conventionsSkill
- chinese-documentationSkill
- chinese-git-workflowSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- mcp-builderSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-git-worktreesSkill
- using-superpowersSkill
- verification-before-completionSkill
- workflow-runnerSkill
- writing-plansSkill
- writing-skillsSkill
The file
Files
并行分派智能体
概述
你将任务委派给具有隔离上下文的专用智能体。通过精心设计它们的指令和上下文,确保它们专注并成功完成任务。它们不应继承你的会话上下文或历史记录——你要精确构造它们所需的一切。这样也能为你自己保留用于协调工作的上下文。
当你遇到多个不相关的失败(不同的测试文件、不同的子系统、不同的 bug),逐一排查会浪费时间。每个排查都是独立的,可以并行进行。
核心原则: 每个独立问题域分派一个智能体,让它们并发工作。
何时使用
digraph when_to_use {
"存在多个失败?" [shape=diamond];
"它们是否独立?" [shape=diamond];
"单个智能体排查所有问题" [shape=box];
"每个问题域一个智能体" [shape=box];
"能否并行工作?" [shape=diamond];
"顺序执行智能体" [shape=box];
"并行分派" [shape=box];
"存在多个失败?" -> "它们是否独立?" [label="是"];
"它们是否独立?" -> "单个智能体排查所有问题" [label="否 - 有关联"];
"它们是否独立?" -> "能否并行工作?" [label="是"];
"能否并行工作?" -> "并行分派" [label="是"];
"能否并行工作?" -> "顺序执行智能体" [label="否 - 有共享状态"];
}适用场景:
- 3 个以上测试文件因不同根因失败
- 多个子系统独立出现故障
- 每个问题无需其他问题的上下文即可理解
- 排查之间无共享状态
不适用场景:
- 失败是相关的(修复一个可能修复其他的)
- 需要理解完整的系统状态
- 智能体之间会互相干扰
模式
1. 识别独立的问题域
按故障分组:
- 文件 A 测试:工具审批流程
- 文件 B 测试:批量完成行为
- 文件 C 测试:中止功能
每个问题域是独立的——修复工具审批不会影响中止测试。
2. 创建聚焦的智能体任务
每个智能体获得:
- 明确范围: 一个测试文件或子系统
- 清晰目标: 让这些测试通过
- 约束条件: 不修改其他代码
- 预期输出: 你发现和修复内容的总结
3. 并行分派
// 在 Claude Code / AI 环境中
Task("修复 agent-tool-abort.test.ts 的失败")
Task("修复 batch-completion-behavior.test.ts 的失败")
Task("修复 tool-approval-race-conditions.test.ts 的失败")
// 三个任务并发运行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. 找到根因——是时序问题还是实际 bug?
3. 修复方式:
- 用基于事件的等待替换任意超时
- 如果发现中止实现中的 bug 则修复
- 如果测试的是已变更的行为则调整测试期望
不要只是增加超时时间——找到真正的问题。
返回:你发现了什么以及修复了什么的总结。常见错误
错误做法:太宽泛: "修复所有测试" - 智能体会迷失方向 正确做法:具体明确: "修复 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)
决策: 独立的问题域——中止逻辑、批量完成、竞态条件各自独立
分派:
智能体 1 → 修复 agent-tool-abort.test.ts
智能体 2 → 修复 batch-completion-behavior.test.ts
智能体 3 → 修复 tool-approval-race-conditions.test.ts结果:
- 智能体 1:用基于事件的等待替换了超时
- 智能体 2:修复了事件结构 bug(threadId 位置不对)
- 智能体 3:添加了等待异步工具执行完成的逻辑
集成: 所有修复互相独立,无冲突,完整测试套件全部通过
节省的时间: 3 个问题并行解决 vs 顺序解决
核心优势
- 并行化 - 多个排查同时进行
- 聚焦 - 每个智能体范围窄,需要跟踪的上下文少
- 独立性 - 智能体之间互不干扰
- 速度 - 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.

