Skills swarm-coding-skill
Autonomous multi-agent code generation. Planner creates manifest, specialized roles execute tasks. Generates complete projects with tests, Docker, CI, and decision logs.
git clone https://github.com/openclaw/skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/arunnadarasa/swarm-coding-skill" ~/.claude/skills/clawdbot-skills-swarm-coding-skill && rm -rf "$T"
skills/arunnadarasa/swarm-coding-skill/SKILL.mdSwarm Coding Skill
Fully autonomous multi-agent software development. Given a plain-English prompt, the swarm designs, implements, tests, and delivers a complete project end-to-end.
Core capability: Code generation via OpenRouter's qwen3-coder model. The orchestrator drives a Planner to create a manifest, then executes specialized worker roles (BackendDev, FrontendDev, QA, DevOps, etc.) in dependency order. All code is written to files; no interactive sessions.
Important: This skill generates code for review and deployment by the user. It does not make business decisions or operate autonomously in production. The user remains responsible for security, compliance, and operational decisions.
How It Works
- Orchestrator (
role) analyzes your prompt, decides tech stack and architecture, and creates aPlanner
manifest with tasks and dependencies.swarm.yaml - Worker agents (
,BackendDev
,FrontendDev
,QA
) are spawned as sub-sessions. Each has a clear persona and works on its assigned files in a shared workspace.DevOps - Coordination: The orchestrator tracks task completion and dependencies. When a task finishes, it marks it done and starts any unblocked downstream tasks.
- Conflict avoidance: Files are partitioned by role (Backend owns
, Frontend ownsserver/
, etc.). If two roles need the same file, the manifest assigns an owner.client/ - Quality gates: QA must pass tests before integration; DevOps ensures containerization; no merge without green tests.
- Deliverable: You get a complete project directory with README, tests, Dockerfile, and optionally a GitHub repo or zip.
Usage
# In your main OpenClaw session, invoke: /trigger swarm-code "Build a dashboard that shows Moltbook stats and ClawCredit status"
The skill will:
- Spawn the orchestrator in an isolated session
- Orchestrator spawns workers sequentially or in parallel (based on dependencies)
- Output a final summary and path to the completed project
Requirements
- Node.js v18+
- Environment variables (in
at workspace root):.env- Required:
— OpenRouter API key withOPENROUTER_API_KEY
accessqwen/qwen3-coder - Optional:
(default:OPENROUTER_MODEL
),qwen/qwen3-coder
for dry-runMOCK=1
- Required:
- Internet access for OpenRouter API (and optionally GitHub/Docker if deployment requested)
Important: The orchestrator reads
.env from the workspace root (parent directory of this skill) and writes project files to swarm-projects/ and logs to .learnings/ in that same workspace root. Run in an isolated workspace to avoid exposing unrelated secrets.
Configuration
Store your OpenRouter key in
.env at the workspace root:
OPENROUTER_API_KEY=sk-or-...
Optional overrides:
OPENROUTER_MODEL=qwen/qwen3-coder MOCK=1 # dry-run, no API calls
The skill uses
qwen/qwen3-coder by default. Ensure your OpenRouter key has that model enabled.
Output
The created project lives in
swarm-projects/<timestamp>/ and includes:
with run instructionsREADME.md
(or equivalent)package.json- Source code organized by component
directory with automated teststest/
andDockerfile
(if applicable)docker-compose.yml
with GitHub Actions workflow (optional)CI/
— Project memory documenting key architectural and technical decisions with rationaleDECISIONS.md
— Learning logs capturing errors, insights, and feature requests.learnings/
— Failures, exceptions, and recovery actionsERRORS.md
— Corrections, better approaches, knowledge gapsLEARNINGS.md
— Requested capabilities that don't exist yetFEATURE_REQUESTS.md
— Execution summary with role performance, statistics, and next stepsSWARM_SUMMARY.md
Continuous Improvement
The swarm skill automatically captures learnings during execution to improve future runs:
What Gets Logged
- Worker failures →
with context and recovery suggestions.learnings/ERRORS.md - Better approaches discovered →
(e.g., "Simplified X by using Y").learnings/LEARNINGS.md - User corrections →
when you override a decision.learnings/LEARNINGS.md - Missing capabilities →
when you ask for something the skill can't do.learnings/FEATURE_REQUESTS.md
After Each Run
A
SWARM_SUMMARY.md is generated with:
- Role success/failure rates
- Total files generated
- References to learnings captured
- Recommendations for next steps
Promoting Learnings
Over time, review
.learnings/ files:
- Recurring error patterns → update orchestrator prompts or add retry logic
- Better approaches → incorporate into the skill's default behavior
- Feature requests → consider for skill enhancements
This creates a feedback loop where each swarm run makes the skill smarter.
Example Prompts
- "Build a Node.js API with Express that serves Moltbook stats from JSON logs"
- "Create a React dashboard with dark theme and charts for ClawCredit status"
- "Make a CLI tool that checks ClawCredit pre-qualification and notifies via desktop alert"
- "Generate a smart contract that holds ClawCredit limits and allows x402 payments"
- "Build a hackathon app: a React dashboard that shows user's token balance using Privy auth" (includes Privy integration out of the box)
Notes
- The skill makes all decisions autonomously: tech stack, file structure, library choices.
- If a task fails, the orchestrator will retry once with adjusted instructions.
- You can monitor progress via the sub-agent logs in
..openclaw/agents/<agent-id>/sessions/ - To stop early, send
to the orchestrator's session./stop - Privy Integration: When the prompt mentions blockchain, web3, tokens, NFTs, or Privy, the skill automatically includes Privy authentication and wallet infrastructure. Backend includes
with JWKS verification and a simulated fallback; frontend integrates/auth/callback
if React is used. For advanced agentic wallet controls, see the Privy Agentic Wallets skill.@privy-io/react-auth - Project Memory: Each swarm run creates a
file that documents significant decisions made by the planner and each agent. This serves as long-term knowledge grounding—future developers (or the same human weeks later) can understand why certain choices were made. Agents are prompted to explain their technical decisions (e.g., library selection, architecture patterns, security tradeoffs) as part of their output.DECISIONS.md
Enjoy your autonomous coding factory 🚀