anomalyco / anomalyco/opencode
Global skills in ~/.config/opencode/skills/ and project .opencode/skills/ not discovered in Desktop 1.18.27 (only external ~/.agents skills load)
@jlongster is already working on this.
Since Sep 3, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
In OpenCode Desktop 1.18.27 (latest release, 2026-09-02) on Linux, custom skills placed in ~/.config/opencode/skills/<name>/SKILL.md (global) or .opencode/skills/<name>/SKILL.md (project) are not discovered. Only external skills from ~/.agents/skills/**/SKILL.md and the built-in customize-opencode are available to the model.
Verified facts:
SKILL.mdfiles are valid: frontmatter hasname+description, name matches directory name, filename is all-caps, unique names.- Desktop was fully restarted after creating the skills.
- Calling the
skilltool returns:Skill "<name>" not found. Available skills: capacity, customize, customize-opencode, deploy-model, microsoft-foundry, preset(exactly the~/.agentsexternal skills + built-in). - Server log on Desktop startup shows
init count=6, while CLIopencode run(v1.18.23) on the same machine logsinit count=12(all skills includingc-standards,python-standards,design-docs,doc-style,review-checklist,test-approach).
Related to #46781 and #45961 / #46298.
Analysis
In packages/opencode/src/skill/index.ts, discoverSkills() does:
- External scans (
~/.agents,~/.claude) pass ascopeoption toscan()— glob failures are logged and skipped gracefully. - Config-dir scans (
config.directories()— global~/.config/opencode, project.opencodedirs) callscan(state, dir, "{skill,skills}/**/SKILL.md")without scope. Any glob failure callsEffect.die(error), which kills the entire discovery pass. The external skills that were already added survive; config skills are silently lost.
PR #46298 ("don't crash skill discovery on unscoped scan errors") fixes exactly this path but was closed without being merged into dev (the last commit touching skill/index.ts in dev is 2026-06-30). The bug is still present in the v1.18.27 tag: if (!opts?.scope) return Effect.die(error).
The exact glob error is not visible in logs (nothing is logged before the crash), but the code path matches the symptom 1:1: external skills load first and survive, config skills never appear.
Steps to reproduce
- Create
~/.config/opencode/skills/demo/SKILL.mdwith valid frontmatter (name/description). - Start Desktop 1.18.27.
- Ask the model to load skill
demo— returnsSkill "demo" not found.
Workaround
Adding explicit paths to config bypasses the config-dir scan branch:
"skills": { "paths": ["~/.config/opencode/skills"] }
(requires Desktop restart; applied and pending verification).
Environment
- OpenCode Desktop 1.18.27 (latest, 2026-09-02)
- Linux (Debian trixie), x86_64
- CLI
opencode1.18.23 works correctly on the same machine
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.