OpenCode plugin for Claude Code
Personal copy: This repository is a personal copy of
tasict/opencode-plugin-cc,
imported at upstream commit e751b0160588758fcf5c6244254370eb2c3425aa.
It is intentionally not a GitHub fork — there is no upstream remote and no
automatic sync. Modifications by JohnnyVicious.
See NOTICE for full attribution.
Tribute: The upstream project is inspired by and pays homage to
codex-plugin-cc by OpenAI.
The plugin architecture, command structure, and design patterns are derived from
the original codex-plugin-cc project, adapted to work with
OpenCode instead of Codex.
Use OpenCode from inside Claude Code for code reviews or to delegate tasks.
This plugin is for Claude Code users who want an easy way to start using OpenCode from the workflow
they already have.
What You Get
/opencode:review for a normal read-only OpenCode review
/opencode:adversarial-review for a steerable challenge review
/opencode:rescue, /opencode:status, /opencode:result, and /opencode:cancel to delegate work and manage active jobs
- Optional rescue worktrees so OpenCode can make writable changes in an isolated git worktree before you keep or discard them
Requirements
- Claude Code (CLI, desktop app, or IDE extension)
- OpenCode installed (
npm i -g opencode-ai or brew install opencode)
- A configured AI provider in OpenCode (Claude, OpenAI, Google, etc.)
- Node.js 18.18 or later
Install
Add the marketplace in Claude Code:
/plugin marketplace add JohnnyVicious/opencode-plugin-cc
Install the plugin:
/plugin install opencode@johnnyvicious-opencode-plugin-cc
Reload plugins:
/reload-plugins
Then verify your setup:
/opencode:setup
Set up an AI Provider
If OpenCode is installed but no AI provider is configured, set one up:
! opencode providers login
To check your configured providers:
! opencode providers list
Uninstall
/plugin uninstall opencode@johnnyvicious-opencode-plugin-cc
/reload-plugins
Migrating from the upstream tasict-opencode-plugin-cc install? Run
/plugin uninstall opencode@tasict-opencode-plugin-cc once before the
install command above so the old marketplace entry is removed.
Command Mapping (codex-plugin-cc -> opencode-plugin-cc)
| codex-plugin-cc | opencode-plugin-cc | Description |
|---|
/codex:review | /opencode:review | Read-only code review |
/codex:adversarial-review | /opencode:adversarial-review | Adversarial challenge review |
/codex:rescue | /opencode:rescue | Delegate tasks to external agent |
/codex:status | /opencode:status | Show running/recent jobs |
/codex:result | /opencode:result | Show finished job output |
/codex:cancel | /opencode:cancel | Cancel active background job |
/codex:setup | /opencode:setup | Check install/auth, configure defaults, toggle review gate |
Slash Commands
/opencode:review -- Normal OpenCode code review (read-only). Supports --base <ref>, --pr <number>, --path <path>, --model <provider/model>, --free, --wait, and --background. Uses the saved default model when configured and no runtime model flag is supplied.
/opencode:adversarial-review -- Steerable review that challenges implementation and design decisions. Supports --base <ref>, --pr <number>, --path <path>, --model <provider/model>, --free, --wait, --background, and custom focus text. Uses the saved default model when configured and no runtime model flag is supplied.
/opencode:rescue -- Delegates a task to OpenCode via the safe-command.mjs bridge, which validates flags and feeds the task text through a shell-insulated heredoc. Supports --model, --free, --agent, --resume, --fresh, --worktree, --wait, and --background. Foreground is the default; --wait is an explicit no-op alias for foreground; --background detaches a worker and returns a job id you can poll with /opencode:status. Uses saved default model/agent values when configured and no runtime flag is supplied.
/opencode:status -- Shows running/recent OpenCode jobs for the current repo.
/opencode:result -- Shows final output for a finished job, including OpenCode session ID for resuming.
/opencode:cancel -- Cancels an active OpenCode job.
/opencode:setup -- Checks OpenCode install/auth, can configure default model/agent values, can enable/disable the review gate hook, and can configure review-gate throttles.
Command Defaults
Persist model and rescue-agent defaults with setup: