Repository navigation
Conversation
Plugin config() hooks (e.g. superpowers) may mutate config.skills.paths to register additional skill directories. Skill discovery must wait for plugins to initialize so those mutations are visible when discoverSkills() reads the config. Fixes anomalyco#20940 Closes anomalyco#28646
|
This PR has been open for 2 weeks with 0 reviews. It blocks all superpowers skills (brainstorming, writing plans, test-driven-development, etc.) from being loaded via the skill tool on OpenCode. The fix is only 3 lines and mergeable. Could we get this reviewed and merged? 🙏 |
|
Damn. Must be tough contributing a PR to a repo that has 965 PRs already. |
|
Still hitting this on Windows 11 specifically — the colon-to-underscore path conversion in the cache dir ( |
How I was able to solve it for myself is that I noticed that I had installed Superpowers in just one project instead of globally. |
|
Thanks for the tip! In my case superpowers is already installed globally — the issue is specifically the plugin |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #28646
Refs #20940
Type of change
What does this PR do?
Plugin
config()hooks (e.g. superpowers) may mutateconfig.skills.pathsto register additional skill directories. However, the Skill service runs its discovery independently during initialization, before plugin hooks have executed. By the time plugins mutate the config object,discoverSkills()has already cached its result and never re-readsconfig.skills.paths.This fix ensures that plugin config hooks run before skill discovery completes, by:
Plugin.Serviceas a dependency in the Skill layeryield* plugin.init()inside thediscoverSkillsInstanceState init, so plugins are loaded and their config hooks execute before the config is read for skill path discoveryThe change is minimal (9 lines added) and the ordering is safe because:
plugin.init()is idempotent (cached via ScopedCache)How did you verify your code works?
lsp_diagnosticsreports 0 errors on the changed file@/pluginresolves correctly via tsconfig paths (./src/*)plugin.init()are unaffected (it is already idempotent)Checklist