# 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`
Activity
github-actions commentedon Jan 23, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
github-actions commentedon Mar 26, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.