Repository navigation
Description
Description
Skill discovery from the external .claude / .agents directories silently finds nothing in v1.18.15. Both legs implemented in discoverSkills are affected:
- global:
~/.claude/skills/**/SKILL.mdand~/.agents/skills/**/SKILL.md - project: the same targets found by walking up from the session directory
opencode's own directories (~/.config/opencode/skills/...) still work, so the failure is specific to the external branch. No error is surfaced — the skills are simply absent from /api/skill and from the skill tool.
This looks like a regression. #31977 (2026-06-12) shows external discovery working well enough to produce duplicate-name warnings from .claude/skills + .agents/skills; on v1.18.15 those same directories yield zero skills.
Steps to reproduce
Fully isolated, no dependency on my machine's config:
# fixture: an external skill in both a fake HOME and a project dir
rm -rf /tmp/ocrepro && mkdir -p /tmp/ocrepro/home/.agents/skills/probe-global \
/tmp/ocrepro/home/.config/opencode/skills/probe-control \
/tmp/ocrepro/proj/.agents/skills/probe-project
printf -- '---\nname: probe-global\ndescription: external global probe\n---\nbody\n' > /tmp/ocrepro/home/.agents/skills/probe-global/SKILL.md
printf -- '---\nname: probe-control\ndescription: opencode-dir control\n---\nbody\n' > /tmp/ocrepro/home/.config/opencode/skills/probe-control/SKILL.md
printf -- '---\nname: probe-project\ndescription: external project probe\n---\nbody\n'> /tmp/ocrepro/proj/.agents/skills/probe-project/SKILL.md
cd /tmp/ocrepro/proj
HOME=/tmp/ocrepro/home opencode serve --hostname=127.0.0.1 --port=47990 &
sleep 20
curl -s "http://127.0.0.1:47990/api/skill?directory=/tmp/ocrepro/proj" | jq -r '.data[].name'Expected
probe-global, probe-project and probe-control all listed.
Actual
Only probe-control (plus the built-in customize-opencode). Both external probes are missing.
What I ruled out
- Not the disable flags.
disableExternalSkills/disableClaudeCodeSkillsboth default tofalseinruntime-flags.ts. SettingOPENCODE_DISABLE_EXTERNAL_SKILLS=falseandOPENCODE_DISABLE_CLAUDE_CODE_SKILLS=falseexplicitly changes nothing. - Not the glob pattern or options. Running the exact call from
Glob.scanoutside opencode finds the fixtures:await glob("skills/**/SKILL.md", { cwd: "<home>/.agents", absolute: true, dot: true, follow: true, nodir: true }) // -> [ '<home>/.agents/skills/probe-global/SKILL.md' ]
- Not home resolution. Same result with
OPENCODE_TEST_HOMEpointed at the fixture instead ofHOME. - Not frontmatter. The control skill uses byte-identical frontmatter and is discovered.
- Not symlinks. The fixtures are real directories.
Since scan() swallows and logs errors when opts.scope is set (which is exactly the external branch, and only the external branch), a throw inside that scan would produce precisely this silent-empty behaviour — that seems the most likely place to look, though I could not confirm it from the logs.
Impact
This is the documented way to share one canonical skills directory across Claude Code / Codex / opencode, so those setups quietly lose every skill.
It is especially hard to work around inside T3 Code, which spawns opencode serve with OPENCODE_CONFIG_CONTENT={}. That discards the user's opencode.json, so the usual skills.paths escape hatch is unavailable there — the external directories are the only remaining mechanism, and they don't work.
Workaround: symlink each skill into ~/.config/opencode/skills/<name>, which is scanned by a different code path and works.
Environment
- opencode 1.18.15 (latest at time of filing; installed via the native installer)
- macOS 15 / darwin arm64
Activity
thesmart commentedon Aug 20, 2026
This is a blocking bug for me and I assume most users. Working WITHOUT project skills for a couple days now, not knowing that the LLM was working without loading the essential project skills.
itsmeares commentedon Aug 26, 2026
Can confirm this is a blocking bug for me aswell. I have 2 skills in my repo that are mandatory for agents to read before working but it doesn't work with OpenCode.
bshelby88 commentedon Sep 17, 2026
Reproducible path-discovery bugs are frustrating, especially when the failure is silent. A minimal fixture that covers the same directory layout (
~/.claude/skills/**/SKILL.md,~/.agents/skills/**/SKILL.md, plus the control under~/.config/opencode/skills/) with deterministic SKILL.md frontmatter could help isolate whether the regression is in directory walking or in frontmatter parsing.I operate SupraPack (a paid skill-search endpoint under Royal Agentic Enterprises) and can post such a fixture here — expected matches included — at no cost. Disclosure: I'm affiliated with SupraPack; the fixture is free regardless.
The OpenAPI is at https://suprapack-x402.fly.dev/openapi.json and the x402scan listing is https://www.x402scan.com/server/9ee0c371-883a-4b73-b051-b5c379eacb5d if useful context for the skill-index format.
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊