patch-opencode

A procedure for making a small source-code fix in the exact release version of the OpenCode program currently running.

In plain words
What is it for?
It helps identify the live version, apply a minimal fix, build the matching release, replace the program safely, and test the affected behavior.
Why use it?
It avoids replacing a stable installation with code from the wrong version and requires a backup and checks before installation.

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/ezotoff/ez-omo-config/patch-opencode
Any agent
npx skills add EZotoff/ez-omo-config --skill patch-opencode
Clone the repo
git clone --depth 1 https://github.com/EZotoff/ez-omo-config

Made for: Claude Code, Codex.

Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,334 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.00053 $0.02334
Opus 5 $0.00026 $0.01167
Sonnet 5 $0.00011 $0.00467
Haiku 4.5 $0.00005 $0.00233

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

Security

Grade A, and why

patch-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.

skills/patch-opencode/SKILL.md · 231 lines

How it starts

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

Patch OpenCode Binary

This skill applies a minimal source fix to the live OpenCode binary. It builds from the exact release tag that matches the running version — never from dev or any other branch.

Pre-flight Checks

Before starting, gather the facts:

# 1. Identify the live version
LIVE_VERSION=$(~/.opencode/bin/opencode --version 2>&1)
echo "Live version: $LIVE_VERSION"

# 2. Identify the source repo
SOURCE_DIR="${OPENCODE_SOURCE:-$HOME/src/opencode}"
cd "$SOURCE_DIR"

# 3. Verify the release tag exists
git tag --list "v${LIVE_VERSION}"
# Expected: v1.17.9 (or whatever the live version is)
# If empty, the version tag doesn't exist — do NOT proceed with dev branch

# 4. Check for running servers
ps -ef | grep 'opencode serve' | grep -v grep

Critical Rules

  1. NEVER build from origin/dev or any branch other than the release tag
  2. NEVER replace the live binary with a build that reports a different version
  3. ALWAYS backup the live binary before replacing
  4. ALWAYS build with --single --skip-install --skip-embed-web-ui for speed
  5. ALWAYS verify the build version matches the live version before installing
  6. ALWAYS test the fix on the real surface after installing

Procedure

Step 1: Check out the release source

SOURCE_DIR="${OPENCODE_SOURCE:-$HOME/src/opencode}"
cd "$SOURCE_DIR"

LIVE_VERSION=$(~/.opencode/bin/opencode --version 2>&1)

# Fetch latest tags
git fetch --tags origin

# Verify the source tree is clean before checkout
if [ -n "$(git status --porcelain)" ]; then
  echo "FATAL: Source tree is dirty. Commit or stash before checking out the release tag."
  git status --porcelain
  exit 1
fi

# Create a fix branch from the EXACT release tag
git checkout "v${LIVE_VERSION}" -b "fix/${FIX_NAME}"

Guard: If v${LIVE_VERSION} tag doesn't exist, STOP. Do not proceed with any other branch. The version tag is the contract.

Warning: Tags like v0.1.17* are NOT the same as v1.17*. Verify the tag matches the live version output.

Read the full file on GitHub · 231 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 · 231 lines · 53 tokens per session scan A 70644f2f513a

Subscribe to this mod's changes

patch-opencode is a skill published in the GitHub repository EZotoff/ez-omo-config (5 stars, last pushed 1mo ago), licensed MIT. It adds 53 tokens to every session and 2,334 once invoked, about $0.0003 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-31.