From swarmesh
Dispatches tasks to swarm supervisor for auto-orchestration or specific roles in execute mode. Reads human inbox for replies, status, and task queues. Use for delegating 'do X' commands or checking swarm updates.
How this skill is triggered — by the user, by Claude, or both
Slash command
/swarmesh:swarm-taskThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
向蜂群派发高层任务。默认发给 supervisor(自动拆解/派发/监控)。
向蜂群派发高层任务。默认发给 supervisor(自动拆解/派发/监控)。
⚠️ 仅 execute 模式可用。 discuss 模式用 $swarm-chat-msg。
# Locate swarmesh plugin root (优先 $SWARM_ROOT env)
if [[ -z "${SWARM_ROOT:-}" || ! -d "$SWARM_ROOT/scripts" ]]; then
SWARM_ROOT=$(find "$HOME/.codex/plugins/cache" -type d -name scripts 2>/dev/null \
| grep -E '/swarmesh/[^/]+/scripts$' | head -1 | sed 's|/scripts$||')
fi
[[ -n "${SWARM_ROOT:-}" && -d "$SWARM_ROOT/scripts" ]] || { echo "⚠ 未找到 swarmesh plugin root,请 export SWARM_ROOT=/path/to/swarmesh"; exit 1; }
MODE=$(jq -r '.mode // "execute"' .swarm/runtime/state.json 2>/dev/null)
非 execute 时提示先 $swarm-stop 再 $swarm-start --mode execute,或改用 $swarm-chat-msg。
<任务描述> → 发给 supervisor<角色名> <任务描述> → 发给指定角色jq -r '.panes[].role' .swarm/runtime/state.json 2>/dev/null
SWARM_ROLE=human "$SWARM_ROOT/scripts/swarm-msg.sh" send <目标角色> "<任务内容>"
for i in $(seq 1 40); do
RESULT=$(SWARM_ROLE=human "$SWARM_ROOT/scripts/swarm-msg.sh" read 2>/dev/null)
if [[ "$RESULT" != *"没有新消息"* ]]; then
echo "$RESULT"; break
fi
sleep 15
done
10 分钟无消息提示用户:再跑 $swarm-task(无参数)看最新 / 跑 $swarm-status。
SWARM_ROLE=human "$SWARM_ROOT/scripts/swarm-msg.sh" read 2>/dev/null
SWARM_ROLE=human "$SWARM_ROOT/scripts/swarm-msg.sh" list-tasks --all 2>/dev/null
SWARM_ROLE=human "$SWARM_ROOT/scripts/swarm-msg.sh" reply <msg-id> "<回复>"
SWARM_ROLE=human "$SWARM_ROOT/scripts/swarm-msg.sh" send <role> "<消息>"
SWARM_ROLE=human "$SWARM_ROOT/scripts/swarm-msg.sh" set-limit <新上限>
npx claudepluginhub soein/swarmesh --plugin swarmeshDisplays swarm state including execute/discuss mode, online roles/participants, human inbox messages, and task queue progress. Useful for status queries like 'swarm status' or 'what's going on'.
Guides multi-agent coordination using agent-swarm MCP tools: join swarms as leader/worker, delegate/claim tasks, check status, send/read messages, manage workflows.
Spawns isolated agents to execute independent working-tree tasks in parallel with wave-validity gating and conflict checks. Use when ≥2 independent units need file edits.