← 返回 Skills 市场
linkbag

Claude Swarm

作者 linkbag · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
106
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install claude-swarm
功能描述
Claude-native multi-agent swarm orchestration for parallel coding. Use when spawning multiple Claude Code agents to work in parallel on a project with git wo...
使用说明 (SKILL.md)

Claude Swarm — Multi-Agent Orchestration

Parallel Claude Code agents: plan → endorse → spawn → monitor → review → integrate → ship.

Quick Start

# 1. Write task prompts
cat > /tmp/prompt-task1.md \x3C\x3C 'EOF'
Implement feature X...
EOF

# 2. Create tasks JSON
cat > /tmp/tasks.json \x3C\x3C 'EOF'
[
  {"id": "feat-x", "description": "/tmp/prompt-task1.md", "role": "builder"},
  {"id": "feat-y", "description": "/tmp/prompt-task2.md", "role": "builder"}
]
EOF

# 3. Spawn batch (auto-endorses + auto-integration)
bash scripts/spawn-batch.sh "/path/to/project" "batch-1" "Description" /tmp/tasks.json

Roles & Models

Role Model Effort Use
architect opus high Design, planning, complex decisions
builder sonnet high Feature implementation (parallel)
reviewer sonnet medium Auto-review on completion
integrator opus high Cross-branch merge + conflict resolution

Configure in config/duty-table.json.

Scripts

Script Purpose
spawn-batch.sh Spawn N parallel agents + integration watcher
spawn-agent.sh Spawn single agent in worktree + tmux
endorse-task.sh Endorse task (required before spawn)
check-agents.sh Show status of all running agents
cleanup.sh Remove worktrees, branches, tmux sessions
notify.sh Send webhook/Telegram notification
notify-on-complete.sh Auto-watcher: notify + review on completion
integration-watcher.sh Auto: merge all branches when batch completes

Workflow Detail

1. Planning (human + architect)

Break work into parallel tasks. Each task needs: ID, prompt, role.

2. Endorsement Gate

Every task requires endorsement before spawning — safety gate to prevent runaway agents.

  • spawn-batch.sh auto-endorses all tasks in batch
  • Manual: bash scripts/endorse-task.sh \x3Ctask-id>
  • 30-second cooldown between endorsement and spawn

3. Spawning

Each agent runs in:

  • Isolated git worktree (\x3Cproject>-worktrees/\x3Ctask-id>/)
  • tmux session (claude-\x3Ctask-id>)
  • Non-interactive mode (claude --print --permission-mode bypassPermissions)
  • Auto-retry with model fallback (opus → sonnet → haiku) on rate limits

4. Auto-Review

When an agent completes, notify-on-complete.sh:

  1. Detects completion (polls tmux every 60s)
  2. Sends notification
  3. Spawns a reviewer (sonnet) that checks the diff
  4. If issues found: fixes and commits (up to 3 rounds)
  5. Pushes final state

5. Integration

When all agents in a batch complete, integration-watcher.sh:

  1. Collects all branches
  2. Merges sequentially into main
  3. Uses opus to resolve any conflicts
  4. Runs integration review (opus, up to 3 rounds)
  5. Pushes to main (if auto-merge enabled)

Setup

  1. Copy this skill's scripts/ and config/ to your workspace
  2. Copy config/swarm.conf.exampleconfig/swarm.conf and configure
  3. Ensure installed: bash 4+, tmux, git, gh, jq, claude (Claude Code CLI)

Notifications

Set SWARM_NOTIFY in swarm.conf:

  • webhook — POST to SWARM_WEBHOOK_URL (Slack/Discord/custom)
  • telegram — Send via SWARM_TELEGRAM_BOT_TOKEN + SWARM_TELEGRAM_CHAT_ID
  • none — Log only (default)

Hard Rules

  1. Always endorse before spawning — no exceptions
  2. Use spawn-batch.sh for 2+ tasks — starts integration watcher
  3. Never run bare claude --print in background — use spawn-agent.sh
  4. Let the watcher handle reviews — don't add review logic to prompts
安全使用建议
This skill does what it says (multi-agent orchestration) but it also has high privileges and network capabilities you must accept before running it. Before installing: 1) Inspect and configure config/swarm.conf; set SWARM_NOTIFY=none until you trust it. 2) Disable SWARM_AUTO_MERGE or set it to false while testing to avoid automatic pushes to main. 3) Run it first in a disposable or test repository (not production) to observe behavior. 4) Review logs/ SWARM_DIR/logs and the saved prompt files for sensitive data; prompts are stored and may be sent to webhooks/Telegram if configured. 5) Ensure you understand the required credentials (git/gh, claude CLI auth, optional webhook/telegram tokens) and grant least privilege (use a throwaway repo account or restricted token). 6) Consider running inside an isolated environment/container to limit network and filesystem impact. The combination of 'bypassPermissions' calls to the model and automatic code changes is powerful — be cautious and test thoroughly.
功能分析
Type: OpenClaw Skill Name: claude-swarm Version: 1.0.0 The bundle implements a multi-agent orchestration framework that grants agents unattended shell access by using the `claude` CLI with the `--permission-mode bypassPermissions` flag across multiple scripts (e.g., `spawn-agent.sh`, `notify-on-complete.sh`, and `integration-watcher.sh`). While this capability is functionally necessary for the stated goal of parallel coding and automated integration, it creates a significant security risk where any subverted agent or malicious task prompt could execute arbitrary commands without user confirmation. The system includes automated 'review and fix' loops that allow agents to modify and push code autonomously, which could be exploited for persistence or code injection if the agent's instructions are manipulated.
能力评估
Purpose & Capability
The name/description match the included scripts: spawning agents in tmux, isolated git worktrees, auto-review, merge and push. However the skill assumes existing CLI credentials/tools (claude CLI, git/gh) and repository push rights — these are not declared as required env vars or credentials. Auto-pushing/PR-creation behaviors are consistent with 'ship' goals but grant broad repository privileges.
Instruction Scope
Runtime instructions and scripts read and write the entire project, create and remove git worktrees/branches, run dependency installers (pip/yarn/npm), run the claude CLI with 'bypassPermissions', automatically fix files, commit and push changes, and optionally POST prompts/messages to webhooks/Telegram. They also save prompts to SWARM_DIR/logs (possible leakage of sensitive prompts). These actions go beyond passive orchestration and allow automatic, potentially large-impact code changes and network exfiltration if notification endpoints are misconfigured.
Install Mechanism
No install spec; this is instruction/script-only. All code is included in the package and there are no remote downloads or archive extraction steps in the skill itself.
Credentials
The skill declares no required env vars, but the scripts use/configure SWARM_* variables (SWARM_NOTIFY, SWARM_WEBHOOK_URL, SWARM_TELEGRAM_BOT_TOKEN, SWARM_TELEGRAM_CHAT_ID, SWARM_AUTO_MERGE, etc.) via a swarm.conf file. It also implicitly requires git/gh credentials and a working 'claude' CLI (and whatever credentials that CLI uses). The skill should explicitly list these dependencies/credentials because they are necessary and sensitive.
Persistence & Privilege
always:false (good). The skill spawns background watcher processes, creates logs/state files under its SWARM_DIR, and can autonomously push to remotes and create PRs when started. That autonomously-executing, repo-writing behavior is powerful but consistent with its purpose; users should be aware it can change repository state without additional interactive confirmations unless config flags (like auto-merge) are disabled.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install claude-swarm
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /claude-swarm 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of Claude Swarm: a multi-agent orchestration tool for parallel Claude-native coding workflows. - Enables spawning and coordinating multiple Claude Code agents for parallel project work via scripts and git worktrees. - Supports task endorsement gates, tmux session tracking, auto-reviews (with reviewer agents), and integration merging (with conflict resolution). - Distinct agent roles use different Claude models: opus for architects and integrators; sonnet for builders/reviewers. - Provides notification options via webhook or Telegram on batch and review completion. - Offers a modular script system for spawning, endorsing, monitoring, reviewing, integrating, and cleaning up parallel task agents.
元数据
Slug claude-swarm
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Claude Swarm 是什么?

Claude-native multi-agent swarm orchestration for parallel coding. Use when spawning multiple Claude Code agents to work in parallel on a project with git wo... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 106 次。

如何安装 Claude Swarm?

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

Claude Swarm 是免费的吗?

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

Claude Swarm 支持哪些平台?

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

谁开发了 Claude Swarm?

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

💬 留言讨论