---
title: OpenCode
description: Primary coding-agent harness and published config.
sidebar:
  label: Overview
---

<a href="https://opencode.ai" target="_blank" rel="noopener noreferrer">OpenCode</a> is the main interactive agent UI: sessions, slash commands, plugins, and <a href="https://herdr.dev" target="_blank" rel="noopener noreferrer">Herdr</a> panes. Most day-to-day agent work happens here. Config source lives under `agents/.config/opencode/` and is published as <a href="https://github.com/timmo001/opencode-config" target="_blank" rel="noopener noreferrer">timmo001/opencode-config</a>.

## Layout

| Piece | Why |
| --- | --- |
| `agents/.config/opencode/` | Agents, commands, plugins, TUI plugins, and shared `lib/` |
| Shared [skills](/agents/skills/) | Pinned submodule + repo-local skills (see Skills page) |
| Private overlay | Machine-specific OpenCode packages, AGENTS source, and MCP wiring |

## Layers

| Layer | Role |
| --- | --- |
| Agents | Execution posture (permissions, tools, plan mode, delegation) |
| Commands | Thin routers: intent, arguments, required skills/context, output shape |
| Skills | Reusable workflows and behavioural contracts ([Skills](/agents/skills/)) |
| Plugins | Context injection and enforcement hooks (branch/stack context, guards, notes, workflows) |

Commands do not own long workflows; skills and plugins do. AGENTS stays to cross-cutting policy that no skill description already carries.

## Sync and publish

| Command / flow | Purpose |
| --- | --- |
| `dot agents-sync` | Mirror global AGENTS into other harness instruction files (Cursor, Claude) |
| `dot mcp-sync` | Regenerate MCP configs from private `mcp.yml` for OpenCode and other harnesses |
| `dot skills` | Check and apply skill updates from the skills repo |
| `dot update` / `dot init` | Run agents-sync (and related refresh) as part of maintenance |
| opencode-config publish | Portable mirror of the public OpenCode assets for other machines |

## Runtime

Sessions often run inside Herdr panes (OpenCode integration checked by `dot doctor`). Companion harnesses [Pi](/agents/pi/) and [Cursor](/agents/cursor/) share skills and/or AGENTS guidance but not this full plugin and command stack. See [Agents](/agents/overview/) for how the harnesses fit together.

## Reference

OpenCode-only generated catalogues (do not hand-edit):

| Catalogue | Contents |
| --- | --- |
| [Agents](/agents/opencode/agents/) | Execution postures |
| [Commands](/agents/opencode/commands/) | Slash-command routers |
| [Plugins](/agents/opencode/plugins/) | Context and enforcement hooks |

Skills: [Skills](/agents/skills/) (catalogue in the skills repo, plus local skills). Regenerate OpenCode catalogues with `mise run docs:gen` after the sources change. The [`dot` command reference](/dot/commands/) is separate (CLI, not OpenCode).

