← 返回 Skills 市场
linkbag

AI Swarm Orchestration

作者 linkbag · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
154
总下载
0
收藏
0
当前安装
7
版本数
在 OpenClaw 中安装
/install ai-swarm
功能描述
Multi-agent AI coding swarm orchestration. Plan parallel tasks, spawn Claude/Codex/Gemini agents in tmux sessions with git worktrees, auto-review, auto-integ...
使用说明 (SKILL.md)

AI Swarm Orchestration

Orchestrate parallel AI coding agents with automated review, integration, and notifications.

Setup

Prerequisites

  • tmux — agent sessions run here
  • git — worktrees for parallel branches
  • claude CLI (Claude Code) — primary agent
  • Telegram bot token + chat ID (optional, for notifications)

Install scripts

Copy scripts/ to your swarm directory (e.g., ~/workspace/swarm/). Make executable:

chmod +x ~/workspace/swarm/*.sh

Initialize state files

mkdir -p ~/workspace/swarm/{logs,endorsements}
echo '[]' > ~/workspace/swarm/active-tasks.json
echo '' > ~/workspace/swarm/pending-notifications.txt

Duty table

Copy references/duty-table-template.json to ~/workspace/swarm/duty-table.json. Configure model assignments.

Core Workflow

Phase 1: PLAN (present to human, STOP, wait for approval)

CRITICAL GATE: Present the plan table to the human. Then STOP. Do NOT write prompts or spawn agents until the human explicitly approves.

The plan message and the spawn action must be in DIFFERENT turns. Never combine them.

🐝 Swarm Plan: [batch description]

| # | Task ID | Description | Agent | Model |
|---|---------|-------------|-------|-------|
| 1 | fix-xyz | Fix the freeze bug | claude | sonnet |
| 2 | add-feat | Add feature X | claude | sonnet |

Dependencies: None (all parallel)
Estimated time: ~15-20 min

Proceed? 👍/👎

Wait for human reply. Only after "yes"/"go"/👍 → proceed to Phase 2.

Phase 2: BUILD (write prompts, spawn agents)

Write task prompts to /tmp/prompt-\x3Ctask-id>.md, create batch JSON, then spawn:

cat > /tmp/batch-tasks.json \x3C\x3C 'EOF'
[
  {"id": "task-1", "description": "/tmp/prompt-task1.md", "agent": "claude", "model": "claude-sonnet-4-6"},
  {"id": "task-2", "description": "/tmp/prompt-task2.md", "agent": "claude", "model": "claude-sonnet-4-6"}
]
EOF

cd ~/workspace/swarm
bash spawn-batch.sh "/path/to/project" "batch-id" "Batch description" /tmp/batch-tasks.json

spawn-batch.sh handles everything automatically:

  • Creates git worktrees + feature branches
  • Launches agents in tmux sessions
  • Starts per-agent completion watchers (auto-review + Telegram notification)
  • Starts integration watcher (auto-merge when all done)

For single tasks: bash spawn-agent.sh "/path/to/project" "task-id" "/tmp/prompt.md" "claude" "claude-sonnet-4-6"

Phase 3: SHIP (automatic)

The scripts handle this automatically:

  1. notify-on-complete.sh detects each agent finishing → spawns reviewer → sends Telegram
  2. integration-watcher.sh detects ALL agents done → spawns Opus integration agent → merges branches → resolves conflicts → verifies builds → sends Telegram

Prompt Template

Write clear, self-contained prompts for each agent. Include:

  • Project path and stack
  • Specific files to modify
  • What to do (detailed steps)
  • Verification commands (tsc --noEmit, npm run build, etc.)

Do NOT include openclaw system event in prompts — notify-on-complete.sh handles notifications automatically.

Monitoring

tmux ls                              # List active agent sessions
bash check-agents.sh                 # Health check all agents
bash pulse-check.sh                  # Detect stuck agents (auto-kills)
cat pending-notifications.txt        # Check pending notifications

Script Reference

Script Purpose
spawn-batch.sh Spawn N agents + auto-integration watcher
spawn-agent.sh Spawn single agent with completion watcher
integration-watcher.sh Poll agents, auto-merge when all done
start-integration.sh Manual integration watcher start
notify-on-complete.sh Per-agent watcher: detect done → review → notify
pulse-check.sh Detect and kill stuck agents
check-agents.sh Quick status check
endorse-task.sh Create endorsement file for a task
esr-log.sh Update project ESR docs
eor-log.sh Write agent end-of-run log
fallback-swap.sh Model selection with fallback
assess-models.sh Weekly model benchmark
deploy-notify.sh CI/CD notification

Hard Rules

ALWAYS

  • Present plan → STOP → wait for human approval → THEN spawn (separate turns!)
  • Use spawn-batch.sh for 2+ tasks, spawn-agent.sh for single tasks
  • Let scripts handle tmux, notifications, review, integration — don't bypass

NEVER

  • Spawn agents without human endorsement
  • Present plan and spawn in the same message/turn
  • Write prompts before receiving endorsement
  • Use bare claude --print or background exec (bypasses entire pipeline)
  • Spawn agents in the orchestrator's workspace directory

Heartbeat Checks

Read references/HEARTBEAT.md for periodic checks:

  1. Read pending-notifications.txt → send to human → clear
  2. Run pulse-check.sh for stuck agents
  3. Check tmux ls for completed agents
  4. Report brief status if agents are running

Further Reading

  • references/ROLE.md — Full role definition with lessons learned
  • references/TOOLS.md — Detailed script usage and prompt patterns
安全使用建议
Key things to check before installing or running this skill: - Audit spawn-batch.sh, integration-watcher.sh, notify-on-complete.sh and any file that runs 'git add/commit/push' or 'gh pr' to confirm whether auto‑endorse/auto‑merge behaviors exist and can be disabled. The SKILL.md says human approval is required, but some scripts/docs indicate automatic endorsement — get clarity from the author. - Inspect and remove any agent CLI flags that bypass permissions (examples in docs: --permission-mode bypassPermissions, --dangerously-bypass-approvals-and-sandbox, --dangerously-skip-permissions). Those flags defeat safety checks and let agents run non‑interactive privileged actions. - Decide where you will run the swarm: use a throwaway or test repository and an isolated machine/VM first. Do not run this against production repos until you are confident. - Supply only minimal credentials and tokens. Create a dedicated machine/service account or GitHub user with limited repo scope (avoid granting broad org/admin rights) and a Telegram token/channel that is intended for notifications only. - Provide a swarm.conf and explicitly set SWARM_NOTIFY_TARGET, OBSIDIAN_BASE, and any other paths so scripts don't guess locations. Consider making notify/push steps manual (disable auto-push or require an explicit command) and enable logging/audit of all commits prior to push. - Test the orchestration in dry-run mode if possible, and search the codebase for all commands that call external CLIs (openclaw, gh, tmux, git, claude/codex/gemini) to verify behaviour. If you want, I can list the exact files/lines that introduce the biggest risks (auto‑merge, bypass flags, implicit credential use) so you can review or modify them before use.
能力评估
Purpose & Capability
Name/description match the included scripts: orchestration, tmux sessions, git worktrees, auto‑review and integration. However the package metadata declares no required env vars/binaries while the SKILL.md and scripts clearly expect CLAUDE/CODEX/GEMINI CLIs, openclaw, gh, tmux, git and optional Telegram credentials — these runtime requirements are implicit rather than declared.
Instruction Scope
SKILL.md enforces a human approval gate before spawning, but the tools/docs and scripts contain functionality that can auto‑endorse, auto‑spawn, auto‑merge and auto‑push (integration-watcher, notify-on-complete, spawn-batch), and examples show agent CLI invocations with flags like --permission-mode bypassPermissions and --dangerously-bypass-approvals-and-sandbox. That conflicts with the stated hard rule and grants the orchestrator broad discretion to modify repositories and push merges. Scripts also read and write project files, EOR/ESR docs and may copy to an Obsidian path if configured.
Install Mechanism
No install spec (instruction-only skill with bundled scripts). That lowers supply‑chain risk — nothing is downloaded or extracted during install. However these scripts will be copied to and executed in the user's workspace per the README.
Credentials
The skill implicitly requires credentials and system state (openclaw auth, GitHub push rights / gh auth, GEMINI_API_KEY examples, Telegram bot token/chat ID, possibly OBSIDIAN_BASE) but the registry metadata lists no required env vars. The set of implicit credentials is broad and grants write/merge capability into repositories and visibility into usage/quota data; this is disproportionate unless you intend the orchestrator to have repo-level write permission.
Persistence & Privilege
always:false (no forced inclusion), but runtime behaviour can create persistent artifacts (duty-table.json changes, logs, worktrees, endorsements, auto-swaps) and the scripts can modify other files and auto-merge to main. That level of filesystem and VCS privilege is expected for an orchestrator but combined with the bypass flags and implicit credentials increases risk.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ai-swarm
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ai-swarm 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: multi-agent coding swarm with spawn-batch, auto-review, auto-integration, Telegram notifications, human endorsement gate
v2.1.0
Fix duplicate notifications, add shipped summary, enforce v2.0 workflow with hard endorsement gate
v2.0.0
Role redesign: Architect (plan), Builder (code), Reviewer (fix), Integrator (merge). Deep thinking models for planning + integration, fast models for building + reviewing.
v1.3.1
Transparency: declare all requirements, credentials, persistence in metadata. Clarify endorsement workflow.
v1.3.0
Security hardening: configurable notifications, no hardcoded private info, safer CLI flags
v1.2.0
macOS fixes: gtimeout shim, assess-models cd bug, Gemini stdin hang, safe wait loop
v1.1.0
Multi-agent orchestration system. Spawn parallel Claude/Codex/Gemini agents in tmux with git worktrees, auto-review, auto-integrate, and 3-vendor duty table rotation. Supports macOS, Linux, and WSL.
元数据
Slug ai-swarm
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 7
常见问题

AI Swarm Orchestration 是什么?

Multi-agent AI coding swarm orchestration. Plan parallel tasks, spawn Claude/Codex/Gemini agents in tmux sessions with git worktrees, auto-review, auto-integ... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 154 次。

如何安装 AI Swarm Orchestration?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ai-swarm」即可一键安装,无需额外配置。

AI Swarm Orchestration 是免费的吗?

是的,AI Swarm Orchestration 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

AI Swarm Orchestration 支持哪些平台?

AI Swarm Orchestration 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 AI Swarm Orchestration?

由 linkbag(@linkbag)开发并维护,当前版本 v1.0.0。

💬 留言讨论