opencode-plugin-cc
v0.2.3
Published
Use OpenCode from Claude Code to review code or delegate tasks.
Readme
opencode-plugin-cc
Use OpenCode from inside Claude Code for code reviews or delegated tasks.
This plugin mirrors the workflow shape of codex-plugin-cc, but delegates to the local opencode CLI.
What You Get
/opencode:reviewfor a read-only OpenCode review/opencode:adversarial-reviewfor a steerable challenge review/opencode:rescue,/opencode:status,/opencode:result, and/opencode:cancelto delegate work and manage background jobs/opencode:setupto check local OpenCode readiness and toggle the optional stop-time review gate
Requirements
- Node.js 22.18 or newer
- OpenCode CLI installed and authenticated
Install
Add the marketplace in Claude Code:
/plugin marketplace add skillsland/opencode-plugin-ccInstall the plugin:
/plugin install opencode@skillsland-opencodeThe marketplace entry installs the published opencode-plugin-cc npm package, so the package must be published before this command can install a working plugin.
Reload plugins:
/reload-pluginsThen run:
/opencode:setup/opencode:setup will tell you whether Node.js, OpenCode, and OpenCode authentication are ready.
Plugin runs use OpenCode's built-in build agent in --pure mode by default so external OpenCode plugins cannot change the agent type or break basic commands. Pass --agent <name> on a command when you want another primary OpenCode agent. Set OPENCODE_COMPANION_PURE=0 before launching Claude Code if you explicitly want OpenCode plugin loading for companion runs.
If you need to install OpenCode, use:
curl -fsSL https://opencode.ai/install | bashIf OpenCode is installed but not logged in yet, run:
!opencode providers loginAfter install, you should see:
- the slash commands listed below
- the
opencode:opencode-rescuesubagent in/agents
One simple first run is:
/opencode:review --background
/opencode:status
/opencode:resultUsage
/opencode:review
Runs a read-only OpenCode review on your current git state.
Examples:
/opencode:review
/opencode:review --base main
/opencode:review --background/opencode:adversarial-review
Runs a review that challenges the implementation approach and design assumptions.
Examples:
/opencode:adversarial-review
/opencode:adversarial-review --base main challenge the retry and rollback design
/opencode:adversarial-review --background look for race conditions/opencode:rescue
Delegates an investigation or fix request to OpenCode.
Examples:
/opencode:rescue investigate why tests are failing
/opencode:rescue --write fix the failing test with the smallest safe patch
/opencode:rescue --model anthropic/claude-sonnet-4-5 --variant high inspect this regression
/opencode:rescue --background --write implement the missing edge caseNotes:
- The plugin never adds
--dangerously-skip-permissionsunless you explicitly ask for it. - Follow-up rescue requests can resume the latest tracked OpenCode task when an OpenCode session ID is available.
Job Management
/opencode:status
/opencode:status <job-id>
/opencode:result
/opencode:result <job-id>
/opencode:cancel
/opencode:cancel <job-id>Review Gate
/opencode:setup --enable-review-gate
/opencode:setup --disable-review-gateWhen enabled, the plugin uses a Claude Code Stop hook to run a compact OpenCode review of the previous Claude turn. If OpenCode returns BLOCK: ..., the stop is blocked so Claude can address the issue first.
Development
Requirements:
- Node.js 22.18 or newer
- pnpm 10.33 or newer
Install dependencies:
pnpm installRun the full local quality gate:
pnpm run checkUseful scripts:
pnpm run build- bundle TypeScript intodist/with tsdownpnpm run typecheck- run TypeScript without emitting filespnpm run lint- run ESLint with type-aware TypeScript rulespnpm run test- run Vitest oncepnpm run format- format the repo with Prettierpnpm run changeset- create a Changesets release notepnpm run commit- write a Conventional Commit with Commitizen
