[FEATURE]: Support loading Claude Code plugins from .claude/ directory #5209

Open
opened 2026-02-16 17:49:59 -05:00 by yindo · 0 comments
Owner

Originally created by @yanmxa on GitHub (Jan 13, 2026).

Originally assigned to: @thdxr on GitHub.

Summary

OpenCode already supports loading Claude Code configurations:

  • ~/.claude/CLAUDE.md - instruction files
  • .claude/skills/*/SKILL.md - skill definitions

Feature Request: Extend this compatibility to also support loading Claude Code plugins from .claude/ directories.

Current Behavior

OpenCode's native plugin system uses TypeScript/JavaScript modules:

  • .opencode/plugin/*.ts or .opencode/plugin/*.js
  • ~/.config/opencode/plugin/
  • npm packages in opencode.json

Claude Code plugins are not loaded from:

  • .claude/plugins/ (project-level)
  • ~/.claude/plugins/ (global)

Proposed Behavior

Add support for discovering and loading plugins from Claude Code's plugin locations:

.claude/plugins/*.ts       # Project-level
~/.claude/plugins/*.ts     # Global

This would follow the same pattern as the existing .claude/skills/ compatibility.

Use Case

  1. Ecosystem Leverage: Claude Code has a rich plugin ecosystem. Users could immediately benefit from existing Claude Code plugins without rewriting them.

  2. Migration Path: Users transitioning from Claude Code to OpenCode wouldn't need to reorganize their plugin directories.

  3. Interoperability: Users running both tools could share plugins between them, reducing maintenance overhead.

  4. Consistency: OpenCode already respects .claude/CLAUDE.md and .claude/skills/. Extending this to plugins creates a more complete compatibility layer.

Implementation Considerations

  1. Plugin Format Compatibility: If Claude Code plugins use a different format/API, a compatibility layer or adapter pattern may be needed.

  2. Flag Control: Similar to OPENCODE_DISABLE_CLAUDE_CODE_SKILLS, add OPENCODE_DISABLE_CLAUDE_CODE_PLUGINS for users who want to opt out.

  3. Load Order: Define clear precedence (e.g., OpenCode native plugins override Claude Code plugins with same name).

Related Issues

  • #6985 - Add .claude/commands/ compatibility
  • #6266 - .claude/skills/ support discussion
  • #6207 - Import settings from other tools
  • #6551 - CLAUDE_CONFIG_DIR environment variable

Environment

  • OpenCode Version: Latest (1.1.x)
  • OS: All platforms
Originally created by @yanmxa on GitHub (Jan 13, 2026). Originally assigned to: @thdxr on GitHub. ## Summary OpenCode already supports loading Claude Code configurations: - ✅ `~/.claude/CLAUDE.md` - instruction files - ✅ `.claude/skills/*/SKILL.md` - skill definitions **Feature Request**: Extend this compatibility to also support loading **Claude Code plugins** from `.claude/` directories. ## Current Behavior OpenCode's native plugin system uses TypeScript/JavaScript modules: - `.opencode/plugin/*.ts` or `.opencode/plugin/*.js` - `~/.config/opencode/plugin/` - npm packages in `opencode.json` Claude Code plugins are **not** loaded from: - `.claude/plugins/` (project-level) - `~/.claude/plugins/` (global) ## Proposed Behavior Add support for discovering and loading plugins from Claude Code's plugin locations: ``` .claude/plugins/*.ts # Project-level ~/.claude/plugins/*.ts # Global ``` This would follow the same pattern as the existing `.claude/skills/` compatibility. ## Use Case 1. **Ecosystem Leverage**: Claude Code has a rich plugin ecosystem. Users could immediately benefit from existing Claude Code plugins without rewriting them. 2. **Migration Path**: Users transitioning from Claude Code to OpenCode wouldn't need to reorganize their plugin directories. 3. **Interoperability**: Users running both tools could share plugins between them, reducing maintenance overhead. 4. **Consistency**: OpenCode already respects `.claude/CLAUDE.md` and `.claude/skills/`. Extending this to plugins creates a more complete compatibility layer. ## Implementation Considerations 1. **Plugin Format Compatibility**: If Claude Code plugins use a different format/API, a compatibility layer or adapter pattern may be needed. 2. **Flag Control**: Similar to `OPENCODE_DISABLE_CLAUDE_CODE_SKILLS`, add `OPENCODE_DISABLE_CLAUDE_CODE_PLUGINS` for users who want to opt out. 3. **Load Order**: Define clear precedence (e.g., OpenCode native plugins override Claude Code plugins with same name). ## Related Issues - #6985 - Add `.claude/commands/` compatibility - #6266 - `.claude/skills/` support discussion - #6207 - Import settings from other tools - #6551 - CLAUDE_CONFIG_DIR environment variable ## Environment - OpenCode Version: Latest (1.1.x) - OS: All platforms
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5209