In short.
The add-opencode skill gives NanoClaw operators an OpenCode agent runtime, but adoption requires a compatible checkout, a local image build and a reachable model backend. It supports ChatGPT sign-in, selected API-key services and OpenAI-compatible endpoints through NanoClaw's configured credential gateway. The implementation queues prompts, verifies completed replies against session history and refreshes memory at the start of each external turn. Its main constraints are installation-wide backend authentication, broad agent tool permissions and matched CLI/SDK upgrades. The supplied tests describe substantial failure and continuation coverage, but no execution results establish working accounts, production reliability, performance or cost.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage comprises the complete captured .claude/skills/add-opencode folder at commit f3f445e6627bac501441bed26054e7ab427613fe, including SKILL.md, ARCHITECTURE.md, REMOVE.md, apply fixtures and all supplied payload source, configuration and test files. The related notice is the repository-root MIT LICENSE. The wider NanoClaw core, external gateway implementations, installed dependency contents, accounts and model services are outside this scope. No installation, build, test, authentication flow or live agent interaction was executed; runtime outcomes, external-service reliability, performance and total cost remain unknown.
The overview
Identity
add-opencode is an optional skill in nanocoai/nanoclaw that installs OpenCode as a NanoClaw agent provider. The folder contains instructions, TypeScript implementation files, setup helpers, tests and removal guidance. It uses OpenCode's runtime rather than the Anthropic Agent SDK.
The original source is [https://github.com/nanocoai/nanoclaw/tree/main/.claude/skills/add-opencode]. The captured version is available at [https://github.com/nanocoai/nanoclaw/tree/f3f445e6627bac501441bed26054e7ab427613fe/.claude/skills/add-opencode]. This resource is the NanoClaw integration, rather than the complete standalone OpenCode product.
Assessment
This is a useful option for an existing NanoClaw installation that needs OpenCode's model routing while retaining NanoClaw groups, memory and MCP tools. It supplies the integration code as well as operational instructions, including recovery and removal.
The implementation addresses concrete failure cases: stale idle events do not complete a turn, uncertain execution is not automatically replayed, and completed text can survive a later native error. These are meaningful design features visible in source. Their effectiveness in a deployed installation remains unassessed because no execution results are supplied.
Users
The primary users are NanoClaw operators and developers who can manage a source checkout, rebuild containers and restart services. It is particularly relevant when connecting an existing installation to OpenRouter, DeepSeek, supported native API services or a local model server.
Beginners will need familiarity with terminal commands, model identifiers and credentials. Developers extending provider integrations can also study its runtime and host contracts. Someone seeking a standalone coding assistant would need OpenCode itself rather than this NanoClaw-specific payload.
Capabilities
The setup flow offers ChatGPT browser or device sign-in, local or self-hosted OpenAI-compatible endpoints, OpenRouter, DeepSeek and supported custom API-key backends. Automatic API-key setup explicitly covers OpenAI, OpenRouter, DeepSeek, Google and Anthropic; other native authentication schemes need additional integration.
Groups can select OpenCode and override their model and reasoning effort. The adapter translates local process and remote HTTP MCP server configurations, including environments, headers and declared working directories. A separate command changes the default model without repeating sign-in.
Attachments arrive as staged file paths for the agent to open. Image and PDF use depends on the selected model's capabilities; custom models may require explicit input-modality declarations. Optional context and output limits apply to the main model.
Using it
Requirements
Installation requires NanoClaw host contract version 1 and credential-connection seam version 1 or later. These are internal compatibility interfaces. The skill includes a prerequisite guard intended to stop unsupported installations before payload changes.
The documented build uses pnpm, TypeScript tooling, Bun for the runner and a container runtime. Both the container OpenCode CLI and @opencode-ai/sdk must be exactly 1.18.25. A full local image build is required; a CLI-only overlay cannot supply the SDK.
Authenticated backends need a configured gateway that supports provider credential connections, appropriate grants and a reachable permitted endpoint. The ChatGPT setup labels its sign-in methods for Plus or Pro, but actual account entitlement is unknown. Minimum CPU, RAM, disk and local-model hardware requirements are not specified.
Mechanism
Each container reuses a local OpenCode server and queues prompts so native turns do not overlap. Events indicate activity, while the synchronous prompt response determines completion. The adapter then checks durable session history using its assigned user-message ID to collect the corresponding assistant text and exclude internal summaries.
History requests expand from 100 to at most 6,400 messages. If the prompt cannot be verified, the adapter fails without resubmitting it. Interrupted execution receives an explicit abort; if cleanup cannot be confirmed, the owned runtime is discarded before another turn proceeds.
Before each external turn, the memory renderer's output, core instructions and delivery wording are written atomically to a private instruction file. Native continuation and child tasks use that turn's file. Runtime authentication uses fixed placeholders, with real credential handling delegated to the selected gateway.
Setup
The documented entry point from the NanoClaw project root is pnpm exec tsx setup/index.ts --step provider-auth opencode. For a missing provider, the documentation describes payload installation, image building and a host restart before authentication. The complete skill folder is needed because SKILL.md references bundled payload files.
The installation declarations register five provider entry points, add the matched SDK and CLI pins, and specify builds, typechecks and tests before the local image build. This changes a published-image installation to locally built images.
After authentication saves new backend settings, restart the actual host service with bash setup/lib/restart.sh before starting an OpenCode group. Then use ncl groups config update --id <group-id> --provider opencode and ncl groups restart --id <group-id>. Installation alone does not switch existing groups.
Ordinary re-authentication preserves installed files and the image. Adding --refresh intentionally replaces skill-owned payloads and pins, so local edits need backing up first. Older installations may also require container recreation to discard obsolete mounts or configuration links.
Example
An operator with an existing tool-capable local model could choose Local or self-hosted and supply a container-reachable endpoint such as [http://host.docker.internal:8000/v1]. Setup can query that endpoint's model catalog, or accept an actual model ID entered manually. Keyless mode applies only when the endpoint really needs no key and the selected gateway permits the route.
After switching one group, an illustrative first request is: Read the project README and explain how to start it. A follow-up asking about the same README can help assess session continuation. These are example requests, not observed outputs.
For an already configured backend, pnpm exec tsx scripts/opencode-models.ts --list --refresh requests a refreshed model list. This refreshes catalog information; it does not upgrade the CLI or SDK or establish account access.
Assessment & evidence
Limitations
Backend defaults and authentication apply across the installation. Per-group model and effort overrides do not provide independent backend or credential selection. New models needing newer runtime support require a matched CLI/SDK update and image rebuild; model changes do not automatically correct custom context limits or modalities.
The runner allows edits, shell commands, child tasks, network tools and external-directory access. Native interactive questions are denied, and unexpected question requests receive steering toward autonomous decisions or NanoClaw's human-question MCP tool. Permission events also receive automatic replies. Operators therefore depend on the surrounding container policy and gateway restrictions.
Memory is refreshed once per external turn. Compaction during that turn retains its starting memory snapshot. A renderer failure continues with current instructions but without rendered memory. Native slash commands are not supported by this provider.
Endpoint acceptance varies by gateway. The supplied fixtures distinguish keyed HTTPS routes from a keyless local HTTP exception. Host OpenCode maintenance also uses separate native credentials, and diagnostic material supplied to it may remain in its conversation history after temporary files are removed.
Fit rationale
The strongest fit is an operator who already uses NanoClaw and needs another runtime while keeping its group, memory and tool interfaces. The bundled contracts and adapters address that specific integration need.
The trade-off is operational ownership: a local image, exact dependency pins, gateway configuration and service restarts. Source-level safeguards around completion and credential handling support a bounded assessment of the design; they do not establish superior model answers, lower costs or production reliability.
Alternatives
An already installed NanoClaw provider is the closest alternative when OpenCode-specific routing is unnecessary. The removal guide uses Claude as an example destination for groups moving away from OpenCode.
For work directly in a checkout, the documentation also describes running native host OpenCode, with its own sign-in and model configuration. That serves a different operational context from chat-connected NanoClaw groups. No comparative cost, quality or performance results are supplied.
Evidence
The supplied material includes operational documentation, implementation source and test definitions. Tests describe checks for registration, transport configuration, credential lifecycle, memory delivery, cancellation, runtime recovery and reply reconciliation. The apply-fixture file explicitly states that its harness stubs shell execution.
The socket tests are designed to exercise the pinned SDK against a local HTTP server. An optional native test requires an explicitly supplied OpenCode 1.18.25 binary and uses local model and MCP fixtures for compaction, continuation, child memory, errors, cancellation and a 65-second tool call. These describe intended checks, not completed results.
Nothing was executed. No passing test receipts, live account requests, OAuth refresh observations, model-quality benchmarks or production journeys are supplied. Core utilities and gateway implementations imported from outside this folder are not fully present in the captured scope.
Access & freshness
Costs
No purchase price, service tariff or usage estimate is provided for this integration. Total operating cost is unknown. Relevant components may include the chosen model API or subscription, credential gateway and compute for containers or self-hosted inference.
A keyless local endpoint does not establish zero infrastructure cost. The sources provide no measured token consumption, build resource usage or hardware sizing from which to estimate a bill.
Rights
The captured repository LICENSE is MIT, with copyright attributed to Gavriel in 2026. It permits use, modification and redistribution, including commercial distribution, provided the copyright and permission notice accompany copies or substantial portions. It supplies no warranty.
That notice supports redistribution of the captured skill with its notice preserved. Separate licensing and service terms for the OpenCode executable, SDK, other dependencies and model services are not established by the supplied repository notice.
Freshness
The source snapshot was captured on 2026-11-16 at 04:28:17.406 UTC from commit f3f445e6627bac501441bed26054e7ab427613fe. The findings concern that immutable revision; subsequent changes to the main branch are unknown.
The container runtime and SDK are pinned to 1.18.25. The separate host helper accepts stable OpenCode versions at least 1.18.25 that expose the required maintenance prompt option, preferring the newest compatible installation it finds. Compatibility with later core interfaces or container runtime releases is not established.
Adoption steps
Before adoption, confirm the required NanoClaw interfaces, the exact container pins and the selected gateway's endpoint and grant rules. Obtain the complete skill folder from the original repository and preserve local payload edits before requesting a refresh.
Start with one group after the documented build and host restart. Send an initial message and a follow-up to assess actual backend access and session continuation. If attachments, long sessions or human questions matter to the intended work, assess those paths with the chosen model and gateway; catalog membership alone does not prove support.
For removal, first move affected groups to another installed provider and restart them. Follow REMOVE.md to reverse registrations and dependencies, rebuild the local image and restart the host. Session state, memory and gateway credentials are retained unless their deletion is explicitly requested.
