Skip to content

ZanzyTHEbar/grok-opencode-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grok-opencode-bridge

A proper, production-grade bridge for importing OpenCode artifacts (skills, agents, commands, rules) into the Grok Build TUI / CLI.

Features

  • High-fidelity import of OpenCode skills/, agent/, command/, and rules/
  • Converts OpenCode agents into Grok-native agents + automatically generates matching roles so they appear in Ctrl+Shift+A
  • Automatically proposes [subagents.roles] entries for your config.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

Installation

As a Local Plugin (Recommended)

  1. Clone this repo
  2. In the Grok TUI, press Ctrl+L → Plugins tab → i
  3. Point it at the cloned directory
  4. Trust the plugin when prompted

Or via CLI:

grok plugin install /path/to/grok-opencode-bridge --trust

Usage

/opencode-import --validate          # Review what would be imported
/opencode-import                     # Interactive import with review
/opencode-import --sync              # Incremental update

The importer will:

  • Walk your actual OpenCode directory tree
  • Convert agents and generate roles
  • Present a diff of proposed config.toml changes for the new roles
  • Ask for explicit confirmation before touching your config

What Gets Imported

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-*

Requirements

  • Grok Build TUI / CLI (with plugin support)
  • Python 3.11+ (for the importer scripts)

Philosophy

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

Development

The core importer lives in skills/opencode-import/.

Key scripts:

  • scan.py — Builds the import plan
  • convert_agents.py — Agent → Grok agent + role conversion
  • apply_import.py — Performs the actual import with config.toml diff support

License

MIT

Contributing

Contributions that improve the importer, add more conversion paths (e.g. better persona support), or improve safety are very welcome.

About

Temporary Grok Build Opencode bridge to import and convert opencode agents, commands, rules, and skills to grok build format.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages