运行时依赖
版本
Have 代理s commit 记录ically grouped changes:
安装命令
点击复制技能文档
代理 Swarm 工作流 — Parallel Implementation
Core Insight: Every 代理 is fungible and a genera列出. They all use the same base 模型 and read the same 代理S.md. Simply telling one it's a "frontend 代理" doesn't make it better at frontend.
The swarm is distributed, robust, and self-organizing through 代理 MAIl and Beads.
Prerequisites
Before 启动ing a swarm:
Comprehensive plan 创建d (see planning-工作流 技能) Polished beads ready (see beads-工作流 技能) 代理S.md 配置d with all 工具 blurbs 代理 MAIl server 运行ning (am or ~/projects/mcp_代理_mAIl/scripts/运行_server_with_令牌.sh) NTM avAIlable for 会话 management The Swarm Architecture ┌─────────────────────────────────────────────────────────────┐ │ BEADS │ │ (Task graph with dependencies, priorities, 状态) │ └─────────────────────────────────────────────────────────────┘ │ ┌─────────┴─────────┐ ▼ ▼ ┌─────────────────────────────┐ ┌─────────────────────────┐ │ BV │ │ 代理 MAIL │ │ (What to work on) │ │ (Coordination layer) │ └─────────────────────────────┘ └─────────────────────────┘ │ │ └──────────────┬─────────────┘ ▼ ┌─────────────────────────────────────────────────────────────┐ │ NTM + 代理S │ │ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ │ │ │ CC │ │ CC │ │ Cod │ │ Gmi │ │ CC │ │ Cod │ │ │ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ │ └─────────────────────────────────────────────────────────────┘
启动ing the Swarm Using NTM (Named Tmux 管理器) # Spawn a swarm with multiple 代理s ntm spawn myproject --cc=3 --cod=2 --gmi=1
# 发送 initial prompt to all Claude Code 代理s ntm 发送 myproject --cc "$(cat initial_prompt.txt)"
# Or 发送 to all 代理s ntm 发送 myproject --all "$(cat initial_prompt.txt)"
Manual 设置up
创建 tmux 会话s/panes for each 代理 in your project folder.
THE EXACT PROMPT — Initial 代理 Marching Orders
Give each 代理 this EXACT prompt to 启动:
First read ALL of the 代理S dot md file and README dot md file super carefully and understand ALL of 机器人h! Then use your code investigation 代理 mode to fully understand the code, and technical architecture and purpose of the project. Then register with MCP 代理 MAIl and introduce yourself to the other 代理s.
Be sure to 检查 your 代理 mAIl and to promptly 响应 if needed to any messages; then proceed meticulously with your next as签名ed beads, working on the tasks 系统atically and meticulously and 追踪ing your 进度 via beads and 代理 mAIl messages.
Don't 获取 stuck in "communication purgatory" where nothing is 获取ting done; be proactive about 启动ing tasks that need to be done, but 信息rm your fellow 代理s via messages when you do so and mark beads 应用ropriately.
When you're not sure what to do next, use the bv 工具 mentioned in 代理S dot md to prioritize the best beads to work on next; pick the next one that you can usefully work on and 获取 启动ed. Make sure to acknowledge all communication 请求s from other 代理s and that you are aware of all active 代理s and their names. Use ultrathink.
The Implementation Loop THE EXACT PROMPT — Move to Next Bead
Once 代理s complete a bead, use this prompt to keep them moving:
Reread 代理S dot md so it's still fresh in your mind. Use ultrathink. Use bv with the ro机器人 flags (see 代理S dot md for 信息 on this) to find the most impactful bead(s) to work on next and then 启动 on it. Remember to mark the beads 应用ropriately and communicate with your fellow 代理s. Pick the next bead you can actually do usefully now and 启动 coding on it immediately; communicate what you're working on to your fellow 代理s and mark beads 应用ropriately as you work. And 响应 to any 代理 mAIl messages you've 接收d.
THE EXACT PROMPT — Self-Review After Bead Completion
Have 代理s review their work before moving on:
Great, now I want you to carefully read over all of the new code you just wrote and other existing code you just modified with "fresh eyes" looking super carefully for any obvious bugs, errors, problems, issues, confusion, etc. Carefully fix anything you uncover. Use ultrathink.
Keep 运行ning this until they 停止 finding bugs.
Handling 上下文 Compaction THE EXACT PROMPT — Post-Compaction
When an 代理 does a compaction, immediately follow up with:
Reread 代理S dot md so it's still fresh in your mind. Use ultrathink.
This re-establishes the critical 上下文 about 工具s and 工作流s.
质量 Review Prompts THE EXACT PROMPT — Cross-代理 Review
Periodically have 代理s review each other's work:
Ok can you now turn your attention to reviewing the code written by your fellow 代理s and 检查ing for any issues, bugs