A proper, production-grade bridge for importing OpenCode artifacts (skills, agents, commands, rules) into the Grok Build TUI / CLI.
- High-fidelity import of OpenCode
skills/,agent/,command/, andrules/ - Converts OpenCode agents into Grok-native agents + automatically generates matching roles so they appear in
Ctrl+Shift+A - Automatically proposes
[subagents.roles]entries for yourconfig.toml(with diff + confirmation) - No verbose "bridge headers" or Import IDs are injected into your content
- Full support for skills that contain Python scripts, schemas, and subdirectories
- Clean, auditable, and reversible
- Clone this repo
- In the Grok TUI, press
Ctrl+L→ Plugins tab →i - Point it at the cloned directory
- Trust the plugin when prompted
Or via CLI:
grok plugin install /path/to/grok-opencode-bridge --trust/opencode-import --validate # Review what would be imported
/opencode-import # Interactive import with review
/opencode-import --sync # Incremental updateThe importer will:
- Walk your actual OpenCode directory tree
- Convert agents and generate roles
- Present a diff of proposed
config.tomlchanges for the new roles - Ask for explicit confirmation before touching your config
| OpenCode | Grok |
|---|---|
skills/<name>/ |
plugins/.../skills/<name>/ (full tree) + ~/.grok/skills/ (optional) |
command/*.md |
Skills named opencode-<name> (real slash commands) |
agent/*.md |
Grok agents in ~/.grok/agents/ + roles in ~/.grok/roles/opencode-* |
rules/**/*.mdc |
Clean rules in ~/.grok/rules/opencode-* |
- Grok Build TUI / CLI (with plugin support)
- Python 3.11+ (for the importer scripts)
This bridge was built after several painful, ad-hoc import attempts. The goals are:
- Correctness — Full fidelity, no data loss on supporting files
- Cleanliness — No injected headers or garbage in your files
- Subagent integration — Imported agents actually work with Grok's subagent system (
Ctrl+Shift+A) - Safety — Clear review + confirmation at every destructive step
The core importer lives in skills/opencode-import/.
Key scripts:
scan.py— Builds the import planconvert_agents.py— Agent → Grok agent + role conversionapply_import.py— Performs the actual import with config.toml diff support
MIT
Contributions that improve the importer, add more conversion paths (e.g. better persona support), or improve safety are very welcome.