Harness Notes

Skill discovery

Updated 2026-11-25,

On this page

Where each harness finds skills and what the model is told about them before one is used. Exact directories for every scope are on the Locations page.

QuestionOpenCodechecked at 2.0.29
Where it looks for skills

OpenCode reads ~/.config/opencode/skills, ~/.claude/skills, ~/.agents/skills, and the project's .opencode/skills, .claude/skills and .agents/skills at every ancestor directory. Each folder can hold <id>/SKILL.md at any depth or flat <id>.md files at its top level. Add more local folders or HTTP catalogs with the skills array in opencode.json. Plugins can register skills too.

The docs say the project walk stops at the project root, but 2.0.28 keeps going up to the filesystem root.

There is no switch to turn off the .claude or .agents folders. The 1.x OPENCODE_DISABLE_*_SKILLS variables are gone.

Nested folders and scan limits

Partly

The built-in config skill scanner in v2.1.1 discovers nested SKILL.md files through directory depth 6 (root = 0), accepts loose .md files only at the root, skips hidden and ignored directories, and stops descending when a directory contains SKILL.md. It stats symlinks to classify files/directories. These bounds apply to this filesystem scanner, not arbitrary plugin-provided skills.

OpenCode 1.x scan rules don't carry over to 2.x.

At v2.1.1 the built-in config skill scanner starts at depth 0 and descends through depth 6, skips hidden/ignored directories, and stops below a directory containing SKILL.md. This is the built-in filesystem source, not a bound on every plugin-provided skill.

Stop scanning below a folder containing SKILL.md?

Not documented

Yes for the built-in config filesystem scanner in v2.1.1: once SKILL.md is found in a directory, it records that file and does not descend beneath that directory. Other plugin-provided skill sources are separate.

Whether the scan continues below a folder that is already a skill is unknown.

What the model sees before using one

At each model step, OpenCode adds an <available_skills> instruction block listing each skill's id, display name and description, sorted by ID. Paths and bodies are not included. Skills with no description, with opencode/autoinvoke: false or disable-model-invocation: true, or denied by a skill permission rule are left out. No size budget is applied.

Many skills or long descriptions

Nothing is truncated or dropped. All eligible skills are listed with their full descriptions, and V2 enforces no limit on ID length or description length. When the set changes during a session, only additions and removals are sent, and the full list is resent whenever a skill's name or description changes.

Two skills with the same name

Skills are keyed by an ID taken from the path (the folder name for SKILL.md, the file name for flat .md), not by frontmatter name. The source registered later wins: built-ins, then .claude/skills, then .agents/skills (each global first, then farthest ancestor to nearest), then ~/.config/opencode/skills, then project .opencode/skills, then skills config entries. No warning is shown.

Inside one folder, foo/SKILL.md replaces foo.md because files are processed in sorted order.

Two skills can share a display name if their IDs differ.

New or edited skills mid-session

Yes. Skill folders are watched, and about 100 ms after an edit settles the skills are rescanned. Config changes also trigger a rescan. On the next model step, the model is told about added or removed skills, or gets a fresh list if a name or description changed. No restart is needed.

v2.1.1 serializes config-skill refreshes, deduplicates directory/file watches and debounces changes by 100 ms before reloading.

Disable or hide a skill

Partly

Set metadata: { opencode/autoinvoke: false } or disable-model-invocation: true to keep a skill out of the model's list; if both are set, opencode/autoinvoke wins. A permissions rule { "action": "skill", "resource": "<id>", "effect": "deny" } hides the skill and blocks the skill tool, globally or under agents.<id>.permissions. None of these stop you from loading it with @id.

Notes and sources

OpenCode, 9 sources
Where it looks for skills, 4
Nested folders and scan limits, 5
Stop scanning below a folder containing SKILL.md?, 5
What the model sees before using one, 2
Many skills or long descriptions, 2
Two skills with the same name, 4
New or edited skills mid-session, 4
Disable or hide a skill, 2