add-opencode

Installs and configures the OpenCode agent provider for NanoClaw container groups.

2|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/RADHA0-max/selfhealbackend --skill add-opencode-radha0-max
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-opencode
Source: https://github.com/RADHA0-max/selfhealbackend/tree/main/nanoclaw/.claude/skills/add-opencode
Command: npx skills add https://github.com/RADHA0-max/selfhealbackend --skill add-opencode-radha0-max

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 through OpenRouter, OpenAI, Google, DeepSeek, or other OpenCode-supported backends have no built-in path. This Skill wires the OpenCode provider into both the host and container trees, installs the pinned SDK and CLI, and rebuilds the agent image. ## Core Features & Use Cases - Provider installation: Copies OpenCode provider files from the providers branch, registers them in both barrels, adds the pinned @opencode-ai/sdk dependency, and installs the opencode-ai CLI in the container Dockerfile. - Guarded validation: Runs registration guard tests and a structural Dockerfile test to verify every integration point before use. - Configuration and removal: Documents per-group provider selection via ncl groups config update, OneCLI credential registration, and a full idempotent removal procedure in REMOVE.md. - Use Case: A team wants one agent group to run on DeepSeek through OpenRouter instead of Anthropic. Run this Skill to install the provider, set OPENCODE_* env vars, register the API key in OneCLI, and switch the group with ncl groups config update --provider opencode. ## Quick Start Ask the agent to install the OpenCode provider into this NanoClaw project and configure a test group to use it with your chosen model backend.

Frequently Asked Questions about add-opencode

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

FAQPage Schema
How do I add the OpenCode provider to 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 run the build and registration guard tests to validate.

How do I switch a NanoClaw agent group to OpenCode?

Run ncl groups config update --id <group-id> --provider opencode from the host, then ncl groups restart --id <group-id>. The provider value is written to the container_configs table and materialized into the group's container.json at spawn time.

Which model providers work with the OpenCode integration?

OpenCode supports OpenRouter, Anthropic, DeepSeek, OpenCode Zen, and other backends via OPENCODE_PROVIDER and OPENCODE_MODEL environment variables. Non-Anthropic providers also require ANTHROPIC_BASE_URL pointing at the provider's API base URL.

Why does the OpenCode CLI version need to be pinned?

The opencode-ai CLI version must match the @opencode-ai/sdk version the container provider imports. Using latest silently upgrades the CLI to 1.14.x, whose session API change (UUID to ses_ prefixed session IDs) is incompatible with SDK 1.4.x.

Why do I get Unknown provider: opencode after rebuilding?

The container buildkit caches COPY steps aggressively, so new provider files may not be picked up. Prune the builder with docker builder prune -f and rerun ./container/build.sh to force a fresh build.

How do I remove the OpenCode provider from NanoClaw?

Follow REMOVE.md: delete the barrel import lines and copied files from both trees, remove @opencode-ai/sdk with bun remove, revert the Dockerfile edits, clean per-group overlays, unset OPENCODE_* env vars, then rebuild and restart. All steps are idempotent.