add-opencode

Installs and configures the OpenCode agent provider for NanoClaw containers.

1|Updated May 22, 2026
One-click install
npx skills add https://github.com/roseDwayane/LocalizeAgenticSys --skill add-opencode-rosedwayane
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-opencode
Source: https://github.com/roseDwayane/LocalizeAgenticSys/tree/main/nanoclaw/.claude/skills/add-opencode
Command: npx skills add https://github.com/roseDwayane/LocalizeAgenticSys --skill add-opencode-rosedwayane

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @opencode-ai/sdk.

What problem does it solve? NanoClaw ships with only the Claude agent provider baked in, so teams wanting to run agents on OpenRouter, OpenAI, Google, DeepSeek, or other models via OpenCode must manually wire provider files, dependencies, Dockerfile installs, and per-group overlays across two code trees. This Skill automates that entire installation and configuration workflow with idempotent, verifiable steps. ## Core Features & Use Cases - Provider Installation: Copies OpenCode provider source files from the providers branch into both the host and container trees, appends barrel self-registration imports, and pins the @opencode-ai/sdk dependency. - Dockerfile Integration: Adds a pinned OPENCODE_VERSION build arg and a dedicated pnpm global install layer for the opencode-ai CLI, guarded by a structural vitest test. - Configuration & Secrets: Guides .env setup (OPENCODE_PROVIDER, OPENCODE_MODEL, ANTHROPIC_BASE_URL) and OneCLI credential registration with per-group and per-session provider overrides. - Use Case: A team wants a NanoClaw agent group to run on DeepSeek through OpenRouter instead of Anthropic. The Skill installs the provider, registers the API key in OneCLI, sets agent_provider to opencode, and validates the wiring with registration and Dockerfile guard tests. ## Quick Start Ask the agent to install the OpenCode provider so this NanoClaw group can run on DeepSeek via OpenCode, then follow the printed build and validation steps.

Frequently Asked Questions about add-opencode

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add OpenCode as an agent provider in NanoClaw?

Fetch the providers branch, copy the OpenCode provider files into both the host and container trees, append the barrel import lines, add @opencode-ai/[email protected], and add the pinned opencode-ai CLI install to the Dockerfile. Then rebuild the image and run the registration guard tests.

How do I configure OpenCode to use DeepSeek or OpenRouter models?

Set OPENCODE_PROVIDER, OPENCODE_MODEL, and ANTHROPIC_BASE_URL in the host .env, then register the provider API key in OneCLI with the matching host-pattern. Set agent_provider to opencode in the DB or "provider": "opencode" in the group's container.json.

Why does the build report Unknown provider: opencode after installation?

The container buildkit caches COPY steps aggressively, so newly added provider files may not be picked up. Prune the builder with docker builder prune -f and rebuild the image with ./container/build.sh.

Can I use the latest opencode-ai CLI version with this provider?

No. The CLI and @opencode-ai/sdk must both be pinned to 1.4.17 because the 1.14.x CLI has a breaking session API change incompatible with SDK 1.4.x. The Dockerfile guard test explicitly rejects a latest pin.

Why does OpenCode Zen return 401 Missing API key errors?

Zen's HTTP API expects the key in the x-api-key header, not Authorization Bearer. Register the Zen key in OneCLI with --header-name x-api-key and --value-format "{value}" for host-pattern opencode.ai.

How do I remove the OpenCode provider from NanoClaw?

Follow the bundled REMOVE.md: delete the barrel import lines and copied files from both trees, remove the SDK with bun remove, revert the Dockerfile edits, clean per-group overlays, unset OpenCode env vars, and rebuild. All steps are idempotent.