opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[FEATURE]: Plugin Hook for Registering Additional Config Directories

Open jgordijn opened this issue 3 weeks ago • 6 comments

Feature hasn't been suggested before.

  • [x] I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Add a plugin hook that allows plugins to register additional directories for skill, agent, command, and tool discovery. This enables plugins to provide pre-packaged configurations without polluting the user's config directories.

Problem Statement

Currently, Config.directories() is resolved during config initialization, before plugins have a chance to influence the search paths. This creates limitations for plugins that want to provide:

  • Skills from external sources (e.g., Git repositories, skill marketplaces)
  • Shared agent definitions (e.g., team-wide agents)
  • Shared commands (e.g., organization-standard commands)
  • Shared tools (e.g., custom tool libraries)

Current Workarounds

Plugins must resort to workarounds like:

  1. Symlinking into user directories - Creates clutter and risks accidental commits
  2. Replacing built-in tools - Complex and may conflict with other plugins
  3. Custom tool implementations - Duplicates existing functionality

My Use Case: Remote Skills Plugin

I want to provide a repository that team-members can install to have commands, skills, etc. with the least amount of friction. They should be able to install and remove it.

Currently, this requires symlinking into the user's skill directory and managing .gitignore - a fragile approach that mixes plugin-managed content with user content.

By adding extra config directories (I know the environment variable exists), it would be possible to create richer plugins for opencode.

jgordijn avatar Dec 29 '25 10:12 jgordijn

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

  • #3471: Streamlined Distribution for Agent Definitions - Discusses distributing agent definitions through plugins/repositories
  • #4393: Allow plugins to have their own configuration - Requests the ability to configure plugins with custom paths
  • #6013: Add Skill Configuration to Config Type - Requests adding skill configuration support similar to agents and commands
  • #6266: Does opencode actually support finding skills at .claude/skills? - Questions about configurable skill directories

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

github-actions[bot] avatar Dec 29 '25 10:12 github-actions[bot]

I see https://github.com/sst/opencode/issues/6013 and that would also do the job, but I would be nice to just have the same directories and markdown files and put them into a repository and be able to share that.

jgordijn avatar Dec 29 '25 10:12 jgordijn

I also need this kind of functionality, with the aim of packaging configurations such as command, agent, skill, and MCP. I hope that OpenCode can support this soon, as it will help promote the expansion of the OpenCode ecosystem.

wch-abc avatar Dec 31 '25 09:12 wch-abc

Yeah the usecase makes sense, Dax will prolly have a good idea on the approach we should tkae

rekram1-node avatar Dec 31 '25 21:12 rekram1-node

@thdxr I would like to know your thoughts on this issue and when we might expect a solution.

I've noticed quite a few similar issues being reported recently, which indicates that many users share this need. We would really appreciate it if this could be addressed as soon as possible.

wch-abc avatar Jan 06 '26 07:01 wch-abc

I didn't see how I could customize the skills folder to detect github / vs code skills. https://code.visualstudio.com/docs/copilot/customization/agent-skills

Seems like it should just be looking for a */skills/*SKILL.md and that would match almost any implementation.

niemyjski avatar Jan 11 '26 19:01 niemyjski

@thdxr Recently, there have been more and more issues related to the opencode marketplace and similar topics. There are many different proposals, so it is recommended that the opencode team provide an official solution as soon as possible to prevent the ecosystem from becoming too fragmented.

wch-abc avatar Jan 12 '26 02:01 wch-abc

In my opinion, all third-party compatibility layers (SKILL.md, Claude Code, Cursor, Copilot, Codex, etc.) should also be moved to plug-ins to avoid overcomplication of the base app.

kostrse avatar Jan 12 '26 15:01 kostrse