-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Open
Labels
discussionUsed for feature requests, proposals, ideas, etc. Open discussionUsed for feature requests, proposals, ideas, etc. Open discussion
Description
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
Overview
OpenCode is increasingly used alongside other agent‑based coding tools such as Claude Code. Each tool allows users to define custom “agents” or profiles with particular capabilities, prompts and behaviors. Today there is no way to import those existing agents into OpenCode, so users have to manually recreate them inside their agents directory.
It would be helpful if OpenCode supported a streamlined import mechanism for agents defined in external coding tools. For example, users of Claude Code could export all of their agents and import them into OpenCode via a single command, preserving agent names, prompts, and configuration.
Justification
- Users often switch between multiple coding assistants and would like to bring their existing agents to OpenCode rather than recreate them manually. Providing an import mechanism lowers the barrier to adoption and keeps configurations in sync.
- Other tools such as Claude Code already provide export formats; supporting import ensures OpenCode remains interoperable with the broader ecosystem of AI coding tools.
- Reducing manual setup will improve productivity and encourage experimentation with different agent setups without losing previous work.
Proposed behavior
- Add a new CLI command (e.g. opencode agent import --source= or a subcommand under /agent) that reads agent definitions from a supported source format and writes them to the user’s OpenCode agents directory.
- Start by supporting Claude Code exports (e.g. JSON or YAML files describing agent prompts and settings). Users could specify the export file path, and OpenCode would parse it into native agent definitions.
- Map external fields into OpenCode fields
- Validate imported agents and report any fields that cannot be mapped. If an agent with the same name already exists in OpenCode, prompt the user to overwrite or rename.
- Design the importer to be extensible so additional tools (e.g. other IDE plugins) can be added later with minimal changes—possibly by defining converters per source format.
mdlmarkham
Metadata
Metadata
Assignees
Labels
discussionUsed for feature requests, proposals, ideas, etc. Open discussionUsed for feature requests, proposals, ideas, etc. Open discussion