并行分派多个智能体,同时调查并修复彼此独立的问题
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "Dispatching Parallel Agents" 技能: 1. 下载 https://raw.githubusercontent.com/obra/clank/main/skills/collaboration/dispatching-parallel-agents/SKILL.md 2. 保存为 ~/.claude/skills/dispatching-parallel-agents/SKILL.md 3. 装好后重载技能,告诉我可以用了
请把下面 4 个彼此独立的报错分别交给不同的智能体并行分析:前端构建失败、后端单元测试失败、数据库迁移报错、CI 部署超时。每个智能体输出原因、复现步骤和修复建议,最后汇总成总表并按优先级排序。
一份汇总报告,包含每个问题的独立分析结果、修复建议和优先级排序。
将订单、支付和通知这 3 个互不依赖的模块分别交给不同智能体处理。每个智能体检查代码缺陷、提出修改方案并生成补丁。最后汇总所有修改,检查是否存在交叉影响,并输出合并建议。
按模块拆分的修复方案与补丁建议,以及最终合并与风险检查结果。
请创建多个智能体,并行调研日志系统、任务队列和缓存方案。每个智能体需要比较 3 个候选工具的优缺点、成本、部署复杂度和适用场景,最后输出统一格式的对比结论,便于我做技术选型。
结构统一的多方案对比报告,方便快速完成技术选型。
When you have multiple unrelated failures (different test files, different subsystems, different bugs), investigating them sequentially wastes time. Each investigation is independent and can happen in parallel.
Core principle: Dispatch one agent per independent problem domain. Let them work concurrently.
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"];
}
Use when:
Don't use when:
Group failures by what's broken:
Each domain is independent - fixing tool approval doesn't affect abort tests.
Each agent gets:
// 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
When agents return:
Good agent prompts are:
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.
❌ Too broad: "Fix all the tests" - agent gets lost ✅ Specific: "Fix agent-tool-abort.test.ts" - focused scope
❌ No context: "Fix the race condition" - agent doesn't know where ✅ Context: Paste the error messages and test names
❌ No constraints: Agent might refactor everything ✅ Constraints: "Do NOT change production code" or "Fix tests only"
❌ Vague output: "Fix it" - you don't know what changed ✅ Specific: "Return summary of root cause and changes"
…
先用伪代码梳理方案与迭代思路,再高效转成可执行代码。
帮助开发者用早返回或表驱动方式简化嵌套条件分支,提升代码可读性。
帮助你为变量选择清晰准确、易维护的命名,提升代码可读性。
帮助开发者保持类接口抽象一致,避免混杂序列化、持久化等无关职责。
帮助你撰写不过时的代码注释,聚焦做什么与为什么而非时序背景。
帮助用户检索过往 Claude Code 对话,快速找回事实、决策与上下文线索。
通过多智能体并行协作完成编码规划、执行调度与进度监控。
帮助你调研、规划并并行执行大规模代码变更,让多个代理分别提交 PR。
通过并行执行、批量调用与独立验证通道,加速复杂任务且保持结果正确。
为 Claude Code 代理检索历史修复方案并沉淀新解法,提升排错效率。
让你同时咨询多个大模型,获得代码评审、方案辩论与多角度建议
通过为每个任务分派独立子代理并穿插代码审查,稳步推进实现计划。