2.7 KiB
2.7 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 and checks.
Source of Truth
- Agent definition file:
agents/<agent-name>.md - Dispatch permissions for new dispatchable agents:
agents/lead.mdpermission.task.<agent-name>: allowmust be present for lead dispatch.
- Human-readable roster:
AGENTS.md- Keep the roster table synchronized with actual agent files.
- Runtime overrides:
opencode.jsonc- May override/disable agent behavior.
- Does not register a new agent.
Agent File Conventions
For agents/<agent-name>.md:
- Use frontmatter first, then concise role instructions.
- Keep tone imperative and operational.
- Include only permissions and behavior needed for the role.
- Align with existing files such as
agents/lead.mdandagents/coder.md.
Typical frontmatter fields in this repo include:
descriptionmodemodel(for subagents where needed)temperaturepermissionpermalink
Mirror nearby agent files instead of inventing new metadata patterns.
Note: agents/lead.md is the only mode: primary agent. New agents should normally mirror a comparable subagent and use mode: subagent with an explicit model.
Practical Workflow (Create or Update)
- Inspect
agents/lead.mdand at least one similaragents/*.mdfile. - Create or edit
agents/<agent-name>.mdwith matching local structure. - If the agent must be dispatchable, add
permission.task.<agent-name>: allowinagents/lead.md. - Update
AGENTS.mdroster entry to match the new/updated agent. - Review
opencode.jsoncfor conflicting overrides/disable flags.
Manual Verification Checklist (No Validation Script)
Run this checklist before claiming completion:
agents/<agent-name>.mdexists and frontmatter is valid/consistent with peers.- Agent instructions clearly define role, scope, and constraints.
agents/lead.mdincludespermission.task.<agent-name>: allowif dispatch is required.AGENTS.mdroster row exists and matches agent name/role/model.opencode.jsoncdoes not unintentionally disable or override the new agent.- Terminology stays consistent: agents in
agents/*.md, skills inskills/*/SKILL.md.