Main workflow orchestrator for complex tasks. Coordinates phase transitions, enforces checkpoints based on config, manages subagent delegation. Invoke for [COMPLEX] tasks.
View on GitHubc-daly/agent-swarm
agent-swarm
skills/orchestrate/SKILL.md
January 20, 2026
Select agents to install to:
npx add-skill https://github.com/c-daly/agent-swarm/blob/main/skills/orchestrate/SKILL.md -a claude-code --skill orchestrateInstallation paths:
.claude/skills/orchestrate/# Workflow Orchestrator
**State Management:** This skill uses `scripts/state.py` CLI for all state operations.
- Phase transitions: `python3 scripts/state.py transition <phase>`
- Checkpoint config: `python3 scripts/state.py checkpoint <phase> <on|off>`
- Autopilot mode: `python3 scripts/state.py autopilot <on|off|toggle>`
## Configuration
Load from `~/.claude/plugins/agent-swarm/config/workflow.json`:
```bash
python3 scripts/state.py transition <phase>
```
### Discover Available Tools
Before starting any task, know what's available:
```bash
# Full inventory
python3 ~/.claude/plugins/agent-swarm/scripts/inventory.py all
# Find right tool for a need
python3 ~/.claude/plugins/agent-swarm/scripts/inventory.py tools "find function definition"
```
**Tool Selection Priority:**
1. Serena → for code analysis (NOT Read)
2. Context7 → for docs (NOT WebSearch)
3. Batch scripts → for multiple operations
4. MCP tools → for single operations
5. Read/Bash → last resort only
### Transition Phase
```bash
python3 << 'EOF'
import json, sys
from pathlib import Path
new_phase = "PHASE_NAME" # Replace with target phase
state_path = Path.home() / ".claude/plugins/agent-swarm/.state/session.json"
state = json.loads(state_path.read_text())
old_phase = state.get("phase", "")
state["phase"] = new_phase
# Reset counters on phase change
state["search_count"] = 0
state["read_count"] = 0
state_path.write_text(json.dumps(state, indent=2))
checkpoint_needed = state.get("checkpoints", {}).get(new_phase, False)
print(f"[ORCHESTRATOR] {old_phase} → {new_phase}")
if checkpoint_needed:
print(f" ⚠️ CHECKPOINT: Get user approval before proceeding")
EOF
```
### Check Checkpoint
```bash
python3 << 'EOF'
import json
from pathlib import Path
state_path = Path.home() / ".claude/plugins/agent-swarm/.state/session.json"
state = json.loads(state_path.read_text())
phase = state.get("phase", "")
needs_checkpoint = state.get("checkpoints", {}).get(phase, False)
autopilot = state.get("autopil