
Add Opencode
Use OpenCode as an agent provider.
Install
npx skills add nanocoai/nanoclaw --skill add-opencode -g -a claude-code -y- Repository
- nanocoai/nanoclaw31.1k
- Category
- AI and agents
- Updated
- 5d ago
- License
- MIT
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- Yes, review before use
What it does
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.
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.
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.

