Opencode Claude Code Plugin banner
unixfox unixfox

Opencode Claude Code Plugin

Git community

Description

Use Claude Code in OpenCode - created from idea https://github.com/anomalyco/opencode/issues/9677

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

opencode-claude-code

A standalone [opencode](https://github.com/opencodeco/opencode) provider plugin that uses [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) as a backend. It spawns `claude` as a subprocess with `--output-format stream-json --input-format stream-json`, implements the AI SDK `LanguageModelV2` interface, and streams responses back to opencode.

This is a **standalone npm package** that opencode loads dynamically via its external provider system -- no modifications to opencode's source code required.

Archived repo

This repository is archived. Unfortunately I don't have enough free time to maintain it. You can find forks like:

Prerequisites

Installation

Local development

git clone 
cd opencode-claude-code
bun install
bun run build

Then reference it via `file://` in your `opencode.json`.

Configuration

Add this to your project's `opencode.json`:

{
  "provider": {
    "claude-code": {
      "npm": "opencode-claude-code-plugin",
      "models": {
        "haiku": {
          "name": "Claude Code Haiku",
          "attachment": false,
          "limit": { "context": 200000, "output": 8192 },
          "capabilities": { "reasoning": false, "toolcall": true }
        },
        "sonnet": {
          "name": "Claude Code Sonnet",
          "attachment": false,
          "limit": { "context": 1000000, "output": 16384 },
          "capabilities": { "reasoning": true, "toolcall": true }
        },
        "opus": {
          "name": "Claude Code Opus",
          "attachment": false,
          "limit": { "context": 1000000, "output": 16384 },
          "capabilities": { "reasoni