Install the skill where opencode actually looks
Closes part of #617.
skillLocations offered OpenCode targets at skill/, singular. opencode reads skills/, plural — it has never read either path we wrote.
{Name: "OpenCode (Global)", Path: "~/.config/opencode/skill/basecamp/SKILL.md"},
{Name: "OpenCode (Project)", Path: ".opencode/skill/basecamp/SKILL.md"},
Why this failed silently, twice
That list is both the wizard's install targets and the refresh set, so one typo broke two things:
- The wizard. Picking "OpenCode (Global)" in
basecamp skillwrote a file opencode would never load, then reported success. - The refresh loop.
refreshAllInstalledSkillsonly visits paths in this list and skips ones that don't exist. An opencode user who put the skill at the plural path by hand never got it refreshed on upgrade.
Verification
Real binaries, temp HOME, stale SKILL.md pre-placed at ~/.config/opencode/skills/basecamp/:
| Build | That file after a run |
|---|---|
origin/main | still reads STALE |
| this branch | byte-identical to the embedded skill |
~/.agents/skills/basecamp/SKILL.md is refreshed by both, which is the next point.
The skill already worked in opencode
opencode also searches ~/.agents/skills/<name>/SKILL.md — the canonical target installSkillFiles has always written. So this fixes the wizard and the refresh loop, not first-run coverage. Nobody was unable to use the skill in opencode; some people were told they'd installed it somewhere it wasn't.
About the test
The existing refresh test built its opencode path from the same wrong spelling the code used, so it asserted the bug was working. The new TestSkillLocationsMatchAgentSearchPaths pins the literals instead of deriving them, so a test can't mirror the typo again.
Not in this PR
#617 also raises opencode plugin parity with what Codex got in #550 — hooks, not just a skill. opencode plugins are JS/TS modules in .opencode/plugins/ or npm packages named in opencode.json: a different mechanism from both existing manifests, and a new artifact for this repo to build, version-stamp and ship. That wants a decision before it wants code, so it stays out of here. The path fix may well be all #617 actually needs.
Frontmatter needs no change — opencode wants name + description with name matching the directory, which skills/basecamp/SKILL.md already satisfies.
Search paths confirmed at https://opencode.ai/docs/skills/. bin/ci green.
Summary by cubic
Fixes the OpenCode skill install and refresh paths to use skills/ so OpenCode actually loads the file; the wizard and refresh loop now work as expected. Part of #617.
- Bug Fixes
- Update
skillLocationsfor OpenCode (Global/Project) fromskill/toskills/. - Add
TestSkillLocationsMatchAgentSearchPathsto pin literal paths. - Update the refresh test to use the plural OpenCode path.
- Update