Description
Plugins that register skill directories via their config() hook are invisible to skill discovery. For example, the superpowers plugin adds its skills directory to config.skills.paths inside config(), but Skill.all() never finds them.
Expected Behavior
Skills registered by plugins via config.skills.paths mutation in the config() hook should appear in Skill.all() and be available to agents.
Actual Behavior
Skills registered by plugin config() hooks are not discovered. Only skills from static config (opencode.json) or standard directories (~/.config/opencode/skills/) are found.
Verified: setting skills.paths directly in opencode.json works (65 skills). Plugin config() hook mutation does not (51 skills).
Root Cause
Each service's makeRuntime creates a separate InstanceState scope backed by ScopedCache. When Plugin calls config.get() and a plugin's config() hook mutates cfg.skills.paths, that mutation only affects Plugin's scoped copy. When Skill independently calls config.get(), it gets a separate copy — the mutation is invisible.
Same class of bug as #20026 (plugin providers disappearing after instance dispose).
Steps to reproduce
- Install a plugin that registers skills via
config() hook (e.g. superpowers@git+https://github.com/obra/superpowers.git#v5.0.7)
- Start OpenCode
- List available skills — plugin-registered skills are missing
Plugins
superpowers@git+https://github.com/obra/superpowers.git#v5.0.7
OpenCode version
1.3.13
Operating System
Linux (Ubuntu)
Terminal
N/A
Description
Plugins that register skill directories via their
config()hook are invisible to skill discovery. For example, the superpowers plugin adds its skills directory toconfig.skills.pathsinsideconfig(), butSkill.all()never finds them.Expected Behavior
Skills registered by plugins via
config.skills.pathsmutation in theconfig()hook should appear inSkill.all()and be available to agents.Actual Behavior
Skills registered by plugin
config()hooks are not discovered. Only skills from static config (opencode.json) or standard directories (~/.config/opencode/skills/) are found.Verified: setting
skills.pathsdirectly inopencode.jsonworks (65 skills). Pluginconfig()hook mutation does not (51 skills).Root Cause
Each service's
makeRuntimecreates a separateInstanceStatescope backed byScopedCache. When Plugin callsconfig.get()and a plugin'sconfig()hook mutatescfg.skills.paths, that mutation only affects Plugin's scoped copy. When Skill independently callsconfig.get(), it gets a separate copy — the mutation is invisible.Same class of bug as #20026 (plugin providers disappearing after instance dispose).
Steps to reproduce
config()hook (e.g.superpowers@git+https://github.com/obra/superpowers.git#v5.0.7)Plugins
superpowers@git+https://github.com/obra/superpowers.git#v5.0.7
OpenCode version
1.3.13
Operating System
Linux (Ubuntu)
Terminal
N/A