# OpenCode Skills: Where They Live and How Agents Load Them

> Canonical: https://skillalmanac.com/learn/opencode-skills-explained | Updated: 2026-11-25 | Index status: index-eligible

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.

## Facts

- 2026-11-25: OpenCode discovers global skills in ~/.config/opencode/skills, ~/.claude/skills and ~/.agents/skills, and project skills in .opencode/skills, .claude/skills and .agents/skills (https://opencode.ai/docs/skills)
- 2026-11-25: OpenCode derives a case-sensitive skill ID from the path; search skips hidden paths and node_modules and stops six directories below a source root (https://opencode.ai/docs/skills)
- 2026-11-25: Skills without descriptions are not advertised; opencode/autoinvoke:false or disable-model-invocation:true also hides them from the model list, with the OpenCode field taking precedence (https://opencode.ai/docs/skills)
- 2026-11-25: Later-registered definitions override earlier skills with the same ID; explicit configured sources have the highest documented precedence (https://opencode.ai/docs/skills)
- 2026-11-25: OpenCode V2 accepts optional portable fields but does not enforce the Agent Skills naming, folder-match or description-length constraints at runtime (https://opencode.ai/docs/skills)
- 2026-11-25: OpenCode custom commands use .md files under project or global commands directories; command shell blocks execute outside the agent tool-permission flow and must not contain untrusted arguments (https://opencode.ai/docs/commands)

## 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`.

| Field | What it does |
|---|---|
| `name` | Display name. Defaults to the path-derived ID. |
| `description` | The summary the model sees. No description means the skill is not advertised. |
| `metadata.opencode/autoinvoke` | `false` hides the skill from the model's list. |
| `disable-model-invocation` | `true` 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

| Scope | Locations |
|---|---|
| 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.
   ```

3. Start OpenCode in the repository.
4. Ask for a release in plain words, or type `@git-release` to load it yourself.
5. 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](/learn/check-a-claude-skill-from-github-before-installing)).

## Skills versus custom commands

| | Skill | Custom command |
|---|---|---|
| Lives in | `skills/` folders | `.opencode/commands/` or `~/.config/opencode/commands/` |
| Who triggers it | The model, from the advertised list (or you with `@id`) | You, by typing `/name` |
| Content | Instructions plus supporting files | A prompt template |
| Arguments | None | `$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](/learn/claude-code-slash-commands-guide).

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

| Skill | Platform Score and state | Efficacy evidence | Recorded recognition probe | Tutorial video |
|---|---|---|---|---|
| [skill-authoring-and-evals](/skills/skill-almanac/skill-authoring-and-evals) | 62, rated | LIFT_UNCONFIRMED (measured, 2026-11-22): +14.3 points, 95% CI includes zero on 5 tasks | Claude Code 2.1.330, 2026-11-23 | yes |
| [skill-safety-audit](/skills/skill-almanac/skill-safety-audit) | 57, provisional | LIFT (single-run, 2026-11-21) | Claude Code 2.1.330, 2026-11-23 | yes |
| [agent-instruction-files](/skills/skill-almanac/agent-instruction-files) | 46, provisional | No verdict recorded | Claude Code 2.1.330, 2026-11-23 | yes |

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](/methodology/platform-score).

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

- [Cursor Agent Skills Explained: How Skills Load vs Rules](/learn/cursor-agent-skills-explained) for the same skill format in Cursor.
- [Codex Skills Explained: Locations and AGENTS.md Differences](/learn/codex-skills-explained) for Codex's paths.
- [CLAUDE.md vs AGENTS.md: Which Agents Read Which File](/learn/agents-md-vs-claude-md) for instruction files that sit beside skills.
- [npx skills: What the CLI Installs and How to Remove It](/learn/npx-skills-cli-guide) to install shared skills.
- Browse [Agent workflow skills](/topics/agent-workflow).

## Related skills

- [skill-authoring-and-evals](https://skillalmanac.com/skills/skill-almanac/skill-authoring-and-evals.md): Platform Score 62/100
- [skill-safety-audit](https://skillalmanac.com/skills/skill-almanac/skill-safety-audit.md): Platform Score 57/100 (provisional)
- [agent-instruction-files](https://skillalmanac.com/skills/skill-almanac/agent-instruction-files.md): Platform Score 46/100 (provisional)

## Related guides

- [Cursor Agent Skills Explained: How Skills Load vs Rules](https://skillalmanac.com/learn/cursor-agent-skills-explained.md)
- [Codex Skills Explained: Locations and AGENTS.md Differences](https://skillalmanac.com/learn/codex-skills-explained.md)
- [CLAUDE.md vs AGENTS.md: Which Agents Read Which File](https://skillalmanac.com/learn/agents-md-vs-claude-md.md)
- [npx skills: What the CLI Installs and How to Remove It](https://skillalmanac.com/learn/npx-skills-cli-guide.md)
- [What are Claude skills? Definition, SKILL.md format and where they work](https://skillalmanac.com/learn/what-are-claude-skills.md)
- [Agent Skills vs Tools: Instructions or Callable Actions](https://skillalmanac.com/learn/agent-skills-vs-tools.md)

## Sources

- https://opencode.ai/docs/skills
- https://opencode.ai/docs/commands
- https://opencode.ai/docs/
- https://github.com/anomalyco/opencode
- https://agentskills.io/specification

Platform Scores report our assessment under a published method. They are not a safety guarantee.
