anomalyco / anomalyco/opencode
v2: compatibility skill sources ~/.agents/skills not loaded (regression vs v1)
@kitlangton is already working on this.
Since Aug 21, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Summary
V2 (opencode2) does not load skills from the compatibility source ~/.agents/skills, while V1 does. opencode debug skill shows agy -> ~/.agents/skills/agy/SKILL.md, but opencode2 /api/skill (and filesystem watchers) only show built-ins + ~/.config/opencode/skills. V2 docs list ~/.agents/skills as a global compatibility source, so this is a regression / missing parity.
Environment
- opencode version: 1.18.18 (brew, stable) — loads
~/.agents/skills/agycorrectly - opencode2 version: 0.0.0-next-17403 (next channel,
~/.opencode/bin/opencode2) - OS: Darwin 25.6.0 (darwin arm64) —
Darwin UCB-PXWCWTM9N9 25.6.0 Darwin Kernel Version 25.6.0: Fri Jul 31 19:18:43 PDT 2026; root:xnu-12377.161.14~5/RELEASE_ARM64_T8112 arm64 - Terminal: ghostty 1.3.1 —
TERM=xterm-256color,TERM_PROGRAM=ghostty,COLORTERM=truecolor - Shell: /bin/zsh
- Install/channel: next (service:
~/.opencode/bin/opencode2 serve --servicepid 39922,update check: latest=0.0.0-beta-17728, auto-update skipped: installation method not found) - Active plugins:
~/.config/opencode/plugins/herdr-agent-state.js(fails to load in V2:Missing key at ["default"]—export const HerdrAgentStatePluginbut V2 expectsexport default)
Reproduction
- Have a skill at
~/.agents/skills/agy/SKILL.md:
with frontmatter:~/.agents/skills/agy/SKILL.md ~/.agents/skills/agy/scripts/agy-run.sh ~/.agents/skills/agy/references/*.mdname: agy description: >- Delegate a task to the Antigravity CLI (agy) in headless print mode... opencode debug skill(V1) -> showsagy -> /Users/java1127/.agents/skills/agy/SKILL.md(total 3: customize-opencode, agy, skill-creator)curl -u opencode:$PASS "http://127.0.0.1:49374/api/skill?directory=$HOME" -H "Accept: application/json" | jq(V2 service) ->["opencode","report","skill-creator"]— noagycurl -u ... "/api/config?directory=$HOME"->[{"type":"document","path":"~/.config/opencode/opencode.json"}, {"type":"directory","path":"~/.config/opencode"}, {"type":"directory","path":"~/.opencode"}]— notype:"agents"entry for~/.agents~/.local/share/opencode/log/opencode.logwatchers for V2 location~show subscriptions for~/.config/opencode/skill,~/.config/opencode/skills,~/.opencode/skill,~/.opencode/skillsonly — no~/.agents/skillswatcher (expected fromopencode.config.skillpluginf()mappingagentstype ->join(path,"skills")).
Consistently reproducible. Also tested OPENCODE_TEST_HOME=/tmp/fake/.agents/skills/hello/SKILL.md with opencode2 debug config — still no agents entry.
Expected Behavior
V2 should auto-discover skills from the compatibility sources documented at https://opencode.ai/v2/docs/skills:
| Scope | Sources |
| Global compatibility | ~/.claude/skills, ~/.agents/skills |
| Project compatibility | .claude/skills, .agents/skills |
Discovery section states project sources are searched upward and within each source *.md at root and **/SKILL.md at any depth are discovered. Precedence section lists ~/.agents/skills after .claude/skills.
~/.agents/skills/agy/SKILL.md should appear in V2 /api/skill and be watchable, matching V1 external auto-loaded behavior (packages/core/src/plugin/skill/customize-opencode.md external row + packages/core/src/skill/index.ts scan with CLAUDE_EXTERNAL_DIR=".claude", AGENTS_EXTERNAL_DIR=".agents", EXTERNAL_SKILL_PATTERN="skills/**/SKILL.md").
Actual Behavior
V2 next-17403 ignores ~/.agents/skills entirely. No error is logged at INFO level (file-skip would be DEBUG skill file skipped). The running binary (strings ~/.opencode/bin/opencode2) does contain the opencode.config.skill plugin with type==="agents" source construction (join(O,"skills") for agents/claude entries) and Config.discover creating type:"agents" entries from T.isDir(~/.agents), yet at runtime no agents entry or watcher materializes and no skill is registered.
Additional Context
- V1 docs (
opencode debug skillbuilt-incustomize-opencodeskill) explicitly listExternal skills (auto-loaded) | ~/.claude/skills/<name>/SKILL.md, ~/.agents/skills/<name>/SKILL.md. - V2 binary
Config.discover(extracted viastrings) includes:
andj=b_.make(join(A.home,".agents")), F=b_.make(join(A.home,".claude")), h_=[...new Set([...T.isDir(j)?[j]:[], ...c.filter(basename===".agents")])].map(i=>new f9({type:"agents",path:b_.make(i)}))ConfigSkillPluginf()does:
So the running service should createh=entries.flatMap(O=>O.type==="claude"?[O.path]:[]), $=entries.flatMap(O=>O.type==="agents"?[O.path]:[]), for(O of[...h,...$]) k(DirectorySource({path:join(O,"skills")}))~/.agents/skillssource — but watchers prove it doesn't. - Workaround: add explicit
skillsconfig (V2 native array form afterA1.normalize:T.skills=[...paths,...urls]):
This bypasses the missing compatibility source.// ~/.config/opencode/opencode.json { "$schema":"https://opencode.ai/config.json", "skills":["~/.agents/skills"] } - Related: second
Location services bootedfor~/Library/CloudStorage/.../GC_voxelshows the service hosts multiple locations; both locations lack the agents source. - Herdr plugin load failure in V2 is unrelated but noted for completeness.
- No
OPENCODE_DISABLE_EXTERNAL_SKILLS/OPENCODE_DISABLE_CLAUDE_CODE_SKILLSset (checkedenv | grep OPENCODE). update check: current=0.0.0-next-17403 latest=0.0.0-beta-17728— not yet on the newer beta where the fix may exist.
Config for reference:
// ~/.config/opencode/opencode.json
{ "$schema":"https://opencode.ai/config.json" }
~/.agents/skills/agy was verified isDir true and contains a valid SKILL.md that V1 parses.
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.