opencode

opencode is a skill for Claude Code, Codex from maystudios/claude-skills. It costs 174 tokens per session (5,018 once invoked), scanned A, original, MIT.

A workflow for running the OpenCode command-line tool as a coding sub-agent. OpenCode can use configured AI models to implement code, review it, debug problems, research, or provide another opinion.

In plain words
What is it for?
Use it to ask OpenCode to build or modify code, analyse a project in read-only planning mode, review changes, investigate bugs, or continue an existing session.
Why use it?
It provides a defined command and the required options for running OpenCode automatically from a project. This helps delegate coding work while keeping the task directory, model, agent type, and output format explicit.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions subagents; mentions Claude Code.

Good fit Use it to ask OpenCode to build or modify code, analyse a project in read-only planning mode, review changes, investigate bugs, or continue an existing session.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/maystudios/claude-skills/opencode
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.

Any agent
npx skills add maystudios/claude-skills --skill opencode
Clone the repo
git clone --depth 1 https://github.com/maystudios/claude-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for opencode

README.md
[![agentmods](https://agentmods.dev/badge/skills/maystudios/claude-skills/opencode/github.svg)](https://agentmods.dev/skills/maystudios/claude-skills/opencode)
Your own site
<a href="https://agentmods.dev/skills/maystudios/claude-skills/opencode"><img src="https://agentmods.dev/badge/skills/maystudios/claude-skills/opencode/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for opencode

Your own site · 80×15
<a href="https://agentmods.dev/skills/maystudios/claude-skills/opencode"><img src="https://agentmods.dev/badge/skills/maystudios/claude-skills/opencode.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 174 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,018 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 36
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.1 $0.00174 $0.05018
Opus 5.5 $0.00070 $0.02007
Sonnet 5.5 $0.00035 $0.01004
Haiku 4.5 $0.00017 $0.00502

Measured 1mo ago against content hash 0eb4f8a3cdfd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/parse_output.py, scripts/test_skill.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

opencode/SKILL.md · 521 lines

How it starts

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

OpenCode Sub-Agent Protocol

This is an executable protocol for delegating work to OpenCode agents. Follow it precisely.

Prerequisites

  • opencode CLI installed and in PATH (verify: opencode --version)
  • At least one provider authenticated (opencode providers list)
  • Available models listed via opencode models

Core Command

OPENCODE_DISABLE_AUTOUPDATE=true opencode run --format json --model <provider/model> --agent <build|plan> --dir "<working-dir>" --dangerously-skip-permissions [options] "<prompt>" 2>/dev/null

Key flags:

  • --format json -- machine-parseable ndjson output (always use this)
  • --model provider/model -- e.g., openai/gpt-5.4, openai/gpt-5.3-codex
  • --variant <level> -- reasoning effort: minimal, medium, high, xhigh (provider-specific)
  • --dir <path> -- working directory for the task
  • --dangerously-skip-permissions -- auto-approve tool calls (required for headless)
  • -f/--file <path> -- attach file(s) to the prompt
  • --agent <name> -- build for implementation (filesystem+bash), plan for analysis (read-only)
  • -c/--continue -- continue last session
  • -s/--session <id> -- continue specific session

Output Parsing

The --format json flag emits ndjson (one JSON object per line):

type Contains
text .part.text -- model's text response
tool_call .part.name, .part.input -- tool invocations
tool_result .part.output -- tool execution results
step_start Session/message IDs
step_finish .part.tokens (usage), .part.cost, .part.reason

Parse with the helper script (always redirect stderr):

opencode run --format json ... 2>/dev/null | python .claude/skills/opencode/scripts/parse_output.py [--mode text|full|tools|cost|session|diff|summary]

Parse modes:

  • text -- model's text response (default)
  • full -- text + tool calls + tool results
  • tools -- tool calls and results only
  • cost -- token usage and cost breakdown
  • session -- extract session ID for continuation
  • diff -- extract file modifications from tool calls
  • summary -- one-line summary (status, tokens, cost, duration)

Read the full file on GitHub · 521 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 521 lines · 174 tokens per session scan A 0eb4f8a3cdfd

Subscribe to this mod's changes

opencode is a skill published in the GitHub repository maystudios/claude-skills (25 stars, last pushed 2mo ago), licensed MIT. It adds 174 tokens to every session and 5,018 once invoked, about $0.0007 per session on Opus 5.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

timescaledb-hyperfunctions

Use this skill when writing analytical SQL over time-series data with the TimescaleDB Toolkit (timescaledbtoolkit extension) hyperfunctions: approximate percentiles, statistical summaries, time-weighted averages, counter/gauge rates, uptime/heartbeat tracking, state durations, OHLC candlesticks, approximate distinct…

timescale/pg-aiguide · 298 tokens

pgvector-semantic-search

Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search. Trigger when user asks to: Store or search vector embeddings in PostgreSQL Set up semantic search, similarity search, or nearest neighbor search Create HNSW or IVFFlat indexes for vectors…

timescale/pg-aiguide · 190 tokens

postgres

Use this skill for any PostgreSQL database work — table design, indexing, data types, constraints, extensions (pgvector, PostGIS, TimescaleDB), search, and migrations. Trigger when user asks to: Explore an existing PostgreSQL database to understand its objects and relationships Design or modify PostgreSQL tables…

timescale/pg-aiguide · 211 tokens

postcss-best-practices

PostCSS best practices and configuration guidelines for modern CSS processing and optimization.

Mindrally/skills · 20 tokens

autogen-development

Expert guidance for Microsoft AutoGen multi-agent framework development including agent creation, conversations, tool integration, and orchestration patterns.

Mindrally/skills · 28 tokens

cloudflare-development

Cloudflare Workers, Pages, KV, D1, R2, and Durable Objects development best practices for edge computing applications.

Mindrally/skills · 29 tokens