/claude-opencode:opencode-delegatefrom claude-opencode
Delegates coding tasks directly to OpenCode without a planning phase. Claude still handles model selection, permissions, and verification, but skips the plan-then-approve gate.
Ships in claude-opencode. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Run a coding task through OpenCode immediately, without writing a plan first. Claude still handles model selection, permissions, and verification — but skips the plan-then-approve gate.
This skill is for direct delegation. If the user wants Claude to plan the work first and get approval before delegating, use opencode-implement instead.
opencode-implement.opencode isn't installed — stop and direct the user to install.Note on large tasks: If the user says "delegate" but the work seems substantial enough that planning would help, you can briefly mention this once after triggering — "this is a sizable task; would you prefer to plan first via opencode-implement?" — but only as an optional suggestion. If the user confirms direct delegation or doesn't address the suggestion, proceed with this skill. Don't override the user's verb.
Use AskUserQuestion for every decision point. One decision per call. Do not batch questions as prose.
Decision points, in order:
Wait for each answer before asking the next. Don't combine them into one message.
Run these two bash commands before anything else, every delegation:
opencode --version
opencode auth list
This is mandatory. The output of opencode auth list is what drives model selection — without it, you don't know which models the user is authed for, and any model list you present from memory is wrong.
See references/preflight.md for full details and references/model-selection.md for how to build the actual model list from the auth output.
Failure modes to avoid:
provider/model string, no description, no recommendation, no speculation about behavior.opencode models returns only a handful when more should be available, run opencode models --refresh and retry. If still short, try OPENCODE_ENABLE_EXPERIMENTAL_MODELS=true opencode models.opencode models <provider>. Use opencode models with no argument. Some providers expose models under multiple provider IDs (e.g., opencode and opencode-go are separate, but a single subscription can give access to both), so querying just one ID hides models the user actually has.opencode, don't pad the list with anthropic/... or openai/... options they can't use.If you catch yourself doing any of these, stop and re-read references/model-selection.md.
For most direct delegations the user's message is already the prompt. If the task is truly clear — "have opencode fix the typo in src/login.tsx line 42" — go straight to step 2.
If the task seems to need a specific file attached but the user hasn't named it, check the repo quickly (1-2 Grep/Read calls) to identify the file. Don't do deep exploration — this skill is about speed. If scope is genuinely unclear, ask one short clarifying question before proceeding, or suggest the user might want opencode-implement (planning) instead.
See references/model-selection.md — but only after running opencode models (no provider argument) via bash_tool. The model list MUST come from that bash output, not from memory. Single AskUserQuestion call. Wait for the answer.
See references/permissions.md for the three presets. Single AskUserQuestion call. Wait for the answer.
For direct delegation, the natural default is "Implement" unless the user's phrasing suggests otherwise ("just show me what it would do" → read-only).
Construct and run the command per references/argument-order.md.
Pattern:
OPENCODE_PERMISSION='<preset JSON>' \
opencode run \
-m <model> \
--title "<short desc of task>" \
-f <relevant file paths if obvious from task> \
"<user's task, cleaned up into an imperative instruction>"
Prompt construction notes:
-f, if any. Don't attach files the task doesn't touch.For running the command (timeouts, handling mid-run exits), see references/running.md.
When opencode returns, verify the result. Even without a plan to check against, verification is required — don't blindly trust the model's self-report.
Report back concisely:
See references/troubleshooting.md for common errors and fixes.
references/preflight.md — opencode version + auth check.references/model-selection.md — building the model list from authed providers.references/permissions.md — the three permission presets.references/argument-order.md — the File not found trap and how to avoid it.references/running.md — timeouts, mid-run exits, session continuation.references/troubleshooting.md — common errors and fixes.references/cli-flags.md — full opencode run flag reference.references/argument-order.md (opens in a new tab)references/cli-flags.md (opens in a new tab)references/model-selection.md (opens in a new tab)references/permissions.md (opens in a new tab)references/preflight.md (opens in a new tab)references/running.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub khaledzag/claude-opencode --plugin claude-opencode2 skills in this plugin
Other plugins' skills for the same job