Skip to content

Skill registered via v2 plugin is not discoverable via /skills command #33896

Description

@Chancemrli

Description

I am using the new v2 plugin API to register a custom skill via ctx.skill.transform(), but the skill is not showing up when searching with the /skills command.

Steps to Reproduce

  1. Create a v2 plugin at .opencode/plugins/skill-plugin.ts
  2. Use ctx.skill.transform() to register a skill with type: "embedded"
  3. Open the TUI and wait for the plugin to load
  4. Execute /skills command and search for my-skill

Code

File: MyProject/.opencode/plugins/skill-plugin.ts

import { define } from "@opencode-ai/plugin/v2/promise"

export default define({
  id: "my-skill-plugin",
  setup: async (ctx) => {
    console.error("[plugin v2]skill setup")
    const res = await ctx.skill.transform((draft) => {
      draft.source({
        type: "embedded",
        skill: {
          name: "my-skill",
          description: "Use when asked about conventions.",
          location: "/builtin/my-skill.md",
          content: "Always use kebab-case.",
        },
      })
    })
  }
})

Expected Behavior
The skill my-skill should appear in the /skill search results.

Actual Behavior
The plugin setup code is executed (confirmed by console output: [plugin v2]skill setup)
However, the skill my-skill cannot be found via the /skill command
Questions / Hypothesis
Is location: "/builtin/my-skill.md" required to be an actual existing file path?
Does the v2/promise API support skill registration the same way as the legacy API?
Is there a missing step (e.g., explicit activation or a different API) for v2 plugins?
Additional Context
I noticed the plugin itself loads successfully, but the skill registration seems to have no effect on the /skill search index. Any guidance on the correct v2 approach for registering discoverable skills would be appreciated.
Image

Image

Plugins

@opencode-ai/plugin/v2/promise

OpenCode version

1.17.10

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Metadata

Metadata

Assignees

Labels

2.0bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions