Skip to content

[OpenCode] skill tool returns "Available skills: none" — config hook silently ignored by OpenCode plugin API #1087

@NicoGenti

Description

@NicoGenti
  • I searched existing issues and this is not a duplicate

Environment

Field Value
Superpowers version 5.0.6
Harness (Claude Code, Cursor, etc.) OpenCode
Harness version 1.4.0 (@opencode-ai/plugin), internal build 21
Model claude-sonnet-4.6 (via github-copilot provider)
OS + shell Windows 11, PowerShell

Is this a Superpowers issue or a platform issue?

  • I confirmed this issue does not occur without Superpowers installed

Note: This is a platform-level incompatibility — the config hook returned by the superpowers plugin is not a registered hook in the current OpenCode plugin API, so it is silently ignored. The issue manifests through superpowers but the fix likely requires either updating the plugin or documenting the manual workaround. Related to #1068 (different root cause, same symptom on Windows).

What happened?

After installing superpowers via the recommended method in opencode.json:

{
  "plugin": ["superpowers@git+https://github.com/obra/superpowers.git"]
}
Running use skill tool to list skills returns:
Skill "list" not found. Available skills: none
The bootstrap system prompt (injected via experimental.chat.system.transform) works correctly — the agent is aware of superpowers. Only skill discovery is broken.
Steps to reproduce
1. Add superpowers to global ~/.config/opencode/opencode.json via the plugin array (official method)
2. Restart OpenCode
3. Run: use skill tool to list skills
4. Observe: Available skills: none
Expected behavior
OpenCode's skill tool lists all 14 superpowers skills (tdd, systematic-debugging, writing-plans, etc.), as documented in README.opencode.md and INSTALL.md.
Actual behavior
The skill tool returns Available skills: none. The plugin loads (bootstrap works), but the skills/ directory is never registered.
Debug log or conversation transcript
Root cause identified via source inspection of OpenCode's plugin loader (packages/opencode/src/plugin/index.ts):
The plugin returns a config hook to register the skills path:
return {
  config: async (config) => {
    config.skills = config.skills || {};
    config.skills.paths = config.skills.paths || [];
    config.skills.paths.push(superpowersSkillsDir);
  },
  'experimental.chat.system.transform': async (_input, output) => { ... }
};
config is not a registered hook name in OpenCode's plugin API. The runtime iterates known hooks and silently skips unknown keys — no error, no warning. superpowersSkillsDir is never added to the live config.
Workaround (confirmed working): add skills.paths manually to opencode.json:
{
  "plugin": ["superpowers@git+https://github.com/obra/superpowers.git"],
  "skills": {
    "paths": ["C:\\Users\\<user>\\.cache\\opencode\\node_modules\\superpowers\\skills"]
  }
}
After restarting OpenCode, use skill tool to list skills correctly returns all 14 skills.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions