Feature Request: Plugin-bundled Skills Discovery #7270

Open
opened 2026-02-16 18:06:39 -05:00 by yindo · 1 comment
Owner

Originally created by @nghyane on GitHub (Jan 22, 2026).

Originally assigned to: @thdxr on GitHub.

Feature Request: Plugin-bundled Skills Discovery

Summary

Allow plugins to bundle skills that are automatically discovered when the plugin is loaded.

Problem

Currently, OpenCode's skill discovery scans:

  • .opencode/skills/ (project)
  • ~/.config/opencode/skills/ (global)

But plugins at ~/.config/opencode/plugins/<name>/ cannot bundle skills that are auto-discovered. This forces plugin authors to either:

  1. Ask users to manually copy skills to ~/.config/opencode/skills/
  2. Implement a custom skill tool within the plugin (duplicating native functionality)
  3. Deploy skills during plugin "install" (no standard mechanism)

Proposed Solution

Option A: Scan plugin directories for skills

Extend Skill.all() to also scan:

~/.config/opencode/plugins/*/skills/**/SKILL.md
~/.config/opencode/plugins/*/.opencode/skills/**/SKILL.md

Option B: Plugin hook for skill registration

Add a skills property to the Hooks interface:

interface Hooks {
  // ... existing
  skills?: Record<string, SkillDefinition>;
}

// Plugin usage
export default async function plugin() {
  return {
    tool: { ... },
    skills: {
      "my-skill": {
        name: "my-skill",
        description: "...",
        content: "# Instructions..."
      }
    }
  };
}

Option C: PluginInput includes skill registration

export default async function plugin({ registerSkill }: PluginInput) {
  registerSkill({
    name: "my-skill",
    description: "...",
    content: "..."
  });
  
  return { tool: {...} };
}

Use Case: NotebookLM Plugin

I'm building a NotebookLM plugin with 8 tools. Each tool has corresponding skill instructions. Currently I must:

  • Deploy skills to ~/.config/opencode/skills/nlm-*/SKILL.md separately
  • Skills are visible even when plugin is disabled
  • No way to scope skills to plugin lifecycle

With this feature:

  • Skills bundled with plugin
  • Skills only available when plugin is active
  • Single install = plugin + skills together

Benefits

  1. Self-contained plugins - One package includes everything
  2. Proper scoping - Skills tied to plugin lifecycle
  3. Better UX - No manual skill deployment
  4. Ecosystem growth - Easier to distribute complete plugin packages

Additional Context

  • OpenCode version: Latest
  • Plugin location: ~/.config/opencode/plugins/notebooklm/
  • Reference: I've analyzed the skill discovery code in packages/opencode/src/skill/skill.ts
Originally created by @nghyane on GitHub (Jan 22, 2026). Originally assigned to: @thdxr on GitHub. # Feature Request: Plugin-bundled Skills Discovery ## Summary Allow plugins to bundle skills that are automatically discovered when the plugin is loaded. ## Problem Currently, OpenCode's skill discovery scans: - `.opencode/skills/` (project) - `~/.config/opencode/skills/` (global) But plugins at `~/.config/opencode/plugins/<name>/` cannot bundle skills that are auto-discovered. This forces plugin authors to either: 1. Ask users to manually copy skills to `~/.config/opencode/skills/` 2. Implement a custom skill tool within the plugin (duplicating native functionality) 3. Deploy skills during plugin "install" (no standard mechanism) ## Proposed Solution ### Option A: Scan plugin directories for skills Extend `Skill.all()` to also scan: ``` ~/.config/opencode/plugins/*/skills/**/SKILL.md ~/.config/opencode/plugins/*/.opencode/skills/**/SKILL.md ``` ### Option B: Plugin hook for skill registration Add a `skills` property to the Hooks interface: ```typescript interface Hooks { // ... existing skills?: Record<string, SkillDefinition>; } // Plugin usage export default async function plugin() { return { tool: { ... }, skills: { "my-skill": { name: "my-skill", description: "...", content: "# Instructions..." } } }; } ``` ### Option C: PluginInput includes skill registration ```typescript export default async function plugin({ registerSkill }: PluginInput) { registerSkill({ name: "my-skill", description: "...", content: "..." }); return { tool: {...} }; } ``` ## Use Case: NotebookLM Plugin I'm building a NotebookLM plugin with 8 tools. Each tool has corresponding skill instructions. Currently I must: - Deploy skills to `~/.config/opencode/skills/nlm-*/SKILL.md` separately - Skills are visible even when plugin is disabled - No way to scope skills to plugin lifecycle With this feature: - Skills bundled with plugin - Skills only available when plugin is active - Single install = plugin + skills together ## Benefits 1. **Self-contained plugins** - One package includes everything 2. **Proper scoping** - Skills tied to plugin lifecycle 3. **Better UX** - No manual skill deployment 4. **Ecosystem growth** - Easier to distribute complete plugin packages ## Additional Context - OpenCode version: Latest - Plugin location: `~/.config/opencode/plugins/notebooklm/` - Reference: I've analyzed the skill discovery code in `packages/opencode/src/skill/skill.ts`
Author
Owner

@github-actions[bot] commented on GitHub (Jan 22, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #8304: [FEATURE]: plugin support skills
  • #6347: [FEATURE]: Plugin Hook for Registering Additional Config Directories

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 22, 2026): This issue might be a duplicate of existing issues. Please check: - #8304: [FEATURE]: plugin support skills - #6347: [FEATURE]: Plugin Hook for Registering Additional Config Directories Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7270