opencode-config

opencode-config is a skill for Claude Code, Codex from znlgis/my-opencode-deepseek-config. It costs 76 tokens per session (1,195 once invoked), scanned C, original, MIT.

A local guide for editing OpenCode configuration, including its main config file, agents, skills, commands, permissions, and model routing. OpenCode is a tool for configuring coding agents and their workflows.

In plain words
What is it for?
It helps add or modify agents, skills, commands, permissions, references, and other OpenCode settings.
Why use it?
It records this repository’s required file locations, allowed models, naming conventions, and configuration shapes so changes match local rules.

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/znlgis/my-opencode-deepseek-config/opencode-config
Any agent
npx skills add znlgis/my-opencode-deepseek-config --skill opencode-config
Clone the repo
git clone --depth 1 https://github.com/znlgis/my-opencode-deepseek-config

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-config

README.md
[![agentmods](https://agentmods.dev/badge/skills/znlgis/my-opencode-deepseek-config/opencode-config.svg)](https://agentmods.dev/skills/znlgis/my-opencode-deepseek-config/opencode-config)
Your own site
<a href="https://agentmods.dev/skills/znlgis/my-opencode-deepseek-config/opencode-config"><img src="https://agentmods.dev/badge/skills/znlgis/my-opencode-deepseek-config/opencode-config.svg" alt="Measured on agentmods" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,195 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00076 $0.01195
Opus 5 $0.00038 $0.00598
Sonnet 5 $0.00015 $0.00239
Haiku 4.5 $0.00008 $0.00120

Measured today against content hash fed94c1a750d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

opencode-config scanned grade C with 1 finding 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 today.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Default-allow, deny the dangerous: `deny` `.env*` reads (except `.env.example`); `ask` on destructive bash (`rm -rf`, `git push -f`, `git reset --hard`, PowerShell/cmd equivalents) and `external_directory`. Cover shell
opencode/skills/opencode-config/SKILL.md · 72 lines

How it starts

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

OpenCode Config Authoring

For generic opencode config shapes, see the built-in customize-opencode skill; this file only covers this repository's local conventions.

Repository layout

Path Role
opencode.jsonc Global config: model, permissions, plugins, agents, commands, compaction
AGENTS.md Global rules auto-loaded into every agent's context
agents/<name>.md One custom agent per file (frontmatter + system prompt)
skills/<name>/SKILL.md On-demand skills, auto-discovered from the config dir

Hard constraints

  • Only deepseek/deepseek-v4-pro, deepseek/deepseek-v4-flash, and the multimodal deepseek/deepseek-v4-flash-vision-exp. Never a fourth model; vision-exp is for visual input only, never a default.
  • Use the singular keys (plugin, snapshot), not the fork's plural (plugins, snapshots).

Config key shapes (authoritative)

  • references — alias → {"repository" | "path", "branch"?, "description"?}. repository takes a Git URL / host-path / owner/repo (+ branch to pin a ref); path takes relative / absolute / ~/; description tells agents when to use it. String shorthand ("alias": "../docs") allowed.
  • skills.paths — extra skill dirs: "skills": { "paths": ["../shared-skills"] }; supports ~/ and relative paths; skills.urls pulls remote skills.
  • agent (inline) — override built-ins or define agents inline in opencode.jsonc: "agent": { "build": { "model": "…", "mode": "subagent" } }. Inline keys override file-based agents/<name>.md.
  • compaction{ "auto": bool, "prune": bool, "reserved": number } (defaults: auto true, prune false). reserved is the token buffer kept to avoid overflow during compaction.
  • Environment escape hatchesOPENCODE_CONFIG_DIR points at a custom config dir (searched like .opencode, loaded after it so it overrides); OPENCODE_CONFIG points at a single custom config file (loaded between global and project).

Agent frontmatter (agents/<name>.md)

Key Convention
name kebab-case, matches filename
description When to use this agent (drives routing + @-menu)
mode primary | subagent
model deepseek/deepseek-v4-pro | deepseek/deepseek-v4-flash | deepseek/deepseek-v4-flash-vision-exp (visual only)
steps step budget; heavier agents get more
color "#RRGGBB"
hidden optional: hide from @-menu
permission optional tool locks; read-only agents (oracle, reviewer, explore, librarian) must set edit: deny + read-only bash whitelist

Read the full file on GitHub · 72 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. today Changed fed94c1a750d
  2. 4d ago First seen · 72 lines · 76 tokens per session scan C 9883e79b060a

Subscribe to this mod's changes

opencode-config is a skill published in the GitHub repository znlgis/my-opencode-deepseek-config (57 stars, last pushed today), licensed MIT. It adds 76 tokens to every session and 1,195 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.