Guide · Agent skill
How to use the Add OpenCode Provider agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The add-opencode skill lets NanoClaw, a setup that runs AI agents in containers, use OpenCode as an alternative agent runtime. Once it is installed, individual chat groups can switch from the default Anthropic-based runtime to OpenCode, which can call models from providers such as OpenRouter, OpenAI, Google or DeepSeek through OpenCode's configuration. This guide explains what the skill changes, how to install it, how to turn it on, and what to check before you rely on it.
Quick start
- 1Check your NanoClaw core. Confirm your core supports the host contract and credential-connection seam the skill targets, and update core first if the readiness check reports no.
- 2Get the skill files. Download the ZIP from the skill page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills in the Claude apps.
- 3Apply the payload in NanoClaw. Let the skill copy only its listed payload files to the matching project-root paths, keeping core-owned files in place.
- 4Configure the host. Run the host configure helper so OpenCode setup can be completed for your machine.
- 5Authenticate the provider. Run the provider-auth step with opencode and sign in with your chosen backend, such as OpenRouter or OpenAI.
- 6Switch a group. Use the ncl groups config command with the opencode provider on the group you want to change, then restart or recreate its container as needed.
- 7Test with a real request. Send a message to the group to confirm the backend and account work, since these are checked only when a real request runs.
What does the add-opencode skill do?
The skill adds OpenCode as an optional provider for NanoClaw. It copies a set of TypeScript provider files into your NanoClaw project, registers them, and adds helper scripts for host-side setup, sign-in and updates. It is not a standalone app: it only works inside a NanoClaw checkout.
Provider choice is made per group. The source describes the change as a per-group setting, applied with the ncl command, and the host passes OPENCODE_* settings and an XDG mount into containers it starts.
- Adds OpenCode as a selectable provider in the standard setup provider picker
- Lets each chat group use OpenCode instead of the default runtime
- Includes test files for provider behaviour, useful to maintainers
What do you need before installing?
Check these requirements first. The skill refuses to apply partial changes if your NanoClaw core is too old, so an unsupported setup receives no files or dependency changes.
You also need a model provider account or sign-in for the backend you choose, for example OpenRouter, OpenAI or ChatGPT. The skill itself does not supply model access.
- NanoClaw core with the host contract and credential-connection seam versions the skill targets
- OpenCode CLI, stable release, new enough to support the --prompt option (the skill's check states the minimum)
- pnpm and tsx for running setup scripts
- Node.js for the readiness check
- A provider account or sign-in for your chosen backend
How do you install the skill?
Download the ZIP from the skill page and unzip it into ~/.claude/skills/ for all projects, or into a project's .claude/skills/ folder for one project. In the Claude apps, you can instead upload the skill under Settings → Capabilities → Skills.
Inside NanoClaw, the skill's own steps copy only the listed payload files to matching paths at the project root. Do not copy ignored dependency directories or generated native-test files. Keep core-owned files such as the cwd-shim, registries and contract files where they are.
After installation, run the host setup helper for OpenCode configuration. Its --update and --debug options launch the matching operational helper.
- Back up any local edits to payload files before refreshing, because refresh overwrites them
- Use --refresh only when you want to replace the installed payload and update its pins
pnpm exec tsx scripts/opencode-host.ts --configureHow do you turn OpenCode on for a chat group?
OpenCode is offered by the standard setup provider picker. For an existing install, you can add or authenticate it with the provider-auth step. Backend defaults apply to the whole installation, while model and reasoning effort can be overridden per group through the existing container configuration.
Per-group backend and auth selection is described in the source as separate work, so check the current behaviour in your version before relying on it.
- Existing installs: run the provider-auth step with opencode
- Re-authenticating leaves installed files and the container image unchanged
- Recreate affected containers after a refresh so old config symlinks are discarded
pnpm exec tsx setup/index.ts --step provider-auth opencodeHow do you trigger the skill with natural requests?
The source does not list fixed trigger phrases, so ask in plain language what you want. Name OpenCode and the provider you want, and say which chat group should change. Examples of clear requests include asking the assistant to add OpenCode as a provider, to switch one group to OpenCode with OpenRouter, or to check why OpenCode sign-in is failing.
If the assistant's answer is unclear, name the skill directly, for example by saying to use the add-opencode skill, and state the outcome you want.
- Add OpenCode as a provider in this NanoClaw checkout and walk me through sign-in
- Switch the support group to OpenCode and use a model through OpenRouter
- Check whether the OpenCode installation files match the skill's declarations
What examples show it working?
These examples describe what the skill is designed to support. Confirm each one in your own setup, because a working backend and account are only checked when a real request is sent.
- Run one group on a model from OpenRouter while other groups keep the default runtime
- Compare how a provider behaves by using the included provider test files
- Use OpenCode's read tool for channel attachments, so models that accept images or PDFs can read them
What safety notes should you read?
The skill runs scripts and uses the network. It copies many files and runs setup scripts that edit the project, so review the changes before you accept them. Host sign-in uses OpenCode's own settings and is separate from the container's gateway credentials.
The debug, update and failure-help modes launch OpenCode with a permission override, so it asks before every edit and command, even if your own config allows them. The configure mode keeps OpenCode's native permissions. Diagnostic context sent to the model may remain in OpenCode's native history, and deleting the private temporary file does not erase it.
- Do not use this where provider credentials must stay strictly isolated
- Do not use it if you cannot review code changes
- Keep backups of local payload edits before any refresh
What tips help you avoid problems?
If you only need the default Anthropic setup, skip this skill, since it adds complexity without benefit. If an installation step fails, the existing provider failure-assist hook can offer help, including for wizard authentication and installation-check failures.
To remove the skill, first switch each OpenCode group back to an installed provider with the ncl command, restart the group, and do not edit container.json files or clear database rows by hand. The removal guide lists the barrel files and skill-owned destinations to clean up.
- Use the readiness check output to confirm core is compatible before installing
- Expect ordinary sign-in not to change installed files
- Keep other tools' settings and persisted session data when refreshing
ncl groups config update --id <group-id> --provider claudeWhat people use it for
- Running a chat group on a model from OpenRouter, OpenAI, Google or DeepSeek while other groups keep the default runtime
- Maintainers testing provider behaviour with the included provider test files
- Operators who want an open-source provider router option beside the default NanoClaw runtime
- Passing channel images or PDFs to a model that accepts them, through OpenCode's read tool
Frequently asked questions
Is the add-opencode skill free?
The skill is published under the MIT licence, as stated on its page. Model providers such as OpenRouter or OpenAI may charge for usage, so check their terms and pricing separately.
What do I need before installing add-opencode?
You need a NanoClaw core that supports the versions of the host contract and credential-connection seam the skill targets, a stable OpenCode CLI with --prompt support, pnpm and tsx, Node.js, and an account or sign-in for your chosen provider.
How do I install the add-opencode skill?
Download the ZIP from the skill page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. In the Claude apps you can upload it under Settings → Capabilities → Skills. Inside NanoClaw, the skill then copies its listed files into your project.
Does add-opencode work with OpenRouter, OpenAI or DeepSeek?
The skill is described as supporting OpenCode configuration for providers such as OpenRouter, OpenAI, Google and DeepSeek. A backend and account are checked only when you send a real request, so test each provider after setup.
Why does OpenCode ask permission before every edit?
The debug, update and failure-help modes set an OPENCODE_PERMISSION override so OpenCode asks before every edit and command. The configure mode keeps OpenCode's native permissions.
How do I remove the add-opencode skill?
Switch each OpenCode group to an installed provider, restart the group, then follow the removal guide to delete the skill-owned files and the import lines in the barrel files. Do not edit container.json or clear database rows directly.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you already run NanoClaw and want chat groups to call models from other providers through OpenCode, and you can review code changes. Skip it if the default Anthropic setup meets your needs, or if your provider credentials must stay strictly isolated, because host sign-in and diagnostic history can persist in OpenCode.
Download the skill