Skip to content

[FEATURE]: Plugin Hook for Registering Additional Config Directories #6347

@jgordijn

Description

@jgordijn

Feature hasn't been suggested before.

  • 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.

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions