3.0 KiB
3.0 KiB
name, description, permalink
| name | description | permalink |
|---|---|---|
| creating-agents | Create or update opencode agents in this repository, including dispatch permissions and roster alignment requirements | opencode-config/skills/creating-agents/skill |
Creating Agents
Use this skill when you need to add or revise an agent definition in this repo.
Agents vs Skills
- Agents define runtime behavior and permissions in
agents/*.md. - Skills are reusable instruction modules under
skills/*/SKILL.md. - Do not treat agent creation as skill creation; each has different files, checks, and ownership.
Source of Truth
- Agent definition file:
agents/<agent-name>.md - Operating roster and workflow contract:
AGENTS.md - Runtime overrides and provider policy:
opencode.jsonc - Workflow entrypoints:
commands/*.md
Notes:
- This repo uses two primary agents:
plannerandbuilder. - Dispatch permissions live in the primary agent that owns the subagent, not in a central dispatcher.
plannermay dispatch onlyresearcher,explorer, andreviewer.buildermay dispatch onlycoder,tester,reviewer, andlibrarian.
Agent File Conventions
For agents/<agent-name>.md:
- Use frontmatter first, then concise role instructions.
- Keep tone imperative and operational.
- Define an explicit
modelfor every agent and keep it on a GitHub Copilot model. - Use only explicit
allowordenypermissions; do not useask. - Include only the tools and permissions needed for the role.
- Keep instructions aligned with the planner -> builder contract in
AGENTS.md.
Typical frontmatter fields in this repo include:
descriptionmodemodeltemperaturestepstoolspermissionpermalink
Mirror nearby agent files instead of inventing new metadata patterns.
Practical Workflow (Create or Update)
- Inspect the relevant primary agent file and at least one comparable peer in
agents/*.md. - Create or edit
agents/<agent-name>.mdwith matching local structure. - If the agent is a subagent, update the owning primary agent's
permission.taskallowlist. - Update
AGENTS.mdso the roster, responsibilities, and workflow rules stay synchronized. - Review
commands/*.mdif the new agent changes how/init,/plan,/build, or/continueshould behave. - Review
opencode.jsoncfor conflicting overrides, disable flags, or provider drift.
Manual Verification Checklist (No Validation Script)
Run this checklist before claiming completion:
agents/<agent-name>.mdexists and frontmatter is valid and consistent with peers.- Agent instructions clearly define role, scope, escalation rules, and constraints.
- The owning primary agent includes the correct
permission.taskrule for the subagent. AGENTS.mdroster row exists and matches the agent name, role, and model.commands/*.mdandopencode.jsoncstill reflect the intended workflow.- Terminology stays consistent: agents in
agents/*.md, skills inskills/*/SKILL.md.