OpenCode Skills: Where They Live and How Agents Load Them

Where OpenCode discovers skills, how IDs, loading, permissions, precedence and HTTP catalogs work, and how skills differ from custom commands. Checked against OpenCode docs on 2026-11-25.

Updated · Markdown version

Short answer

Last checked 2026-11-25: OpenCode documentation says a skill is a SKILL.md file in a skill directory or a root-level *.md file in a skills source. OpenCode searches .opencode/skills, .claude/skills and .agents/skills for projects, and ~/.config/opencode/skills, ~/.claude/skills and ~/.agents/skills globally. The model sees each skill's ID, name and description, and loads the body by calling the skill tool. You can also load one yourself by typing @skill-id. Skills are not custom commands: a command is a prompt template normally invoked with /name, while a permitted skill may be selected by the model or loaded explicitly by mentioning @skill-id.

Which OpenCode this applies to

OpenCode's current docs show a V2 line. The install page lists curl -fsSL https://opencode.ai/v2/install | bash, npm install -g @opencode/cli and brew install anomalyco/tap/opencode-v2, and the repository README calls the opencode-v2 Homebrew formula "recommended, always up to date" while the official opencode formula is "updated less". The skills page carries V2 notes: V2 does not enforce the portable ID pattern, the 1 to 64 character limit, a match between name and the folder name, or a maximum description length, and it accepts license and compatibility without interpreting them. I did not install OpenCode for this guide, so nothing below was run; every path and rule comes from the documentation. If you run an older OpenCode, check which version you have before trusting any V2-only detail.

What a skill is

Per the docs, a skill is a Markdown file with optional YAML frontmatter, and all frontmatter is optional at runtime. The directory form is recommended because it gives supporting files a private base directory, so relative paths inside the skill resolve from the folder that holds SKILL.md.

FieldWhat it does
nameDisplay name. Defaults to the path-derived ID.
descriptionThe summary the model sees. No description means the skill is not advertised.
metadata.opencode/autoinvokefalse hides the skill from the model's list.
disable-model-invocationtrue has the same effect. If both are set, opencode/autoinvoke wins.

Hiding only removes the skill from the model's list. It stays registered and can still be loaded by ID. The open Agent Skills specification (agentskills.io) is stricter than OpenCode: it requires name and description, caps the name at 64 characters of lowercase letters, numbers and hyphens that match the folder, and caps the description at 1,024 characters. Writing to the stricter rule keeps the skill portable to other tools.

Where OpenCode looks

ScopeLocations
Global~/.config/opencode/skills
Global compatibility~/.claude/skills, ~/.agents/skills
Project.opencode/skills
Project compatibility.claude/skills, .agents/skills

For project sources OpenCode searches from the current directory up to the project root. A source can hold root-level *.md files or nested folders containing a file named exactly SKILL.md. A folder with SKILL.md counts as one skill and OpenCode does not look inside it for more. Hidden directories and node_modules are skipped, and the search stops six directories below the source root.

You can add extra sources with a skills array in opencode.json or opencode.jsonc. Entries can be relative paths, ~/ paths, absolute paths, or http(s):// catalog URLs, and arrays from several config files are combined. A connected OpenCode Console workspace can share skills too.

Create a skill, step by step

  1. In your repository, create the folder: mkdir -p .opencode/skills/git-release
  2. Write .opencode/skills/git-release/SKILL.md:
---
description: Cut a release branch, update the changelog, and tag the commit. Use when asked to prepare or cut a release.
---

1. Inspect the working tree and stop if unrelated changes make the release unsafe.
2. Determine the previous tag, summarize candidate changes, and propose a version.
3. Wait for the user to approve the version and release scope before creating a branch, commit or tag.
4. After approval, prepare the changelog and release changes, then report the resulting branch, commit and tag for verification.
  1. Start OpenCode in the repository.
  2. Ask for a release in plain words, or type @git-release to load it yourself.
  3. Before allowing release mutations, confirm that the selected agent's permissions and repository state match your intended workflow.

What you should see, according to the docs: the ID is git-release, taken from the folder name. At each model step OpenCode lists permitted skills that have a description, showing only ID, name and description. When the model decides the skill fits, it calls the skill tool with {"id": "git-release"}. OpenCode then selects the current definition for that ID, checks the agent's skill permission, adds the Markdown body (without frontmatter) to the conversation, and passes the base directory plus a sample of up to ten supporting file paths. That file sample applies only to directory skills, and supporting files are read only when the skill's text tells the agent to.

For a portable name, use the pattern the docs give: ^[a-z0-9]+(-[a-z0-9]+)*$, 1 to 64 characters, matching the folder name.

IDs and precedence

The file path sets the ID, and the frontmatter name is only a label. skills/git-release.md and skills/git-release/SKILL.md both give git-release; skills/teams/release/SKILL.md gives release. IDs are case-sensitive.

When two skills share an ID, the source registered later wins. From lowest to highest priority:

  1. Built-in skills
  2. .claude/skills (global, then ancestors toward the current directory)
  3. .agents/skills (same ordering)
  4. ~/.config/opencode/skills
  5. Project .opencode/skills (from the project root toward the current directory)
  6. Explicit skills config entries, in config priority and array order

So a skill in .opencode/skills overrides a Claude Code skill with the same ID in .claude/skills. That is useful when you want an OpenCode-specific variant of a shared skill, and surprising when you did not mean to shadow anything.

Permissions

Skill rules use the skill action with the skill ID as the resource. Rules are evaluated in order and the last matching rule wins.

  • allow: advertised and loaded without approval.
  • ask: advertised, but OpenCode asks before loading.
  • deny: hidden from the model, and loading is rejected.

The docs give an example that allows all skills, denies IDs matching internal-* and asks for experimental-*. The same rules can sit under agents.<id>.permissions to scope them to one agent. A skill is Markdown added to the conversation, not a sandbox or enforcement boundary. Its own skill permission controls advertising and loading; later tool actions are governed by the selected agent's applicable permissions and mode. Whether OpenCode asks depends on the matching permission rules, including any existing allow or deny rule.

HTTP catalogs

A catalog is a base URL that serves an index.json listing skills, each with a name, a version and a files array. Files are fetched from <base-url>/<name>/<file>, paths must be safe, relative and same-origin, and each entry needs a SKILL.md or <name>.md entry file. Increase version whenever files change so OpenCode refreshes its cache. Treat a catalog URL like any other code source: you are loading instructions from a server you do not control, so read what it serves first (see Check a Claude Skill From GitHub Before Installing It).

Skills versus custom commands

SkillCustom command
Lives inskills/ folders.opencode/commands/ or ~/.config/opencode/commands/
Who triggers itThe model, from the advertised list (or you with @id)You, by typing /name
ContentInstructions plus supporting filesA prompt template
ArgumentsNone$ARGUMENTS, or $1, $2

Commands are .md files whose body is the prompt template, with optional frontmatter (description, agent, model, subagent). Subfolders become namespaces, so team/review.md runs as /team/review. The docs say the legacy singular command/ directory is still read, but new files should use commands/. A ! followed by backticks runs a shell command before the prompt is submitted; the docs warn that such blocks run outside the agent's tool permission flow, so never pass untrusted input into them. Use a command when you know when you want the text and only need a shortcut. Use a skill when the model should decide. For the same split in another tool, see Claude Code Slash Commands: Built-in vs Custom.

What goes wrong and how to fix it

The OpenCode docs give a troubleshooting order; the first four steps cover most cases.

  1. The model never loads the skill. Cause: no description, or a nested file not named exactly SKILL.md. Fix: add a description and rename the file.
  2. `@skill-id` does nothing. Cause: the ID is path-derived and case-sensitive, so the frontmatter name is not the key. Fix: use the folder name exactly, and rename the folder rather than the name field.
  3. A deep skill disappears. Cause: the search stops six directories below the source root. Fix: move the folder up or add its parent as an explicit skills source.
  4. The skill is hidden. Cause: opencode/autoinvoke: false, disable-model-invocation: true, or a deny rule on its ID. Fix: remove the flag or the rule; remember the last matching rule wins.
  5. A different version of the skill runs. Cause: a later source defines the same ID and overrides it. Fix: compare the precedence list above and rename or remove one copy.
  6. An HTTP catalog skill never updates. Cause: version did not change, so the cache stays. Fix: bump version, and check index.json and that every file path is same-origin.
  7. A Claude Code skill behaves differently. Cause: OpenCode reads .claude/skills for compatibility, but the docs do not say every Claude Code feature behaves the same. Fix: test after copying, and use only name and description where you need portability.

What our catalogue shows

No listed catalogue skill has a recorded OpenCode verification. The Claude Code records are recognition probes showing that a matching prompt selected the named skill; they do not prove end-to-end task completion in Claude Code or compatibility with OpenCode. Tutorial videos are instructional media, not efficacy evidence.

SkillPlatform Score and stateEfficacy evidenceRecorded recognition probeTutorial video
skill-authoring-and-evals62, ratedLIFT_UNCONFIRMED (measured, 2026-11-22): +14.3 points, 95% CI includes zero on 5 tasksClaude Code 2.1.330, 2026-11-23yes
skill-safety-audit57, provisionalLIFT (single-run, 2026-11-21)Claude Code 2.1.330, 2026-11-23yes
agent-instruction-files46, provisionalNo verdict recordedClaude Code 2.1.330, 2026-11-23yes

For skill-authoring-and-evals, the catalogue reports LIFT_UNCONFIRMED: the 95% interval includes zero, one of five tasks favored the baseline, and the executor and blind grader were AI models from one family with no human grader or third-party reproduction. The skill-safety-audit result is a separate three-task, single-run comparison and does not establish general safety. See the Platform Score methodology.

FAQ

What are OpenCode skills?

They are Markdown instruction files, usually SKILL.md inside a folder, that OpenCode advertises to the model by ID, name and description. The model loads the body only when it decides the skill fits.

Where do I put OpenCode skills?

Use .opencode/skills/<id>/SKILL.md in a project or ~/.config/opencode/skills/<id>/SKILL.md globally. OpenCode also reads the .claude and .agents equivalents.

Can OpenCode use Claude Code skills?

Yes for discovery: it reads ~/.claude/skills and .claude/skills. The docs do not promise identical behavior for every Claude Code field, so test the skill after you point OpenCode at it.

What is the difference between OpenCode commands and skills?

A command is a prompt template you run by typing /name. A skill is a folder the model can load by ID when its description matches the task.

How do I stop the model from using a skill?

Set disable-model-invocation: true or metadata.opencode/autoinvoke: false to hide it, or add a deny permission rule for its ID. Hiding keeps the skill loadable by ID; deny rejects loading.

Why does OpenCode say V2?

The install page and repository now show a V2 line with a /v2/ installer and an @opencode/cli npm package. The skills page marks which rules V2 relaxes. Check the version you run before relying on a V2-only note.

Next steps

Platform Score is our assessment under a published method. It is not a safety guarantee.

Next steps

  1. Cursor Agent Skills Explained: How Skills Load vs Rules Read next.
  2. Codex Skills Explained: Locations and AGENTS.md Differences Read next.
  3. All guides by topic Browse everything.

Sources