# Opencode Runner

> Guide an external OpenCode CLI run through the host approval flow. Use only when users explicitly request OpenCode or approve an OpenCode comparison without a bundled runner script.

- Skill: `robsonrung/opencode-runner` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add robsonrung/opencode-runner`
- Raw SKILL.md: https://api.skillmd.com/api/skills/robsonrung/opencode-runner/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: robsonrung (https://skillmd.com/u/robsonrung)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/robsonrung/opencode-runner

---


# OpenCode Runner

Use this skill as a safe OpenCode handoff guide. This package intentionally does not ship an executable OpenCode wrapper.

## Native routing

Read `shared/references/host-model-execution.md` before choosing an external route. If the current host can dispatch the exact selected model with the required effort, isolation, and receipt policy in a native subagent or task thread, use that route. `agents/openai.yaml` is host UI metadata; it does not dispatch a native model.

## Routing limit

OpenCode has no runner envelope in this library. It cannot be an approved
implementation or review route because there is no `model_receipt` for the
launcher to validate. Use it only for a manually approved comparison. Report
the requested provider and model as configuration, not as proof of the model
that served the run.

## Safety Model

OpenCode can read project files and send prompt context to the configured model provider. Treat every run as an external model call.

Before running OpenCode:

1. Confirm the user asked for OpenCode or that the active workflow explicitly selected it.
2. Confirm the working directory and prompt scope.
3. Prefer read only review or planning prompts.
4. Avoid attaching secrets, credentials, private keys, tokens, or unrelated files.
5. Use the host agent's normal shell approval, sandbox, and logging flow for the command.

If the user asks for unattended editing, explain that this skill does not provide an unattended wrapper. Use a normal host approved command instead.

## Manual Invocation Pattern

After the checklist above passes, run the local OpenCode CLI directly from the target repository. Keep the command narrow and pass a concise prompt. Capture stdout and stderr in the normal host tool output.

```bash
opencode run "<concise prompt>"
opencode run -m <provider/model> "<concise prompt>"
opencode run --agent plan "<concise review prompt>"
```

For review tasks, ask OpenCode for analysis only; the `plan` agent variant above keeps the run read only. For implementation tasks, ask OpenCode for a patch plan first, then apply changes through the primary host agent.

## Output Contract

Return a short summary with:

1. OpenCode command scope
2. Main result
3. Files or areas discussed
4. Any uncertainty, failure, or missing prerequisite

When acting as a seat in a cross-runner workflow (for example models-consensus or council), return this same summary to the orchestrating skill verbatim.

## Missing Prerequisite

If OpenCode is not installed or authenticated, report the missing prerequisite and stop. Do not provide install commands from this skill.

