Install
openclaw skills install @khaentertainment/grok-swarmRefactors code using Grok 4.20 multi-agent swarm to improve readability, maintain behavior, add modern patterns, and explain changes.
openclaw skills install @khaentertainment/grok-swarmMulti-agent intelligence powered by Grok 4.20 Multi-Agent Beta
Give any AI coding agent access to a 4-agent swarm with ~2M token context for code analysis, refactoring, generation, and complex reasoning.
Grok 4.20 coordinates 4 agents (orchestrator + specialists + critics) to:
tools.grok_swarm({
prompt: "Analyze security of this auth module",
mode: "analyze",
files: ["src/auth/*.ts"]
});
/grok-swarm:analyze Review auth module security
/grok-swarm:refactor Convert to async/await
/grok-swarm:code Write FastAPI endpoint
| Mode | Description |
|---|---|
analyze | Security audits, architecture review |
refactor | Modernization, migration |
code | Feature generation, tests |
reason | Multi-perspective reasoning |
orchestrate | Custom agent handoff |
openai>=1.0.0Set your API key:
export OPENROUTER_API_KEY=sk-or-v1-...
Or create ~/.config/grok-swarm/config.json:
mkdir -p ~/.config/grok-swarm
echo '{"api_key": "sk-or-v1-..."}' > ~/.config/grok-swarm/config.json
chmod 600 ~/.config/grok-swarm/config.json
# Via ClawHub
clawhub install grok-swarm
# Via npm
npm install @khaentertainment/grok-swarm