Agent skill · AI & Agents

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.

NanoCo30,389★ · +78/wk · 1 repos on radarProfile →
claude-codeships scriptsMIT
Install
npx skills add nanocoai/nanoclaw --skill add-opencode --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 15 KB
Bundled scripts: yes
Path: .claude/skills/add-opencode/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 30,426 · +37 this week
Language: TypeScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. Install
  2. Pre-flight
  3. 1. Fetch the providers branch
  4. 2. Copy the OpenCode source files
  5. 3. Append the self-registration imports
  6. 4. Add the agent-runner dependency
  7. 5. Add opencode-ai to the container Dockerfile
  8. 6. Copy the Dockerfile install guard
  9. 7. Build and validate
  10. 8. Propagate to existing per-group overlays
  11. Configuration
  12. Host .env (typical)
  13. Select the provider
  14. Operational notes
Ships with 2 files
  • REMOVE.md
  • opencode-dockerfile.test.ts
Commands it runs
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
More from nanoclaw
All skills →
About this skill
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.

Keep going