Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
From sdlc-dev-skillsnpx claudepluginhub zixun-github/aisdlcThis skill uses the workspace's default tool permissions.
当你有多个不相关故障(不同测试文件、不同子系统、不同 bug)时,顺序调查会浪费时间。每个调查相互独立,可以并行进行。
核心原则: 为每个独立问题域派发一个智能体。让它们并发工作。
开始时宣布:「我正在使用 dispatching-parallel-agents 技能派发并行智能体处理独立问题域。」
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"];
}
使用场景:
不使用场景:
按损坏内容对故障分组:
每个域独立——修工具审批不影响中止测试。
每个智能体获得:
// In Claude Code / AI environment
Task("Fix agent-tool-abort.test.ts failures")
Task("Fix batch-completion-behavior.test.ts failures")
Task("Fix tool-approval-race-conditions.test.ts failures")
// All three run concurrently
当智能体返回时:
好的智能体提示具备:
Fix the 3 failing tests in src/agents/agent-tool-abort.test.ts:
1. "should abort tool with partial output capture" - expects 'interrupted at' in message
2. "should handle mixed completed and aborted tools" - fast tool aborted instead of completed
3. "should properly track pendingToolCount" - expects 3 results but gets 0
These are timing/race condition issues. Your task:
1. Read the test file and understand what each test verifies
2. Identify root cause - timing issues or actual bugs?
3. Fix by:
- Replacing arbitrary timeouts with event-based waiting
- Fixing bugs in abort implementation if found
- Adjusting test expectations if testing changed behavior
Do NOT just increase timeouts - find the real issue.
Return: Summary of what you found and what you fixed.
❌ 范围过大:「修好所有测试」——智能体迷失 ✅ 具体:「修 agent-tool-abort.test.ts」——范围聚焦
❌ 无上下文:「修竞态条件」——智能体不知在哪 ✅ 有上下文: 粘贴错误信息和测试名
❌ 无约束: 智能体可能大改一切 ✅ 有约束:「不要改生产代码」或「只修测试」
❌ 输出模糊:「修好它」——不知道改了什么 ✅ 具体:「返回根因及变更的摘要」
相关故障: 修一个可能修好其他——先一起调查 需要完整上下文: 理解需要看整个系统 探索性调试: 还不知道哪里坏了 共享状态: 智能体会相互干扰(编辑同一文件、使用同一资源)
场景: 大型重构后 3 个文件共 6 个测试失败
失败:
决策: 独立域——中止逻辑、批次完成、竞态条件各自独立
派发:
Agent 1 → 修 agent-tool-abort.test.ts
Agent 2 → 修 batch-completion-behavior.test.ts
Agent 3 → 修 tool-approval-race-conditions.test.ts
结果:
集成: 所有修复独立、无冲突、完整套件通过
节省时间: 3 个问题并行解决 vs 顺序解决
智能体返回后: