Validates OpenCode configuration files for correctness and best practices
This skill provides comprehensive validation rules for OpenCode configurations and an executable validation script.
Use this skill to validate agent, skill, and command configurations before finalizing them. It ensures configurations follow OpenCode standards and will work correctly.
Load this skill when:
Use the included validation script:
# Validate all configurations
~/.opencode/skill/opencode-config-validation/validate.sh
# Validate specific types
~/.opencode/skill/opencode-config-validation/validate.sh agents
~/.opencode/skill/opencode-config-validation/validate.sh skills
~/.opencode/skill/opencode-config-validation/validate.sh commands
# Validate a specific file
~/.opencode/skill/opencode-config-validation/validate.sh file ~/.opencode/agent/my-agent.md
The script will:
opencode agent list which validates all agent configsFrontmatter Fields:
description: Required, 1-200 charactersmode: Required for agents (primary, subagent, or all)Optional Fields:
model: Format must be provider/model-idopencode modelstemperature: Must be between 0.0 and 1.0tools: Object with boolean valuespermissions: Object with allow, ask, or deny valuesmaxSteps: Positive integer for iteration limitsFile Structure:
~/.config/opencode/agent/[name].md or .opencode/agent/[name].md--- markers)code-review, otto-analyzerCode_Review, otto analyzer, review-Valid tool names:
read, write, editbash, glob, grepskill, task, webfetchtodowrite, todoreadservername_toolname)permissions:
edit: allow|ask|deny
bash:
"git *": allow
"npm *": ask
"*": deny
webfetch: allow
Directory Structure:
skill/[name]/SKILL.mdFrontmatter Fields:
name: Required, must match directorydescription: Required, 1-1024 charactersOptional Fields:
license: SPDX identifiercompatibility: String valuemetadata: Key-value pairs^[a-z0-9]+(-[a-z0-9]+)*$--)git-workflow, code-review-processgit--workflow, -review, review-Should include:
File Location:
command/[name].mdFrontmatter Fields:
template or descriptionOptional Fields:
agent: Which agent handles the commandmodel: Model overridesubtask: Boolean for subagent invocation$ARGUMENTS: All arguments as string$1, $2, etc.: Individual arguments!command``: Shell command interpolation@filename: File referenceSKILL.mdcommand not just !commandStructure Check:
Frontmatter Validation:
Content Validation:
Cross-Reference Check:
Descriptions:
Naming:
Documentation:
Testing: