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.
npx skills add nanocoai/nanoclaw --skill add-opencode --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# OpenCode agent provider NanoClaw runs agents in a long-lived **poll loop** inside the container. The backend is selected per agent group by the **`provider`** key in that group's `container.json` (materialized from the `container_configs` table) — set it with `ncl groups config update --provider opencode`. Default is `claude`. Trunk ships with only the `claude` provider baked in. This skill copies the OpenCode provider files in from the `providers` branch, wires them into the host and container barrels, installs dependencies, and rebuilds the image. ## Install ### Pre-flight If all of the following are already present, skip to **Configuration**: - `src/providers/opencode.ts` - `container/agent-runner/src/providers/opencode.ts` - `src/providers/opencode-registration.test.ts` - `container/agent-runner/src/providers/opencode-registration.test.ts` - `import './opencode.js';` line in `src/providers/index.ts` - `import './opencode.js';` line in `container/agent-runner/src/providers/index.ts` - `@opencode-ai/sdk` in `container/agent-runner/package.json` - `ARG OPENCODE_VERSION` and `"opencode-ai@${OPENCODE_VERSION}"` in `container/Dockerfile` - `src/opencode-dockerfile.test.ts` (the Doc
- Install
- Pre-flight
- 1. Fetch the providers branch
- 2. Copy the OpenCode source files
- 3. Append the self-registration imports
- 4. Add the agent-runner dependency
- 5. Add opencode-ai to the container Dockerfile
- 6. Copy the Dockerfile install guard
- 7. Build and validate
- 8. Propagate to existing per-group overlays
- Configuration
- Host .env (typical)
- Select the provider
- Operational notes
git fetch origin providers git show origin/providers:src/providers/opencode.ts > src/providers/opencode.ts git show origin/providers:container/agent-runner/src/providers/opencode.ts > container/agent-runner/src/providers/opencode.ts git show origin/providers:container/agent-runner/src/providers/mcp-to-opencode.ts > container/agent-runner/src/providers/mcp-to-opencode.ts git show origin/providers:container/agent-runner/src/providers/mcp-to-opencode.test.ts > container/agent-runner/src/providers/mcp-to-opencode.test.ts git show origin/providers:container/agent-runner/src/providers/opencode.factory.test.ts > container/agent-runner/src/providers/opencode.factory.test.ts git show origin/providers:src/providers/opencode-registration.test.ts > src/providers/opencode-registration.test.ts cd container/agent-runner && bun add @opencode-ai/sdk@1.4.17 && cd - cp .claude/skills/add-opencode/opencode-dockerfile.test.ts src/opencode-dockerfile.test.ts pnpm run build # host
What does the add-opencode skill do?
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.
How do I install it?
Run `npx skills add nanocoai/nanoclaw --skill add-opencode --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From nanocoai/nanoclaw, a repository with 30,426 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.