
Add OpenCode Provider
Lets NanoClaw run agents on OpenCode, an open-source model router (OpenRouter, OpenAI, Google, DeepSeek and more).
- Repository
- nanocoai/nanoclaw
- Stars
- 31,072
- Licence
- MIT
- Files
- 15 files
What it does
This skill adds OpenCode as an alternative engine for NanoClaw, a setup that runs AI agents in containers. Once installed, individual chat groups can be set to use OpenCode instead of the default Anthropic-based runtime, so the agent can call many different model providers through OpenCode's configuration. It copies a set of TypeScript provider files into the project, registers them, and adds helper scripts for host-side setup, sign-in and updates.
Great for
- Developers running NanoClaw who want to use models from other providers such as OpenRouter, OpenAI, Google or DeepSeek
- Operators who want an open-source provider router option alongside the default runtime
- Maintainers testing provider behaviour with the included test files
Skip it if
- Users who only need the default Anthropic setup, since this adds complexity without benefit
- Anyone who cannot review code changes, because it copies many files and runs setup scripts that edit the project and can launch OpenCode with prompts that ask before each edit
- Environments where provider credentials must stay strictly isolated, since host sign-in uses OpenCode's own settings and diagnostic context may persist in OpenCode history
Try asking
- “Install the OpenCode provider in my NanoClaw setup and show me the steps”
- “Switch this group to use OpenCode with an OpenRouter model”
- “Refresh the OpenCode provider files to the latest pinned version”
- “Check whether my OpenCode authentication and installed files are correct”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 15 original files, the MIT licence and an attribution note.
add-opencode.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip add-opencode.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip add-opencode.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Back up any local edits to payload files before using --refresh, because refresh overwrites them
- Recreate affected containers after a refresh so old config symlinks are discarded
- Verify a working backend by sending a real test request, since installation checks do not confirm account access
What's inside
- apply-fixtures.json
- ARCHITECTURE.md
- payload/container/agent-runner/src/provider-contracts/opencode.ts
- payload/container/agent-runner/src/providers/mcp-to-opencode.test.ts
- payload/container/agent-runner/src/providers/mcp-to-opencode.ts
- payload/container/agent-runner/src/providers/opencode-auth.test.ts
- payload/container/agent-runner/src/providers/opencode-auth.ts
- payload/container/agent-runner/src/providers/opencode-config.ts
- payload/container/agent-runner/src/providers/opencode-memory.ts
- payload/container/agent-runner/src/providers/opencode-registration.test.ts
- payload/container/agent-runner/src/providers/opencode-turn.ts
- payload/container/agent-runner/src/providers/opencode.config.test.ts
- payload/container/agent-runner/src/providers/opencode.conformance.test.ts
- REMOVE.md
- SKILL.md
Redistributed unmodified from nanocoai/nanoclaw under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.