From swarm-code
Delegates code tasks like review, planning, Q&A, analysis to OpenCode Haiku subagents via bash. Single worker for focused tasks; parallel teams for complex ones. Token-efficient, no tmux needed.
npx claudepluginhub apoapps/swarm-code-plugin --plugin swarm-codeThis skill uses the workspace's default tool permissions.
<!-- Made by Alejandro Apodaca Cordova (apoapps.com) -->
Executes codeagent-wrapper CLI for AI code tasks using Codex, Claude, Gemini, OpenCode backends. Supports agent presets, skill injection, git worktree isolation, parallel execution, structured output.
Coordinates multiple Claude Code instances as agent teams with shared tasks, inter-agent messaging, and management for parallel research, feature development, debugging, and cross-layer coordination.
Orchestrates runtime teams of Claude Code agents for parallel code review, debate, planning, building, research via /orchestrate commands or team requests.
Share bugs, ideas, or general feedback.
Spawn Haiku subagents that call OpenCode via bash. Claude's agent panel shows progress — no custom UI needed.
| Situation | Pattern |
|---|---|
| One focused task (review, plan, Q&A) | Single worker |
| 2+ independent tasks (review + plan) | Parallel workers |
| Same task from multiple angles | Parallel workers |
Agent(
subagent_type="swarm-code:opencode-worker",
model="haiku",
prompt="<full task description with all context needed>"
)
The worker will ACK, call oc-run.sh (which runs opencode run), and SendMessage the result back.
TeamCreate(team_name="oc-team", description="<what the team is doing>")
Agent(
subagent_type="swarm-code:opencode-worker",
name="worker-review",
team_name="oc-team",
model="haiku",
prompt="<task A> — report result via SendMessage to team-lead"
)
Agent(
subagent_type="swarm-code:opencode-worker",
name="worker-plan",
team_name="oc-team",
model="haiku",
prompt="<task B> — report result via SendMessage to team-lead"
)
Workers run concurrently. Wait for both SendMessage results before synthesizing.
Workers call opencode run "<prompt>" headlessly. Prompt them with:
Always include the relevant code/context inline — workers can't read files themselves.
~70-80% fewer Claude tokens vs doing the analysis directly.
opencode-bridge.sh — that's deprecated, use oc-run.sh via the worker