By khaledzag
Integrates OpenCode into Claude for plan-first or direct delegation of coding tasks, enabling a multi-agent workflow where Claude handles planning and OpenCode executes implementation.
Delegate a coding task directly to OpenCode without a planning phase. **Trigger this skill whenever the user's request starts with or contains a direct delegation verb** — "delegate to opencode", "delegate this to opencode", "use opencode to X", "have opencode do X", "just use opencode", "run this through opencode", "ask opencode to X", "hand this to opencode" — REGARDLESS of how large or complex the task itself is. The user's explicit instruction to delegate is authoritative; do not second-guess it based on task size, scope, or complexity. Also trigger when the user names a specific OpenCode-supported model (GLM-5.1, GPT-5, Gemini, Kimi, DeepSeek, Claude via opencode, local Ollama) and asks to use it. If the user wants Claude to plan first before delegating ("plan and implement", "plan this and then delegate", "design first then implement", "think through the approach"), use the `opencode-implement` skill instead — but only if the user's phrasing explicitly asks for planning. "Delegate" without "plan" means direct delegation, even for big tasks.
Plan a coding task with Claude, then delegate the implementation to OpenCode. **Trigger this skill ONLY when the user's request explicitly asks for a planning phase** — "plan and implement", "plan and delegate", "plan this with Claude then have opencode build it", "design first, then implement", "think through the approach then delegate", "let's plan this together first", or any variant that explicitly mentions planning, designing, or thinking through before delegating. Do NOT trigger this skill just because a task is large or multi-file; if the user said "delegate" without "plan", they want direct delegation via `opencode-delegate`, even for substantial work. Trust the user's literal phrasing — if "plan" or "design" is absent, route to `opencode-delegate` instead. The task being non-trivial doesn't override the user's explicit choice of verb.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
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.
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.
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.
You'll need a few things first:
opencode --version to check.opencode auth login if you haven't already and pick whichever provider you want to use (Z.AI Coding Plan, Opencode subscription, OpenAI, Anthropic, etc.).~/.zshrc or ~/.bashrc and restart Claude Code:
export BASH_MAX_TIMEOUT_MS=3600000 # 1 hour ceiling
export BASH_DEFAULT_TIMEOUT_MS=1800000 # 30 min default
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.
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.
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.
Every delegation, the plugin asks you what OpenCode should be allowed to do. Three options:
npx claudepluginhub khaledzag/claude-opencode --plugin claude-opencodePersistent file-based planning for AI coding agents. Crash-proof markdown plans (task_plan.md, findings.md, progress.md) that survive context loss and /clear, with an opt-in completion gate and multi-agent shared state. Manus-style. Works with Claude Code, Codex CLI, Cursor, Kiro, OpenCode and 60+ agents via the SKILL.md standard. Includes Arabic, German, Spanish, and Chinese (Simplified and Traditional).
v9.44.1 — Patch release for Gemini environment/version detection and qwen auth gating. Run /octo:setup.
Claude harness - A harness for solo developers (Vibecoders) to handle full-cycle contract development.
Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques
Harness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses
Tools to maintain and improve CLAUDE.md files - audit quality, capture session learnings, and keep project memory current.