Install the "opencode-runner" agent skill from https://github.com/luongnv89/skills/tree/main/skills/opencode-runner into .claude/skills/opencode-runner/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "opencode-runner", then confirm the skill loads.
Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Type this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
skills CLI
$ npx skills add luongnv89/skills --skill opencode-runner -a codex
Project install goes to .agents/skills/; add -g for ~/.codex/skills/.
Install the "opencode-runner" agent skill from https://github.com/luongnv89/skills/tree/main/skills/opencode-runner into .agents/skills/opencode-runner/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "opencode-runner", then confirm the skill loads.
Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add luongnv89/skills --skill opencode-runner -a cursor
Project install goes to .agents/skills/; add -g for ~/.cursor/skills/.
Install the "opencode-runner" agent skill from https://github.com/luongnv89/skills/tree/main/skills/opencode-runner into .cursor/skills/opencode-runner/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "opencode-runner", then confirm the skill loads.
Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
skills CLI
$ npx skills add luongnv89/skills --skill opencode-runner -a gemini-cli
Project install goes to .agents/skills/; add -g for ~/.gemini/skills/.
Install the "opencode-runner" agent skill from https://github.com/luongnv89/skills/tree/main/skills/opencode-runner into .gemini/skills/opencode-runner/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "opencode-runner", then confirm the skill loads.
Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Installs for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
skills CLI
$ npx skills add luongnv89/skills --skill opencode-runner -a github-copilot
Project install goes to .agents/skills/; add -g for ~/.copilot/skills/.
Install the "opencode-runner" agent skill from https://github.com/luongnv89/skills/tree/main/skills/opencode-runner into .github/skills/opencode-runner/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "opencode-runner", then confirm the skill loads.
GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add luongnv89/skills --skill opencode-runner -a opencode
OpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
Install the "opencode-runner" agent skill from https://github.com/luongnv89/skills/tree/main/skills/opencode-runner into .opencode/skills/opencode-runner/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "opencode-runner", then confirm the skill loads.
OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Facts
Skill name
opencode-runner
GitHub stars
131
Token cost
~4.5k tokens
SKILL.md length
2,325 words
Files
6 (incl. references)
Skills in repo
37
Repo updated
First seen
Licence
MIT
At a glance
Run coding tasks via opencode using free cloud models. An agent skill from luongnv89/skills.
Works in 6 steps: Verify Installation → Discover Free Models & Let User Pick → Confirm Before Executing → …
Asked to offload work to opencode.ai
SKILL.md covers Prerequisites, Critical Rules, Repo Sync Before Edits… and Phase 1: Verify Installation, plus 10 more sections
Calls opencode, git and npm
What it does
Opencode Runner is an agent skill from luongnv89/skills. Run coding tasks via opencode using free cloud models. Use when asked to offload work to opencode.ai or run a free model. Don't use for local models (Ollama, LM Studio), Claude/OpenAI calls, or when Claude should do the work itself.
Its SKILL.md is about 4.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `docs/README.md`, `evals/evals.json` and `references/edge-cases.md`).
It sits in AI & LLM Engineering, covering LLM inference and serving. It works with Ollama and OpenAI. The repository describes itself as: Supercharge your AI agents/bots with reusable skills. The licence is MIT.
When your agent uses it
Asked to offload work to opencode.ai
Run a free model
Local models (Ollama
Claude/OpenAI calls
Example prompts
“/opencode-runner”
Requirements
Node.js
Workflow steps
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 8f80262. It shows what the files ask for, not the result of running them.
Tool permissions
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Runs code
Shell commands in SKILL.md call:
opencode
git
npm
brew
From the folder's file list and the shell code blocks in SKILL.md.
Network
Links to these hosts (documentation or services it may open):
opencode.ai
From URLs in SKILL.md, links to its own repository left out.
Credentials
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Context cost
Opencode Runner loads about 4.5k tokens when it runs, and up to ~7.4k if it reads all its reference files. Until then it costs about 62 tokens; SKILL.md has 2,325 words of instructions outside code blocks.
Always· name and description, kept in context so the agent knows when to use it
~62
When it runs· the whole SKILL.md, loaded when a task matches
~4.5k
With references· SKILL.md plus every file in references/, read only if the agent opens them
~7.4k
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
Safety
Auto-check: notes
The automated check noted patterns worth knowing about, such as sudo or a known installer.
NotePipes a well-known installer script into a shellSKILL.md:67
> curl -fsSL https://opencode.ai/install | bash
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
Download SKILL.mdSave it as .claude/skills/opencode-runner/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
opencode-runner
description
Run coding tasks via opencode using free cloud models. Use when asked to offload work to opencode.ai or run a free model. Don't use for local models (Ollama, LM Studio), Claude/OpenAI calls, or when Claude should do the work itself.
license
MIT
effort
medium
metadata.version
1.6.0
metadata.author
Luong NGUYEN <luongnv89@gmail.com>
OpenCode Runner
Delegate coding tasks to opencode using free models — zero cost, fully automated.
OpenCode (opencode.ai) is a terminal AI coding assistant that supports multiple providers and models. This skill automates the process of selecting the best available free model, launching the task, and reporting progress back to you.
Prerequisites
opencode installed: which opencode must succeed; install via npm i -g opencode-ai@latest or brew install opencode if missing
Internet access: required for cloud model selection and task execution via OpenCode Zen
Project context: the current working directory should be the project root for file-context tasks
Critical Rules
Never do the task yourself. This skill exists solely to delegate work to opencode. If opencode is not installed, fails to run, or no free cloud model is available — report the problem to the user and stop. Do not fall back to editing files directly, writing code yourself, or using any other tool to accomplish the user's coding task. The whole point is that opencode does the work.
Only select cloud models. Never select local models (e.g., ollama/*, lmstudio/*, or any model running on localhost). Only select models from the opencode/* provider namespace, which are cloud-hosted on OpenCode Zen. Local models have unpredictable availability, performance, and may not support the tool-use capabilities opencode needs.
Always clean up after yourself. opencode spawns background processes (LSP servers, MCP servers, node workers) that persist after the task finishes. Every execution path — success, failure, error, timeout — must end with the cleanup steps in Phase 6. Orphaned opencode processes silently eat CPU and memory, and users won't notice until their machine slows to a crawl.
Repo Sync Before Edits (mandatory)
Before creating/updating/deleting files in an existing repository, sync the current branch with remote:
If origin is missing or conflicts occur, stop and ask the user before continuing.
Phase 1: Verify Installation
Check that opencode is installed and at the latest version.
Step 1: Check if installed
bash
which opencode && opencode --version
If opencode is not found, tell the user:
opencode is not installed. Install it with one of these commands:
bash
curl -fsSL https://opencode.ai/install | bash
or
bash
npm i -g opencode-ai@latest
or (macOS)
bash
brew install opencode
Then stop completely with BLOCKED — opencode is not installed (Final Report) — do not proceed to any other phase, do not attempt the task yourself, do not edit any files. Wait for the user to install opencode and re-invoke this skill.
Step 2: Check for updates
Run opencode upgrade. It upgrades to the latest version, or confirms the installed one is current.
If opencode upgrade exits non-zero, tell the user its error and suggest running opencode upgrade manually. Then continue to item 3.
Run opencode --version again.
If opencode --version exits non-zero, stop with BLOCKED — opencode does not start after the upgrade. Do not continue to Phase 2.
Phase 2: Discover Free Models & Let User Pick
Query the available models, present the free ones to the user, and let them choose. If the user doesn't choose, fall back to the priority order.
bash
opencode models 2>/dev/null
Free model priority list (default order if user defers)
Priority
Model ID
Notes
1
opencode/deepseek-v4-flash-free
Strong recent free coding model — preferred default
2
opencode/minimax-m2.5-free
MiniMax free tier — good general-purpose
3
opencode/nemotron-3-super-free
NVIDIA Nemotron free tier
4
opencode/big-pickle
Free fallback
5
opencode/gpt-5-nano
Small fallback; free only when opencode models prices it at $0
Model IDs evolve. A model is free-tier eligible when its ID is in the opencode/* namespace and one of these holds: the ID ends in -free, the ID is opencode/big-pickle, or the opencode models output prices it at $0. Match by suffix, not by exact ID. Without a $0 price in the output, leave opencode/gpt-5-nano out.
Selection logic
Run opencode models and collect all entries.
Filter out all non-opencode/* models — ignore anything from ollama/*, lmstudio/*, nvidia/*, or any other namespace. Only cloud-hosted opencode/* models qualify.
Among the remaining list, keep only the free-tier eligible models.
Present the free models to the user as numbered options, in priority order, with priority 1 marked as the default. Use the <options> format if possible. Example:
I found these free cloud models available via opencode. Pick one, or accept the default.
If the user names a model, use that one. If the user says "default", "you pick", "any", or doesn't specify, use priority 1 (the highest-priority available free model).
If no free-tier eligible model remains, stop with BLOCKED — no free cloud model available — do not fall back to local models, paid models, or doing the task yourself.
Privacy note (always show this with the model list): Free models on OpenCode Zen may use collected data for model improvement.
Phase 3: Confirm Before Executing
Before invoking opencode, show the user a one-screen summary and get explicit confirmation. This catches wrong-model or wrong-prompt mistakes before any tokens are burned.
Estimated duration: unknown — opencode is non-deterministic; cleanup runs even on timeout
Confirm to proceed, or tell me what to change (model, prompt, files).
Then offer the user two <options>: "Proceed" and "Change something". Wait for confirmation. Do not invoke opencode run until the user confirms.
If the user asks to change anything (different model, edit prompt, add/remove context files), loop back: update the field, re-show the summary, and ask again. If the user cancels instead, stop with BLOCKED — the user cancelled before the run.
Phase 4: Execute the Task
Run the coding task with the confirmed model. Always run in the background with output redirected to a log file — this is required for the low-token monitoring strategy in Phase 5.
Record the run= value this prints and substitute it literally in every later Phase 5 and Phase 6 shell. Each Bash call starts fresh, so rebind RUN to that recorded prefix before reading "$RUN.log", "$RUN.pid" or "$RUN.exit". The .pid file is the ownership record: it holds the id of the wrapper subshell, whose child is opencode run. The wrapper writes opencode's exit code to .exit when opencode finishes, because a later shell cannot wait on it.
Handling multi-line or complex prompts
For tasks that reference files or need detailed context, use the --file flag:
Foreground execution is discouraged — streaming the full opencode output back into your context wastes tokens. The Phase 5 monitor reads only the log tail.
Phase 5: Monitor with Minimum Tokens
opencode output is verbose. Streaming the full log back into your context is expensive — a single long run can easily push past 10k tokens of stream chatter. Use the lightweight polling protocol below instead.
Polling protocol
Run one tiny status command per check. It returns at most ~200 bytes — enough to know status, elapsed time, and the latest activity line — without ingesting the whole log.
That single line is your full progress sample. Do not tail -n 50, do not cat "$RUN.log", do not stream stdout — those defeat the purpose.
Cadence (mandatory)
Wait 30 seconds before polls 1 and 2. Wait 60–120 seconds before each later poll.
Hard cap: 6 polls total per run. If poll 6 still shows status=running, ask the user whether to keep waiting or kill the process. Do not poll again until the user answers. If the user says keep waiting, allow up to 6 more polls under the same rules.
A run is stalled when bytes= is the same in two consecutive polls. A run has timed out when 5 minutes pass with no bytes= growth. On a stall or a timeout, ask the user whether to keep waiting or kill the process. Kill it only when the user approves, then follow On error, stall, or timeout.
What to report between polls
One short line per check, derived from the status() output:
Do not paste the raw log. Do not summarize what opencode is "thinking" — you can't tell from a tail line. Stick to: status, elapsed, byte growth, last line.
Show full SKILL.md (962 more words)Show less
On completion
When status=done:
Read the tail only, not the whole log: tail -n 40 "$RUN.log". That's the summary opencode prints at the end (files changed, tokens used, errors).
Classify the run. exit=0 is a success. Any other exit= value is a failure. exit=none means the wrapper was killed before opencode finished: treat it as a failure.
If the working directory is a git repository, run git status --porcelain to list the files that changed. This is a read only: never edit, stage, or revert those files.
Do not paste the full log. If the user asks to keep it, skip deleting "$RUN.log" in Phase 6 Step 3 and give its path in the final report.
If the task failed, suggest retrying with the next free model from the Phase 2 list.
Run Phase 6 cleanup — mandatory, even on success.
Print the final report (Final Report).
On error, stall, or timeout
Report the error or stall to the user (one line, derived from the last poll).
Suggest retrying with the next free cloud model.
If all free models have been tried, suggest the user run opencode auth list to check provider auth.
Never attempt the task yourself as a fallback.
Run Phase 6 cleanup — always.
Print the final report (Final Report).
Phase 6: Cleanup (mandatory)
Every execution — success, failure, error, or timeout — must end with cleanup. opencode spawns child processes (LSP servers, MCP servers, node workers) that persist after the main process exits. Without cleanup, these orphaned processes accumulate and drain system resources.
Step 1: Kill the opencode process tree
If you launched opencode in the background, use the pidfile for the recorded run prefix as the ownership record:
bash
RUN=/tmp/opencode-run-1234567890 # paste the run= value Phase 4 printed
pid=$(cat "$RUN.pid" 2>/dev/null)
if [ -n "$pid" ]; then
pkill -TERM -P "$pid" 2>/dev/null # opencode runs as a child of the wrapper subshell
kill "$pid" 2>/dev/null
sleep 2
pkill -KILL -P "$pid" 2>/dev/null
kill -9 "$pid" 2>/dev/null
fi
Step 2: Find and kill orphaned opencode processes
Run pgrep -fl "opencode run" to list lingering opencode run processes.
If it lists any process, run pkill -f "opencode run".
This pattern never matches the user's interactive TUI session (opencode without a subcommand). Leave that session alone.
If it prints cleanup=complete, report: Cleanup complete — no opencode run process remains.
If it prints cleanup=incomplete, warn: Warning: some opencode run processes are still running. Run pkill -f "opencode run" manually to clean up.
Final Report
After Phase 6, print one final report in concise text, in this order: Result: (COMPLETE, PARTIAL — <reason>, or BLOCKED — <reason>), Evidence: (only checks that ran), Uncertainty:, then Decision: (the approval needed, or No approval needed.). A stop before opencode run starts skips Phases 4–6 and prints the report directly. Status rules, examples and the reader checks: references/final-report.md.
Expected Output
See references/expected-output.md for the full set of example blocks the user should see at each phase (model picker, confirmation summary, low-token progress polls, cleanup confirmation). On error or timeout, the cleanup confirmation still runs. Final report examples: references/final-report.md.
Edge Cases
When an edge case fires, read references/edge-cases.md: opencode missing, a failed upgrade, no free model, every model failing, a stall or timeout, a rejected confirmation, an open TUI session, multi-line prompts, a non-zero exit, or a killed wrapper. It also holds the opencode command reference.
Acceptance Criteria
The skill run is considered successful when all of the following are verifiable:
Installation verified — Phase 1 confirms opencode is on PATH and reports its version before any other action.
Only cloud opencode/* models considered — Filter step rejects ollama/*, lmstudio/*, nvidia/*, and any other namespace. No local model is ever selected.
Free models presented to the user — Phase 2 lists every available free opencode/* model with priority 1 as default, plus the privacy note. The user may pick one; if they defer, priority 1 is used.
Confirmation captured before execution — Phase 3 shows model + cwd + context files + prompt, and waits for explicit user confirmation before invoking opencode run.
Task delegated to opencode — The coding task is executed via opencode run, not by the skill editing files directly or writing code itself.
Low-token monitoring used — Phase 5 polls via the single-line status() helper. The raw log is never streamed back; only the last line, byte count, and status are reported per poll. Max 6 polls per run.
Stall/timeout handled — No byte growth across two consecutive polls, or 5 minutes with no byte growth, triggers a confirmation with the user and (if approved) a kill + cleanup.
Completion summary delivered — On status=done, the skill reads only tail -n 40 "$RUN.log", classifies the run by its exit= value, and summarizes files changed and token usage.
Cleanup runs on every exit path — Phase 6 runs whether the task succeeded, failed, errored, stalled, or timed out, and Step 4 prints cleanup=complete before the report claims cleanup.
Temp files removed — "$RUN.log", "$RUN.pid" and "$RUN.exit" are deleted during cleanup, unless the user asked to keep the log.
No fallback to self — If opencode is unavailable, the user rejects the confirmation, or all free models fail, the skill stops. It never falls back to editing files or writing code itself.
Final report delivered — every run, stops included, ends with Result:, Evidence:, Uncertainty: and Decision:, and passes the four reader checks in references/final-report.md: the result is findable in the first line, facts are separated from assumptions, each claim traces to a check that ran, and the next decision is named. Human understanding stays unconfirmed until a user answers those checks.
Step Completion Reports
After each phase, emit a compact status block so pass/fail is scannable:
Use √ for pass, × for fail, and — to add brief context. Per-phase example blocks (Installation, Model Discovery, Confirmation, Execution, Monitor, Cleanup) are in references/expected-output.md.
Opencode Runner next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
The user wants to connect an LLM or vision provider, already has an API key, asks "can I use OpenAI/Anthropic/Gemini/OpenRouter", wants local Ollama, or needs different cheap and strong models.
Manage AI agent fleets in Herdr: tile root + sub-agents in one tab, start/prompt/wait/read/monitor via the herdr agent CLI, steer any pane; help lists every operation.
Run coding tasks via opencode using free cloud models. An agent skill from luongnv89/skills. Opencode Runner is an agent skill from luongnv89/skills. Run coding tasks via opencode using free cloud models.
When should I use Opencode Runner?
Opencode Runner fits situations like: asked to offload work to opencode.ai; run a free model; local models (Ollama; Claude/OpenAI calls.
How do I install Opencode Runner in Claude Code?
Run `npx skills add luongnv89/skills --skill opencode-runner -a claude-code`. Or copy the skill folder (skills/opencode-runner in luongnv89/skills) into .claude/skills/opencode-runner in your project. Claude Code loads it when a task matches its description.
How do I install Opencode Runner in Codex?
Run `npx skills add luongnv89/skills --skill opencode-runner -a codex`. Or copy the skill folder (skills/opencode-runner in luongnv89/skills) into .agents/skills/opencode-runner in your project. Codex loads it when a task matches its description.
Can I use Opencode Runner in Cursor, Gemini CLI or GitHub Copilot?
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add luongnv89/skills --skill opencode-runner -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/opencode-runner, .gemini/skills/opencode-runner, .github/skills/opencode-runner and .opencode/skills/opencode-runner in your project.
What does Opencode Runner need to run?
Going by SKILL.md and its folder, Opencode Runner needs the command-line tools its instructions call (opencode, git, npm and brew). Our summary lists: Node.js.
Does Opencode Runner access the network?
SKILL.md names 1 domain. As links in the text: opencode.ai. This is read from the text; nothing was executed.
Is Opencode Runner safe to install?
Our automated static check of SKILL.md found notes only (pipes a well-known installer script into a shell), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
What licence does Opencode Runner use?
Opencode Runner is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
How many tokens does Opencode Runner use?
About 4.5k tokens (SKILL.md is roughly 18k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.9k tokens, read only when the agent opens those files.
What are the alternatives to Opencode Runner?
Skills that share tags, products or a category with Opencode Runner: Aider Delegate (amElnagdy/delegate-skills, 2.3k stars), Perfup (raullenchai/Rapid-MLX, 3.9k stars), Ideer Daily Paper Chatbot (AI45Lab/iDeer, 416 stars) and Agent Framework (jihadkhawaja/Egroo, 178 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Who maintains Opencode Runner?
luongnv89 (a GitHub user) maintains it in luongnv89/skills, which has 131 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on October 7, 2026.
Source: luongnv89/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.