← Back to Skills Marketplace
linkbag

AI Swarm Orchestration

by linkbag · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
154
Downloads
0
Stars
0
Active Installs
7
Versions
Install in OpenClaw
/install ai-swarm
Description
Multi-agent AI coding swarm orchestration. Plan parallel tasks, spawn Claude/Codex/Gemini agents in tmux sessions with git worktrees, auto-review, auto-integ...
README (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
Usage Guidance
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ai-swarm
  3. After installation, invoke the skill by name or use /ai-swarm
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug ai-swarm
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 7
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 154 downloads so far.

How do I install AI Swarm Orchestration?

Run "/install ai-swarm" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is AI Swarm Orchestration free?

Yes, AI Swarm Orchestration is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does AI Swarm Orchestration support?

AI Swarm Orchestration is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created AI Swarm Orchestration?

It is built and maintained by linkbag (@linkbag); the current version is v1.0.0.

💬 Comments