/add-opencode
Use OpenCode as an agent provider. OpenRouter, OpenAI, Google, DeepSeek, etc. via OpenCode config — not the Anthropic Agent SDK. Per group via `ncl groups config update --provider opencode`; host passes OPENCODE_* and XDG mount when spawning containers.
Claude Code
$ npx -y skills add nanocoai/nanoclaw --skill add-opencode --agent claude-code
Codex
$ npx skills add nanocoai/nanoclaw --skill add-opencode -a codex -y
Cursor
$ npx skills add nanocoai/nanoclaw --skill add-opencode -a cursor -y
Gemini CLI
$ npx skills add nanocoai/nanoclaw --skill add-opencode -a gemini-cli -y
GitHub Copilot
$ npx skills add nanocoai/nanoclaw --skill add-opencode -a github-copilot -y
OpenCode
$ npx skills add nanocoai/nanoclaw --skill add-opencode -a opencode -y
Windsurf
$ npx skills add nanocoai/nanoclaw --skill add-opencode -a windsurf -y
SKILL.md
add-opencode.SKILL.mdname: add-opencode
description: Use OpenCode as an agent provider. OpenRouter, OpenAI, Google, DeepSeek, etc. via OpenCode config — not the Anthropic Agent SDK. Per group via `ncl groups config update --provider opencode`; host passes OPENCODE_* and XDG mount when spawning containers.
metadata:
nanoclaw-provider: opencode
nanoclaw-provider-label: OpenCode
nanoclaw-provider-hint: Open-source provider router
nanoclaw-provider-offered: 'true'
nanoclaw-provider-image: local-required
OpenCode agent provider
Install OpenCode as an optional NanoClaw runtime. The payload is included in this skill; it needs no separate provider branch. It uses the upstream runtime, instructions, host, and setup metadata contracts. The host contract remains at version 1; the container owns its non-secret ChatGPT placeholder file.
OpenCode is offered by the standard setup provider picker. Existing installs can add or authenticate it with `pnpm exec tsx setup/index.ts --step provider-auth opencode`; an install that way also rebuilds and restarts the host before auth. To replace an installed payload and update its pins, append `--refresh`; back up local payload edits first. Ordinary re-authentication leaves installed files and the container image alone. Backend defaults are installation-wide; model and reasoning effort can be overridden per group through the existing container configuration. Per-group backend/auth selection is separate work. Channel attachments reach the agent as a prompt line naming the staged file; the agent opens it with OpenCode's read tool, which hands images and PDFs to models that accept them (a custom model declares that with `OPENCODE_MODEL_INPUT_MODALITIES`).
Authentication checks the installed files, registration lines, and exact pins against this skill's declarations without launching a subprocess or container. Install and refresh run the existing provider contract verification; the build step owns image freshness. Model selection does not repeat installation checks. A working backend and account are checked separately by sending a real request.
Install
After installing this payload, run `pnpm exec tsx scripts/opencode-host.ts --configure` for host OpenCode setup, or use `--update` / `--debug` for the corresponding operational skill. An existing OpenCode CLI can also run directly in the checkout; it discovers `.claude/skills` natively. Host sign-in uses OpenCode's own settings and is independent of the container's gateway credentials. Installed setup failures use the existing provider failure-assist hook, including wizard authentication and installation-check failures. Host diagnostic context is model input and may remain in native OpenCode history; deleting its private temporary file does not erase those records. The helper requires stable OpenCode 1.18.25 or newer with `--prompt` and prefers the newest compatible installation it finds. `--debug`, `--update` and failure help launch it with an `OPENCODE_PERMISSION` override, so OpenCode asks before every edit and command even when the operator's top-level config allows them (OpenCode itself skips the prompt for a bare redirection with no command, such as `> file`). `--configure` keeps OpenCode's native permissions. Automatic help before payload installation is optional and is not part of the runtime contract.
Install and refresh require host contract version 1 and credential-connection seam version 1 or later. The compatibility predicate below guards every subsequent step, so an unsupported core receives no partial payload or dependency changes. Update core first if it reports a missing prerequisite.
node -e "const fs=require('fs'); const p='src/provider-contracts/registry.ts', g='setup/gateways/credential-store.ts'; if(fs.existsSync(p) && /PROVIDER_HOST_CONTRACT_SEAM_VERSION = 1/.test(fs.readFileSync(p,'utf8')) && fs.existsSync(g) && /PROVIDER_CREDENTIAL_CONNECTION_SEAM_VERSION = [1-9]/.test(fs.readFileSync(g,'utf8'))) console.log('yes'); else console.log('no')"Copy only the files listed below from this skill's `payload/` to the matching paths at the project root. Do not copy ignored dependency directories or other generated native-test files. These are skill-owned files; overwrite them together when refreshing the skill. Keep the core-owned `cwd-shim.ts`, registries, and contract realization files in place.
When refreshing an older installation, remove its unused `opencode-memory-plugin.ts`, `opencode.compaction.test.ts`, and dedicated `opencode-managed-config` tree from `container/agent-runner/src/providers/`. Recreate affected containers after the refresh to discard their old config symlinks. Keep other tools' settings and persisted session data.
The obsolete host Dockerfile guard and the retired attachment test must also be removed during refresh; current OpenCode installation is declared by the SDK and CLI manifests, and the test covered file-part code this payload no longer has.
rm -f src/opencode-dockerfile.test.ts container/agent-runner/src/providers/opencode.attachments.test.ts
payload/container/agent-runner/src/provider-contracts/opencode.ts -> container/agent-runner/src/provider-contracts/opencode.ts
payload/container/agent-runner/src/providers/mcp-to-opencode.test.ts -> container/agent-runner/src/providers/mcp-to-opencode.test.ts
payload/container/agent-runner/src/providers/mcp-to-opencode.ts -> container/agent-runner/src/providers/mcp-to-opencode.ts
payload/container/agent-runner/src/providers/opencode-config.ts -> container/agent-runner/src/providers/opencode-config.ts
payload/container/agent-runner/src/providers/opencode-memory.ts -> container/agent-runner/src/providers/opencode-memory.ts
payload/container/agent-runner/src/providers/opencode-registration.test.ts -> container/agent-runner/src/providers/opencode-registrat
Read more
name: add-opencode description: Use OpenCode as an agent provider. OpenRouter, OpenAI, Google, DeepSeek, etc. via OpenCode config — not the Anthropic Agent SDK. Per group via `ncl groups config update --provider opencode`; host passes OPENCODE_* and XDG mount when spawning containers. metadata: nanoclaw-provider: opencode nanoclaw-provider-label: OpenCode nanoclaw-provider-hint: Open-source provider router nanoclaw-provider-offered: 'true' nanoclaw-provider-image: local-required
OpenCode agent provider
Install OpenCode as an optional NanoClaw runtime. The payload is included in this skill; it needs no separate provider branch. It uses the upstream runtime, instructions, host, and setup metadata contracts. The host contract remains at version 1; the container owns its non-secret ChatGPT placeholder file.
OpenCode is offered by the standard setup provider picker. Existing installs can add or authenticate it with `pnpm exec tsx setup/index.ts --step provider-auth opencode`; an install that way also rebuilds and restarts the host before auth. To replace an installed payload and update its pins, append `--refresh`; back up local payload edits first. Ordinary re-authentication leaves installed files and the container image alone. Backend defaults are installation-wide; model and reasoning effort can be overridden per group through the existing container configuration. Per-group backend/auth selection is separate work. Channel attachments reach the agent as a prompt line naming the staged file; the agent opens it with OpenCode's read tool, which hands images and PDFs to models that accept them (a custom model declares that with `OPENCODE_MODEL_INPUT_MODALITIES`).
Authentication checks the installed files, registration lines, and exact pins against this skill's declarations without launching a subprocess or container. Install and refresh run the existing provider contract verification; the build step owns image freshness. Model selection does not repeat installation checks. A working backend and account are checked separately by sending a real request.
Install
After installing this payload, run `pnpm exec tsx scripts/opencode-host.ts --configure` for host OpenCode setup, or use `--update` / `--debug` for the corresponding operational skill. An existing OpenCode CLI can also run directly in the checkout; it discovers `.claude/skills` natively. Host sign-in uses OpenCode's own settings and is independent of the container's gateway credentials. Installed setup failures use the existing provider failure-assist hook, including wizard authentication and installation-check failures. Host diagnostic context is model input and may remain in native OpenCode history; deleting its private temporary file does not erase those records. The helper requires stable OpenCode 1.18.25 or newer with `--prompt` and prefers the newest compatible installation it finds. `--debug`, `--update` and failure help launch it with an `OPENCODE_PERMISSION` override, so OpenCode asks before every edit and command even when the operator's top-level config allows them (OpenCode itself skips the prompt for a bare redirection with no command, such as `> file`). `--configure` keeps OpenCode's native permissions. Automatic help before payload installation is optional and is not part of the runtime contract.
Install and refresh require host contract version 1 and credential-connection seam version 1 or later. The compatibility predicate below guards every subsequent step, so an unsupported core receives no partial payload or dependency changes. Update core first if it reports a missing prerequisite.
node -e "const fs=require('fs'); const p='src/provider-contracts/registry.ts', g='setup/gateways/credential-store.ts'; if(fs.existsSync(p) && /PROVIDER_HOST_CONTRACT_SEAM_VERSION = 1/.test(fs.readFileSync(p,'utf8')) && fs.existsSync(g) && /PROVIDER_CREDENTIAL_CONNECTION_SEAM_VERSION = [1-9]/.test(fs.readFileSync(g,'utf8'))) console.log('yes'); else console.log('no')"Copy only the files listed below from this skill's `payload/` to the matching paths at the project root. Do not copy ignored dependency directories or other generated native-test files. These are skill-owned files; overwrite them together when refreshing the skill. Keep the core-owned `cwd-shim.ts`, registries, and contract realization files in place.
When refreshing an older installation, remove its unused `opencode-memory-plugin.ts`, `opencode.compaction.test.ts`, and dedicated `opencode-managed-config` tree from `container/agent-runner/src/providers/`. Recreate affected containers after the refresh to discard their old config symlinks. Keep other tools' settings and persisted session data.
The obsolete host Dockerfile guard and the retired attachment test must also be removed during refresh; current OpenCode installation is declared by the SDK and CLI manifests, and the test covered file-part code this payload no longer has.
rm -f src/opencode-dockerfile.test.ts container/agent-runner/src/providers/opencode.attachments.test.ts
payload/container/agent-runner/src/provider-contracts/opencode.ts -> container/agent-runner/src/provider-contracts/opencode.ts payload/container/agent-runner/src/providers/mcp-to-opencode.test.ts -> container/agent-runner/src/providers/mcp-to-opencode.test.ts payload/container/agent-runner/src/providers/mcp-to-opencode.ts -> container/agent-runner/src/providers/mcp-to-opencode.ts payload/container/agent-runner/src/providers/opencode-config.ts -> container/agent-runner/src/providers/opencode-config.ts payload/container/agent-runner/src/providers/opencode-memory.ts -> container/agent-runner/src/providers/opencode-memory.ts payload/container/agent-runner/src/providers/opencode-registration.test.ts -> container/agent-runner/src/providers/opencode-registrat
A lightweight alternative to OpenClaw that runs in containers for security. Connects to WhatsApp, Telegram, Slack, Discord, Gmail and other messaging apps,, has memory, scheduled jobs, and runs directly on Anthropic's Agents SDK
Other skills on nanoclaw.
More skills from other plugins.
browser-use
Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…
agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…
opencli-adapter-author
Build or improve an OpenCLI JS adapter using observed site behavior, existing adapters and browser API evidence. For ad-hoc…
Questions about add-opencode.
- Which coding agents can use add-opencode?
- add-opencode installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

