add-opencode

An alternative agent provider that runs through OpenCode, a tool that can connect to models from services such as OpenRouter, OpenAI, Google, and DeepSeek. Each agent group can choose its provider separately.

In plain words
What is it for?
Use it to run selected agent groups with OpenCode. It adds the provider files, model and message handling, dependencies, and container integration.
Why use it?
It gives groups a provider choice beyond the default Claude setup. This can be useful when a group should use a different model service or provider configuration.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nanocoai/nanoclaw/add-opencode
Any agent
npx skills add nanocoai/nanoclaw --skill add-opencode
Clone the repo
git clone --depth 1 https://github.com/nanocoai/nanoclaw

Made for: Claude Code, Codex.

Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,896 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00065 $0.02896
Opus 5 $0.00032 $0.01448
Sonnet 5 $0.00013 $0.00579
Haiku 4.5 $0.00006 $0.00290

Measured 3d ago against content hash ccf74a3ec79e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

add-opencode scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (opencode-cli-tools.test.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/add-opencode/SKILL.md · 235 lines

How it starts

The opening of the file, as written. The whole thing — 235 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenCode agent provider

NanoClaw runs agents in a long-lived poll loop inside the container. The backend is selected per agent group by the provider key in that group's container.json (materialized from the container_configs table) — set it with ncl groups config update --provider opencode. Default is claude.

Trunk ships with only the claude provider baked in. This skill copies the OpenCode provider files in from the providers branch, wires them into the host and container barrels, installs dependencies, and rebuilds the image.

Install

1. Copy the provider payload

Fetch the providers branch from the configured remote that carries it, then overwrite every skill-owned provider file with its canonical registry copy:

src/providers/opencode.ts
src/providers/opencode-registration.test.ts
container/agent-runner/src/providers/opencode.ts
container/agent-runner/src/providers/mcp-to-opencode.ts
container/agent-runner/src/providers/mcp-to-opencode.test.ts
container/agent-runner/src/providers/opencode-registration.test.ts
container/agent-runner/src/providers/opencode.attachments.test.ts
container/agent-runner/src/providers/opencode.compaction.test.ts
container/agent-runner/src/providers/opencode.config.test.ts
container/agent-runner/src/providers/opencode.factory.test.ts
container/agent-runner/src/providers/opencode.memory.test.ts
container/agent-runner/src/providers/opencode.question.test.ts

(cwd-shim.ts and its test are deliberately not in this payload even though mcp-to-opencode.ts imports the shim: trunk ships and owns them — the default provider imports cwd-shim.ts — and every path listed here becomes a skill-owned file that removal deletes.)

2. Register the provider in both runtimes

Each barrel gets one line appended at the end — skip if the line is already present.

import './opencode.js';
import './opencode.js';

Read the full file on GitHub · 235 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 235 lines · 65 tokens per session scan A ccf74a3ec79e

Subscribe to this mod's changes

add-opencode is a skill published in the GitHub repository nanocoai/nanoclaw (30,678 stars, last pushed yesterday), licensed MIT. It adds 65 tokens to every session and 2,896 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

self-reflection

Daily loop that reviews the bot's own recent outbound behavior and any pending lessons in self/learnings.md, stress-tests candidate rules against 10-20 hypothetical scenarios, and on explicit owner approval routes each to the right home among three sinks — prompts/project.md (durable behavioral rules), a memory file…

Rustam-Z/hamroh · 120 tokens

render-style

House style for the renderhtml tool — dark dashboard / architecture-diagram look with stat tiles, bar rows, numbered timeline steps, two-panel grids, status pills, connector arrows, callout bands, and verdict blocks. Read this skill before calling renderhtml so the output is visually consistent. Provides CSS tokens…

Rustam-Z/hamroh · 82 tokens

reminder-format

House format for the text passed to reminderset. Read before calling reminderset, and again before editing a reminder (cancel + re-create). Three rules — open with the literal marker , state the goal in one line, then list numbered steps the future-self should run when the reminder fires. Keeps fired envelopes…

Rustam-Z/hamroh · 82 tokens

openclaw-control

控制和管理 OpenClaw AI 助手。用于发送消息给 OpenClaw、检查状态、管理配置和安装技能。当用户想要与 OpenClaw 交互或管理 OpenClaw 时使用此技能。.

RTGS2017/NagaAgent · 53 tokens

Pynchy Development

Use when running pynchy locally — running the app, tests, linting, formatting, prek hooks, or rebuilding the agent container. Also use when determining whether you're on the live Pynchy host or a local machine, and for debugging agent behavior-- session transcript branching, inspecting message history and agent traces…

crypdick/pynchy · 79 tokens

Pynchy Plugin Authoring

Use when creating, scaffolding, or updating a pynchy plugin, including channels, MCP servers, skills, agent cores, workspace specs, and container runtime plugins. Also use when users ask how to register plugins via config.toml, add entry points, or validate plugin hook wiring.

crypdick/pynchy · 64 tokens