[FEATURE]: finding opencode plugins amid more general projects #7567

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

Originally created by @rektide on GitHub (Jan 25, 2026).

Originally assigned to: @thdxr on GitHub.

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

Currently opencode plugins distributed via npm are loaded with an assumption that they are nothing but an opencode plugin. The main export is loaded, and all things exported there are assumed to be functions & are executed, and then added as hooks. This means that the npm package must be explicitly an opencode plugin, and nothing else. This makes it hard to add opencode support for existing interesting plugins out there.

For example, I would like to add opencode support to bash-history-mcp, an atuin history plugin which is designed as a Claude Code plugin. Because of how opencode assumes everything exported is an opencode plugin, this is somewhat un-ergonomic.

Ideally there would be some kind of contract, some well known things opencode checks first, before defaulting to it's current assumption that the library is explicitly only for opencode.

Bikeshed Options

  • look for and prefer an ./opencode or ./opencode-plugin module first.
  • look for and prefer an opencodePlugins export in the main module first.
  • both of these options, one after another.
Originally created by @rektide on GitHub (Jan 25, 2026). Originally assigned to: @thdxr on GitHub. ### 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 Currently opencode plugins distributed via npm are loaded with an assumption that they are nothing but an opencode plugin. The [main export is loaded, and all things exported there are assumed to be functions & are executed](https://github.com/anomalyco/opencode/blob/407f34fed5140c4eb3b378c606a422de7e313d9a/packages/opencode/src/plugin/index.ts#L79), and then added as hooks. This means that the npm package must be explicitly an opencode plugin, and nothing else. This makes it hard to add opencode support for existing interesting plugins out there. For example, I would like to add opencode support to [`bash-history-mcp`](https://github.com/nitsanavni/bash-history-mcp), an `atuin` history plugin which is designed as a Claude Code plugin. Because of how opencode assumes everything exported is an opencode plugin, this is somewhat un-ergonomic. Ideally there would be some kind of contract, some well known things opencode checks first, before defaulting to it's current assumption that the library is explicitly only for opencode. ## Bikeshed Options - look for and prefer an `./opencode` or `./opencode-plugin` module first. - look for and prefer an `opencodePlugins` export in the main module first. - both of these options, one after another.
yindo added the discussion label 2026-02-16 18:07:37 -05:00
Author
Owner

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

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

  • #8158: Support loading Claude Code plugins from .claude/ directory - requests compatibility for loading plugins from standard Claude Code directories
  • #6866: Plugin discovery should support subdirectories like agents and commands - addresses plugin discovery patterns and flexibility
  • #10148: Plugin-bundled Skills Discovery - discusses making plugins more self-contained and discoverable

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

@github-actions[bot] commented on GitHub (Jan 25, 2026): This issue might be a duplicate of existing issues. Please check: - #8158: Support loading Claude Code plugins from .claude/ directory - requests compatibility for loading plugins from standard Claude Code directories - #6866: Plugin discovery should support subdirectories like agents and commands - addresses plugin discovery patterns and flexibility - #10148: Plugin-bundled Skills Discovery - discusses making plugins more self-contained and discoverable 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#7567