/workflow:opencode-clifrom workflow
Drive OpenCode from an external harness (Claude Code, codex, a script) through the opencode CLI, for code writing and second-model code review. Use when the user says "delegate to opencode", "opencode review", "second-model code review", "run opencode", "opencode CLI", or names an opencode reviewer such as the glm or kimi reviewer. Contains the staging recipe, model selection from config, the --agent trap, permission and deadline handling, and the validity rule for a delegated review. Code only; for plan, prose, spec, architecture, product, or marketing review use the `collaborating-with-antigravity` skill instead. Never for a session already running inside OpenCode, which dispatches its subagents in-session instead.
Ships in workflow. 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.
None: SKILL.md is the whole skill.
Delegating code work to OpenCode from outside an OpenCode session. Check the three preconditions before anything else.
1. You must not already be an OpenCode session. A native OpenCode
session dispatches its own pinned subagents in-session and must never
shell out to the opencode CLI. A nested server breaks per-session cost
capture and violates the invariant that a review is never nested inside a
delegation. If that is you, stop here and follow the machine's global
opencode instruction file, ~/.config/opencode/AGENTS.md (authored in
the dotfiles opencode group; if it is not deployed on this machine yet,
apply these three rules directly):
model: field rather than the filename..review/
directory in the working directory and name the staged paths. Never
fall back to the CLI because a read was refused.2. Pre-vet the reviewer before any gate depends on it. Run a throwaway echo prompt against the exact model id you plan to use, and read the current pins (see Model selection). A reviewer that is unreachable, out of credit, or mis-pinned fails silently at the moment you need it most.
cd /tmp && timeout 120 opencode run -m <provider>/<model> "Reply with: OK"
3. This skill's artifact class is code: code writing and code review
through the opencode CLI. Work outside that class is not this skill's to
place. Hand it back to the delegating-work router when a board process
installs one; with no router present, follow the repo's review-tooling
document. Plan reviews, prose, specs, architecture, product, and
marketing review land in collaborating-with-antigravity, but naming
that destination is not the same as picking the lane.
Within code, which reviews go to the opencode pinned reviewers and
which to the codex CLI (codex-cli) is the repo review-tooling
document's call; read it before dispatching either.
There is no model table in this skill on purpose - a stale table is what retired its predecessor. Read the pins at routing time:
~/.config/opencode/agent/*.md - each agent file's model: field~/.config/opencode/opencode.jsonAgent names do not imply model families. A file called rust-reviewer may be pinned to any provider. The config is the only source of truth.
Never pass a router id of the form accounts/fireworks/routers/NAME; those bill extra. Pass the plain model path, .../models/NAME.
Stage first, then run. Never point a reviewer at scattered paths.
cd into that directory.cd /path/to/staging
timeout 600 opencode run -m <provider>/<model> \
"Read prompt.md, spec.md and full-range.diff in this directory. ..."
Add --format json when you want the tool-call trace rather than plain
text. Flags verified present on 1.18.4: --command, -c/--continue,
-s/--session, --fork, --share, -m/--model, --agent, --format
{default,json}, -f/--file, --title, --attach, --dir, --port, --variant,
--thinking, -i/--interactive, --auto.
opencode run --agent rust-reviewer does not do what it reads like.
Subagent-only agents are not CLI-addressable, and the CLI silently falls
back to a different agent rather than erroring. You get a review from a
model you did not choose. Select the model with -m and put the reviewer
persona in the prompt.
Reads outside the working directory are gated by OpenCode's external_directory permission. It asks by default, and in a headless run there is nobody to answer, so it auto-rejects. A run that ends in permission rejections with no verdict is a failed delegation, not a pass. Staging removes the permission question entirely.
opencode run has no timeout flag, so the caller owns the deadline. Always
wrap it (timeout 600 opencode run ...) and pick a bound you are willing
to wait out.
If it stalls, switch tools rather than retrying blind. Two runs have been killed at the deadline, one at 10 minutes and one at 50; a stall record like that is exactly what a repo's review-tooling document weighs when it picks its reviewers.
A delegation counts only if a verdict came back. Each of these is a FAILED delegation, never a clean pass:
Headless runs have exited 0 with no review text at all. Before recording a result, confirm there is a final text event and grep the stream for auto-rejection messages.
Put these in the prompt, or the output will not be gradeable:
Zero findings is a valid result. Record it as an explicit PASS.
A model never grades its own diff. If a model wrote the code, a different model reviews it. Where the repo ships its own delegation document, that document overrides the defaults here - read it first.
Pair with gate-probes for the universal checks, and rust-review or
python-review for language-specific probes once the findings are back.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub shearerbeard/agent-skills --plugin workflow11 skills in this plugin
/codex-cliDrive the codex CLI from an external harness (Claude Code, OpenCode, a
script) for a second-model read. Use when the user says "codex review",
"second opinion via codex", "adversarial review", "drive codex", "codex
exec", or names codex as the reviewer for a diff, plan, or card.
Contains the sandboxed invocation, caller-owned deadlines, the prompt
contract that makes a review gradeable, the validity rule for a
delegated review, and the staging recipe for material outside the
working repo. Pins no model on purpose. Where a repo ships a
review-tooling document, that document decides which role codex serves.
/collaborating-with-antigravityDelegate plan, prose, spec, architecture, product, and marketing review to the Google Antigravity (agy) CLI, through the agy MCP tools from Claude Code or a JSON-bridge script from other harnesses. Also covers sandboxed execution in a worktree and long agent loops that should not block the main conversation. Not for code review, which goes to the opencode CLI reviewers or the codex CLI. agy spend is budget-gated, so get explicit user approval once per session before dispatching./gate-probesUse before git commit, gh pr create, or when the user says "ready to commit",
"review this diff", "check before I push", or "run the gates". Also use when
the user says "ensure proper gates", "verifiable checks", "ready for
implementation", "plan with gates", or "scope this change". Run these
universal gates before language-specific review skills (python-review,
rust-review). Checks scope control, duplication, reviewability, verification,
and residual risks.