No description
| .opencode | ||
| .perltidyrc | ||
| AGENTS.md | ||
| opencode.jsonc | ||
| README.md | ||
opencode Configuration Template
A self-contained, reusable opencode configuration for a project. Copy the
.opencode/ directory, opencode.jsonc, and AGENTS.md into any repository
to get the same agents, skills, and conventions.
Layout
opencode.jsonc # project config (schema, instructions, extension points)
AGENTS.md # instructions loaded into the primary agent
.opencode/
agents/
code-review.md # reviews diffs for correctness/security/style
techwriter.md # writes and improves documentation
software-architect.md # designs systems and documents decisions
skills/
perl/SKILL.md # Perl best practices
postgresql/SKILL.md # PostgreSQL schema, queries, operations
docker/SKILL.md # Dockerfiles, Compose, image operations
Quick start
- Copy
opencode.jsonc,AGENTS.md, and.opencode/into the target repo. - Fill in the
About this repositoryandConventionssections ofAGENTS.md. - Restart opencode. Config is loaded once at startup and is not hot-reloaded.
Extending
| Want to add… | Do this |
|---|---|
| A subagent | Create .opencode/agents/<name>.md |
| A skill | Create .opencode/skills/<name>/SKILL.md |
| A command | Create .opencode/command/<name>.md |
| Shared team skills | Add a path under skills.paths in opencode.jsonc |
| Tighter permissions | Edit the permission block in opencode.jsonc |
| More context | Add entries to instructions in opencode.jsonc |
Subagent file
---
description: One sentence on what it does and when to use it.
mode: subagent
permission:
edit: deny
---
The prompt. The file body becomes the agent's system prompt.
Skill file
---
name: my-skill
description: One sentence covering what it does AND when to trigger it.
---
# My Skill
Markdown guidance. Front-load trigger keywords in the description.
Conventions
- Agents and skills live as files, not inline in
opencode.jsonc, so they are easy to diff, review, and reuse. opencode.jsonccarries only the schema, theinstructionsentry, and commented extension points. Keep it lean.- The
software-architectsubagent references thesoftware-architectureskill when it is available (bundled separately in the global config). - After any change to a config-time file, restart opencode to apply it.
Reference
- Full schema: https://opencode.ai/config.json
- opencode docs: https://opencode.ai