--- name: clawteam description: "Multi-agent swarm coordination via the ClawTeam CLI. Use when the user wants to create agent teams, spawn multiple agents to work in parallel, coordinate tasks with dependencies, broadcast messages between agents, monitor progress via kanban board, or launch pre-built team templates (hedge-fund, code-review, research-paper). ClawTeam uses git worktree isolation + tmux + filesystem-based messaging. Trigger phrases: team, swarm, multi-agent, clawteam, spawn agents, parallel agents, agent team." homepage: https://github.com/win4r/ClawTeam-OpenClaw metadata: openclaw: requires: bins: ["clawteam"] --- # ClawTeam — Multi-Agent Swarm Coordination ## Overview ClawTeam is a CLI tool (`clawteam`) for orchestrating multiple AI agents as self-organizing swarms. It uses git worktree isolation, tmux windows, and filesystem-based messaging. OpenClaw is the default agent backend. Source: https://github.com/win4r/ClawTeam-OpenClaw ## Optimization Notes This skill is based on the upstream ClawTeam project and includes additional safety/approval optimizations for real-world operations: - Channel-aware approval UX: - Feishu uses interactive approval cards with same-row `Approve/Reject` buttons. - Telegram uses inline keyboard approval buttons. - Other channels fall back to explicit text approval (`approve` / `reject`). - Safer execution defaults: - No permission-bypass guidance. - No infinite unattended monitor loops. - Destructive operations require explicit approval checkpoints. These changes are intentional enhancements, not a verbatim copy. **CLI binary**: `clawteam` (must be preinstalled and available in `PATH`) ## Install & Verification This skill is instruction-only. It does not install `clawteam` automatically. Install from a trusted source and pin a version/tag when possible. ```bash # Example only: verify upstream release/tag before install pipx install "git+https://github.com/win4r/ClawTeam-OpenClaw.git@" # Verify binary and version which clawteam clawteam --version ``` Recommended preflight before first real run: ```bash # Use a disposable repo/worktree first clawteam config health clawteam team spawn-team dry-run -d "safety check" -n leader clawteam team cleanup dry-run --force ``` ## Quick Start ### One-Command Template Launch (Recommended) ```bash # Launch a pre-built team from a template clawteam launch hedge-fund --team fund1 clawteam launch code-review --team review1 clawteam launch research-paper --team paper1 ``` ### Manual Team Setup ```bash # 1. Create team with leader clawteam team spawn-team my-team -d "Build a web app" -n leader # 2. Create tasks with dependencies clawteam task create my-team "Design API schema" -o architect # Returns task ID, e.g., abc123 clawteam task create my-team "Implement auth" -o backend --blocked-by abc123 clawteam task create my-team "Build frontend" -o frontend --blocked-by abc123 clawteam task create my-team "Write tests" -o tester # 3. Spawn agents (each gets its own tmux window + git worktree) clawteam spawn -t my-team -n architect --task "Design the API schema for a web app" clawteam spawn -t my-team -n backend --task "Implement OAuth2 authentication" clawteam spawn -t my-team -n frontend --task "Build React dashboard" # 4. Monitor clawteam board show my-team # Kanban view clawteam board attach my-team # Tmux tiled view (all agents side-by-side) clawteam board serve --port 8080 # Web dashboard ``` ## Command Reference ### Team Management | Command | Description | |---------|-------------| | `clawteam team spawn-team -d "" -n ` | Create team | | `clawteam team discover` | List all teams | | `clawteam team status ` | Show team members and info | | `clawteam team cleanup --force` | Delete team and all data | ### Task Management | Command | Description | |---------|-------------| | `clawteam task create "" -o [-d ""] [--blocked-by ]` | Create task | | `clawteam task list [--owner ]` | List tasks (filterable) | | `clawteam task update --status ` | Update status | | `clawteam task get ` | Get single task | | `clawteam task stats ` | Timing statistics | | `clawteam task wait ` | Block until all tasks complete | **Task statuses**: `pending`, `in_progress`, `completed`, `blocked` **Dependency auto-resolution**: When a blocking task completes, dependent tasks automatically change from `blocked` to `pending`. **Task locking**: When a task moves to `in_progress`, it is locked by the calling agent. Other agents cannot claim it unless they use `--force`. Stale locks from dead agents are automatically released. ### Agent Spawning Use the default command (`openclaw`) unless the user explicitly requests another backend. Keep normal permission and trust prompts enabled. ```bash # Default (RECOMMENDED): spawns openclaw tui in tmux with prompt clawteam spawn -t -n --task "" # Explicit backend (still uses openclaw by default) clawteam spawn tmux -t -n --task "" clawteam spawn subprocess -t -n --task "" # With git worktree isolation clawteam spawn -t -n --task "" --workspace --repo /path/to/repo ``` High-impact note: `spawn subprocess` and custom backend modes can execute arbitrary code through delegated commands. Use only in trusted repositories/environments. Each spawned agent gets: - Its own tmux window (visible via `board attach`) - Its own git worktree branch (`clawteam/{team}/{agent}`) - An auto-injected coordination prompt (how to use clawteam CLI) - Environment variables: `CLAWTEAM_AGENT_NAME`, `CLAWTEAM_TEAM_NAME`, etc. **Spawn safety features:** - Commands are pre-validated before launch — you get a clear error if the agent CLI is not installed - If a spawn fails, the registered team member and worktree are automatically rolled back - Workspace trust and permission prompts must be reviewed and confirmed by the user or operator ### Messaging | Command | Description | |---------|-------------| | `clawteam inbox send "" --from ` | Point-to-point message | | `clawteam inbox broadcast "" --from ` | Broadcast to all | | `clawteam inbox peek -a ` | Peek without consuming | | `clawteam inbox receive ` | Consume messages | | `clawteam inbox log ` | View message history | ### Monitoring | Command | Description | |---------|-------------| | `clawteam board show ` | Kanban board (rich terminal) | | `clawteam board overview` | All teams overview | | `clawteam board live ` | Live-refreshing board | | `clawteam board attach ` | Tmux tiled view | | `clawteam board serve --port 8080` | Web dashboard | ### Cost Tracking | Command | Description | |---------|-------------| | `clawteam cost report --input-tokens --output-tokens --cost-cents ` | Report usage | | `clawteam cost show ` | Show summary | | `clawteam cost budget ` | Set budget | ### Templates | Command | Description | |---------|-------------| | `clawteam template list` | List available templates | | `clawteam template show ` | Show template details | | `clawteam launch