opencode

A way to delegate coding work to the OpenCode command-line tool, which runs in a terminal. It supports feature work, refactoring, pull-request reviews, and autonomous-style runs.

In plain words
What is it for?
Use it for feature development, refactoring, code review, repeated fixes, or checking whether the OpenCode CLI is installed.
Why use it?
It lets a separate coding agent carry out a bounded task in the project workspace. The instructions also distinguish one-off commands from longer interactive terminal sessions.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/deepelementlab/jupyter-studio/opencode
Any agent
npx skills add deepelementlab/jupyter-studio --skill opencode
Clone the repo
git clone --depth 1 https://github.com/deepelementlab/jupyter-studio

Made for: Claude Code, Codex.

Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,114 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00038 $0.01114
Opus 5 $0.00019 $0.00557
Sonnet 5 $0.00008 $0.00223
Haiku 4.5 $0.00004 $0.00111

Measured 2d ago against content hash 425dbf455f50, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

opencode scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

clawcode/clawcode/plugin/builtin_plugins/clawcode-skills/skills/opencode/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenCode CLI (clawcode)

Use OpenCode as an external coding agent when the user wants OpenCode specifically.

Do not confuse these entry points (they are not interchangeable):

Entry Role
/opencode-cli (TUI slash) One-shot probe or command via opencode_cli_bridge: merged stdout/stderr, not a PTY session and not multi-turn TUI control. Default args often --version.
bash One-shot shell in agent turns, e.g. opencode run '…'.
terminal + process (Agent tools) Multi-turn driving of a background shell/OpenCode TUI: terminal with background=true (and pty=true on POSIX with clawcode[terminal-pty]), then process for poll / submit / kill. Requires CLAWCODE_TERMINAL_ENV=local for full PTY on Linux/macOS; Windows host is limited—use WSL or Linux for interactive TUI automation.

Optional: pip install 'clawcode[terminal-pty]' for ptyprocess on POSIX.

When to use

  • User asks to use OpenCode or opencode.
  • You need a bounded task: prefer opencode run '...' via bash in the project workspace.
  • You only need to verify the CLI is installed: /opencode-cli (default opencode --version) after /claw; same terminal stack as /claude-cli (CLAWCODE_TERMINAL_ENV / TERMINAL_ENV).

Prerequisites

  • Install OpenCode (e.g. npm i -g opencode-ai@latest or vendor instructions).
  • Auth: opencode auth login or provider env vars (see OpenCode docs).
  • Check: opencode auth list should list at least one provider when run in the same environment as the agent.

clawcode-specific capabilities

Goal What to use
Quick probe (version, install check) /opencode-cli only—single run, not multi-turn. Same Claw gate as /claude-cli.
Run a command in agent turns bash: e.g. opencode run 'your task' with working_directory set to the repo root.
Docker/SSH terminal backend Same as bash: settings.shell.use_environments_backend and CLAWCODE_TERMINAL_*; ensure the image or remote has opencode on PATH.
Interactive OpenCode TUI (agent-driven) terminal (background=true, pty=true where supported) + process (poll / submit / …). Non-local backends: log-polled background only (no stdin). Optional check_interval on terminal schedules completion notifications in the TUI (see CLAW_SUPPORT_MAP.md).

Read the full file on GitHub · 84 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 84 lines · 38 tokens per session scan A 425dbf455f50

Subscribe to this mod's changes

opencode is a skill published in the GitHub repository deepelementlab/jupyter-studio (53 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 38 tokens to every session and 1,114 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories