Use OpenCode from inside Claude Code for code reviews or to delegate tasks to OpenCode.
This plugin is for Claude Code users who want an easy way to start using OpenCode from the workflow they already have.
/opencode:reviewfor a standard code review/opencode:adversarial-reviewfor a steerable challenge review/opencode:rescue,/opencode:status,/opencode:result, and/opencode:cancelto delegate work and manage background jobs
- OpenCode CLI — Install from opencode.ai
- Node.js 18.18 or later
- A configured AI provider — Set up via
opencode /connector environment variables (OPENAI_API_KEY,ANTHROPIC_API_KEY, etc.)
Add the marketplace in Claude Code:
/plugin marketplace add <your-github-username>/opencode-plugin-ccInstall the plugin:
/plugin install opencode@<your-marketplace>Reload plugins:
/reload-pluginsThen run:
/opencode:setup/opencode:setup will tell you whether OpenCode is ready. If OpenCode is missing, it can offer to install it for you.
If you prefer to install OpenCode yourself, use:
curl -fsSL https://opencode.ai/install | bashRuns an OpenCode review on your current work.
Use it when you want:
- a review of your current uncommitted changes
- a review of your branch compared to a base branch like
main
Use --base <ref> for branch review. It also supports --wait and --background.
Examples:
/opencode:review
/opencode:review --base main
/opencode:review --backgroundRuns a steerable review that questions the chosen implementation and design.
Use it to pressure-test assumptions, tradeoffs, failure modes, and whether a different approach would have been safer or simpler.
Examples:
/opencode:adversarial-review
/opencode:adversarial-review --base main challenge whether this caching design is correct
/opencode:adversarial-review --background look for race conditionsHands a task to OpenCode through the opencode:opencode-rescue subagent.
Use it when you want OpenCode to:
- investigate a bug
- try a fix
- continue a previous OpenCode session
- take a pass with a different model
Supports --background, --wait, --resume, --fresh, --model, --variant, and --agent.
Examples:
/opencode:rescue investigate why the tests started failing
/opencode:rescue fix the failing test with the smallest safe patch
/opencode:rescue --resume continue the previous investigation
/opencode:rescue --model openai/gpt-4.1 --variant high investigate the flaky test
/opencode:rescue --background investigate the regressionYou can also just ask for a task to be delegated to OpenCode:
Ask OpenCode to redesign the database connection to be more resilient.
Shows running and recent OpenCode jobs for the current repository.
/opencode:status
/opencode:status task-abc123Shows the final stored OpenCode output for a finished job.
/opencode:result
/opencode:result task-abc123Cancels an active background OpenCode job.
/opencode:cancel
/opencode:cancel task-abc123Checks whether OpenCode is installed and ready. If OpenCode is missing, it can offer to install it.
/opencode:setup/opencode:review/opencode:rescue investigate why the build is failing in CI/opencode:adversarial-review --background
/opencode:rescue --background investigate the flaky testThen check in with:
/opencode:status
/opencode:resultThis plugin wraps the OpenCode CLI run command for non-interactive execution. It uses the global opencode binary installed on your machine.
You can specify models using the --model flag in provider/model format:
/opencode:rescue --model openai/gpt-4.1 fix the bug
/opencode:rescue --model anthropic/claude-sonnet-4-20250514 investigate the issueYou can also set a default model by configuring OpenCode directly.
OpenCode supports multiple AI providers. Configure them by:
- Running
opencodeand using/connect - Setting environment variables like
OPENAI_API_KEY,ANTHROPIC_API_KEY,GEMINI_API_KEY, etc.
See the OpenCode docs for full configuration options.