Claude as Brain, opencode as Hands.
A Claude Code plugin that decomposes coding tasks with Claude (the thinker), then fans them out as parallel workers via the opencode CLI configured with cost-effective providers (DeepSeek, Qwen, Gemini Flash, GLM, Kimi).
Prerequisites: Claude Code and opencode must already be installed and configured.
git clone https://github.com/xunhe730/cc-opencode.git
bash cc-opencode/install.shThen restart Claude Code and run /opencode:setup to verify.
| Command | Description |
|---|---|
/opencode:swarm "<brief>" |
Decompose + fan out workers in parallel |
/opencode:plan "<brief>" |
Dry run — planner only, prints JSON plan |
/opencode:setup |
Preflight check (opencode version + live probe) |
/opencode:providers |
Print provider matrix + recommended two-tier preset |
/opencode:status |
Show last planner/worker sessions for this cwd |
/opencode:resume |
Resume last planner or worker session |
/opencode:cancel |
Cancel active workers (SIGTERM → grace → SIGKILL) |
/opencode:swarm "<brief>"
│
├─ Claude (Brain): decompose → plan → risk gate → synthesize
│
├─ Task(opencode-planner)
│ └─ node companion.mjs plan "<brief>"
│ └─ opencode run --format json ...
│ ← JSON plan: [{id, title, files[], risk_level, depends_on[]}]
│
├─ orchestrator: print table, safety uplift, risk gate (AskUserQuestion)
│
└─ Task(opencode-worker, subtask) × N [parallel, dependency-ordered]
└─ node companion.mjs work '{...}'
└─ opencode run --dangerously-skip-permissions ...
← {status, files_touched, summary, evidence}
Claude never writes code directly. opencode workers do the actual edits. Claude owns decomposition, risk gating, overlap detection, and synthesis.
Run /opencode:providers to see the full provider matrix with pricing and JSON-mode fidelity. Recommended two-tier preset:
planner: deepseek-chat (DeepSeek-V3, $0.27/1M in)
worker: qwen3-coder (Qwen3-Coder, $0.20/1M in)
See docs/providers.md for the complete table and opencode config blocks.
- Workers run with
--dangerously-skip-permissions— always run on a feature branch. - Tasks touching
.env*,*credentials*,*.key,*secret*,id_rsa*,*.pemare auto-uplifted torisk_level: highand require explicit approval before execution. /opencode:cancelterminates all active workers with zero orphan guarantee.
bash install.sh # default (refuses if already installed)
bash install.sh --force # overwrite existing install
bash install.sh --name-suffix cc # install alongside as /cc-opencode:*See MIGRATION.md if you have the local opencode plugin already installed.
| Knob | Default |
|---|---|
| Model / provider | Inherited from opencode config |
--max-parallel |
5 |
| Planner timeout | 120 s |
| Worker timeout | Per providers/capabilities.json, fallback 600 s |
| Cancel grace period | OPENCODE_CANCEL_GRACE_MS (default 5000 ms) |
| Transient retry | 3 attempts, 1/4/16 s backoff |
MIT — see LICENSE.