clawteam-skill
by @xybio
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 tas...
clawhub install clawteam-skillπ About This Skill
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:
Approve/Reject buttons.
- Telegram uses inline keyboard approval buttons.
- Other channels fall back to explicit text approval (approve / reject).
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.
# 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:
# 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)
# 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
# 1. Create team with leader
clawteam team spawn-team my-team -d "Build a web app" -n leader2. 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 | Create team |
| clawteam team discover | List all teams |
| clawteam team status | Show team members and info |
| clawteam team cleanup | Delete team and all data |
Task Management
| Command | Description |
|---------|-------------|
| clawteam task create | Create task |
| clawteam task list | List tasks (filterable) |
| clawteam task update | 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.
# 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:
board attach)clawteam/{team}/{agent})CLAWTEAM_AGENT_NAME, CLAWTEAM_TEAM_NAME, etc.Spawn safety features:
Messaging
| Command | Description |
|---------|-------------|
| clawteam inbox send | Point-to-point message |
| clawteam inbox broadcast | Broadcast to all |
| clawteam inbox peek | 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 | 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 [--team-name | Launch from template |
Built-in templates: hedge-fund, code-review, research-paper
Configuration
clawteam config show # Show all settings
clawteam config set transport file # Set transport backend
clawteam config health # System health check
Do not enable permission-skipping settings in shared or production environments. Keep permission prompts enabled for auditability.
Credentials & Channel Integration
This skill itself does not directly read or manage Feishu/Telegram tokens. Channel credentials are managed by the OpenClaw channel plugins/runtime.
Other Commands
| Command | Description |
|---------|-------------|
| clawteam lifecycle idle | Report agent idle |
| clawteam session save | Save session for resume |
| clawteam plan submit | Submit plan for approval (team-scoped storage) |
| clawteam workspace list | List git worktrees |
| clawteam workspace merge | Merge agent branch |
JSON Output
Add --json before any subcommand for machine-readable output:
clawteam --json task list my-team
clawteam --json team status my-team
Typical Workflow
1. User says: "Create a team to build a web app"
2. You do: clawteam team spawn-team webapp -d "Build web app" -n leader
3. Create tasks: Use clawteam task create with --blocked-by for dependencies
4. Spawn agents: Use clawteam spawn for each worker
5. Monitor: Use bounded polling with timeout/attempt limits
6. Communicate: Use clawteam inbox broadcast for team-wide updates
7. Deliver: Share progress and ask for confirmation before destructive actions
8. Cleanup: After confirmation, run clawteam cost show, clawteam task stats, merge worktrees, then clawteam team cleanup webapp --force
Leader Orchestration Pattern
When YOU are the leader agent, follow this pattern to safely manage a swarm with user oversight:
Phase 1: Analyze & Plan
1. Understand the user's goal
2. Break it into independent subtasks
3. Identify dependencies between tasks (what must finish before what)
4. Decide how many worker agents are needed
Phase 2: Setup
# Create team
clawteam team spawn-team -d "" -n leaderCreate tasks with dependency chains
clawteam task create "Design API" -o architect
Save the returned task ID (e.g., abc123)
clawteam task create "Build backend" -o backend --blocked-by abc123
clawteam task create "Build frontend" -o frontend --blocked-by abc123
clawteam task create "Integration tests" -o tester --blocked-by ,
Phase 3: Spawn Workers
# Each spawn launches an openclaw tui in its own tmux window
clawteam spawn -t -n architect --task "Design REST API schema for "
clawteam spawn -t -n backend --task "Implement backend based on API schema"
clawteam spawn -t -n frontend --task "Build React frontend"
clawteam spawn -t -n tester --task "Write and run integration tests"
Phase 4: Monitor Loop
Use a bounded monitor loop (for example, max 40 iterations with 30s interval = 20 minutes), then stop and report status. 1. Push mid-progress updates β when ~50% of tasks complete, send the user a brief status update (e.g. "4/7 agents done, 3 still working"). 2. Deliver final results when all tasks complete. 3. Escalate to user if timeout is reached, instead of running indefinitely.
# Poll task status every 30-60 seconds with an upper bound
max_rounds=40
for ((round=1; round<=max_rounds; round++)); do
clawteam --json task list | python3 -c "
import sys, json
tasks = json.load(sys.stdin)
done = sum(1 for t in tasks if t['status'] == 'completed')
total = len(tasks)
print(f'{done}/{total} complete')
if done == total: print('ALL DONE'); sys.exit(0)
"
# Check for messages from workers
clawteam inbox receive
# Send a mid-progress update when roughly half the tasks are done
sleep 30
doneTimeout branch: ask user whether to continue monitoring
echo "Monitor timeout reached; request user confirmation to continue."
Phase 5: Converge & Report
Before merge/cleanup, ask for user confirmation. Include the final output, a summary, and cost/timing stats.
# After all tasks complete β do ALL of these steps:
clawteam board show # Final status
clawteam cost show # Total cost β include in report to user
clawteam task stats # Timing stats β include in report to user
Ask user for confirmation before merge and cleanup
Merge each worker's branch back to main (after confirmation)
for agent in ...; do
clawteam workspace merge --agent $agent
done
clawteam team cleanup --force # Clean up after confirmation
Then: send the final deliverables to the user
Decision Rules for the Leader
--blocked-by to chain them; ClawTeam auto-unblocksinbox sendin_progress too long, send a nudge via inbox sendSafety Guardrails
spawn subprocess, workspace merge, team cleanup --force, board serve.Remote Approval Cards
Render approval UI based on the current message source (channel-aware behavior):
feishu source: always use Feishu interactive card (schema: "2.0") with approval_decision button callback.telegram source: use inline keyboard buttons (Approve / Reject) with callback payload carrying approval_id and decision.approve or reject.approval_id (unique, one-time)
- action (what will be executed)
- risk_level (low/medium/high)
- scope (files/commands/resources affected)
- deadline (approval timeout)Feishu template (same-row buttons, recommended):
{
"schema": "2.0",
"config": { "wide_screen_mode": true },
"header": {
"title": { "tag": "plain_text", "content": "Remote Approval" },
"template": "orange"
},
"body": {
"elements": [
{
"tag": "markdown",
"content": "approval_id: \naction: \nrisk_level: \nscope: \ndeadline: Source detection hint:
channel=feishu or channel=telegram).agent:*:feishu:* -> Feishu mode
- agent:*:telegram:* -> Telegram modeData Location
All state stored in ~/.clawteam/:
~/.clawteam/teams//config.json ~/.clawteam/tasks//task-.json (with fcntl file locking for concurrent safety)~/.clawteam/plans//-.md (team-scoped, isolated per team)~/.clawteam/teams//inboxes//msg-*.json ~/.clawteam/costs// π‘ Examples
One-Command Template Launch (Recommended)
# 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
# 1. Create team with leader
clawteam team spawn-team my-team -d "Build a web app" -n leader2. 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
βοΈ Configuration
clawteam config show # Show all settings
clawteam config set transport file # Set transport backend
clawteam config health # System health check
Do not enable permission-skipping settings in shared or production environments. Keep permission prompts enabled for auditability.