claude-opencode
A Claude Code plugin that lets you hand coding work off to OpenCode. Claude does the thinking — reading the repo, designing the change, checking the result. OpenCode does the typing — making the actual edits, running your tests, iterating until it works. You stay in one Claude Code window the whole time.
Why I made this
If you use Claude Code on a subscription plan, you've probably noticed that big multi-file changes burn through your context fast. Claude is great at understanding what needs to happen, but having it do mechanical edits across ten files feels wasteful — that's exactly the kind of work cheaper or specialized models are good at.
OpenCode lets you run other models (GLM-5.1, GPT-5, Gemini, Kimi, local Ollama, whatever you have) for that grunt work. The catch is you'd normally have to switch terminals, lose the context Claude built up, and re-explain what you want.
This plugin solves that. You ask Claude something, Claude figures out the plan, you approve it, Claude hands it to OpenCode, and Claude verifies the result. One conversation, two agents, your choice of model.
What's in here
Two skills, picked based on what you ask for:
opencode-implement — when you want a plan first. Good for anything non-trivial. Claude reads the relevant files, writes a plan to .claude/plans/<task-name>.md, shows it to you, waits for your approval, then hands the plan to OpenCode. When OpenCode finishes, Claude reads the diff, runs your tests, and tells you what actually got built versus what the plan said.
opencode-delegate — when you just want it done. Good for small focused tasks where the planning step would be overkill. Claude asks which model and what permissions, runs OpenCode, verifies the result.
The two skills cover the same kinds of work; the difference is whether you want to see and approve a plan before any code gets written.
Installing
You'll need a few things first:
Then install the plugin one of two ways.
Through Claude Code's plugin marketplace (the recommended way):
/plugin marketplace add khaledzag/claude-opencode
/plugin install claude-opencode@claude-opencode
Quit Claude Code fully and relaunch.
Standalone (skip the plugin system, just drop the skills in):
git clone --depth 1 https://github.com/khaledzag/claude-opencode /tmp/claude-opencode
mkdir -p ~/.claude/skills
cp -r /tmp/claude-opencode/plugins/claude-opencode/skills/opencode-implement ~/.claude/skills/
cp -r /tmp/claude-opencode/plugins/claude-opencode/skills/opencode-delegate ~/.claude/skills/
rm -rf /tmp/claude-opencode
Then restart Claude Code.
Using it
Just ask in plain English. The skills trigger on different kinds of phrasings.
When you want Claude to plan first:
Plan and implement with opencode a retry layer for the HTTP client.
Design this feature with Claude, then have opencode build it.
Plan the logger migration, then delegate to opencode.
When you want to skip straight to delegation:
Just use opencode to fix the typo in the error message.
Have opencode add the null check in src/http/client.ts.
Run this through opencode with GLM-5.1.
For continuing a previous OpenCode session — say opencode hit a failing test and stopped, or you want to add follow-up work to what it just did:
Continue that opencode session and add integration tests.
Resume — the last run had a failing test.
Picking the model
OpenCode supports a lot of providers, and which one is right depends on what you're doing and what you've paid for. The plugin reads your opencode auth list and only shows you models you can actually use. No "recommendations" pulled from training data — just your real options.
If you're not sure which to pick, the skill just asks you. Pick whichever one you have authed and want to try.
Permissions
Every delegation, the plugin asks you what OpenCode should be allowed to do. Three options: