skills/opencode-command-creator/SKILL.md
Create custom OpenCode commands with proper structure, trigger descriptions, arguments, and configuration. Use when the user wants reusable slash/command workflows in OpenCode, needs `.opencode/commands/*.md` or `opencode.jsonc` entries, wants command templates with `$ARGUMENTS`, or needs to override/extend built-in commands safely.
npx skillsauth add Thomashighbaugh/opencode opencode-command-creatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when creating OpenCode custom commands that allow users to define reusable prompts and workflows.
Use this skill when the user wants to:
OpenCode commands can be defined in two ways:
Create .md files in:
~/.config/opencode/commands/.opencode/commands/Format:
---
description: Brief description of command
agent: agent-name (optional)
model: model-identifier (optional)
subtask: true/false (optional)
---
Command template with $ARGUMENTS placeholder
and other prompt content.
Example:
---
description: Run tests with coverage
agent: build
model: ollama/glm-5.1:cloud
---
Run the full test suite with coverage report and show any failures.
Focus on the failing tests and suggest fixes.
Add to opencode.jsonc:
{
"$schema": "https://opencode.ai/config.json",
"command": {
"command-name": {
"template": "Prompt template text",
"description": "Brief description",
"agent": "agent-name",
"model": "model-identifier",
"subtask": false
}
}
}
template: The prompt sent to the LLM when command executesdescription: Brief description shown in TUIagent: Which agent should execute the commandsubtask: Boolean to force subagent invocationmodel: Override default model for this commandUse placeholders in templates:
$ARGUMENTS - All arguments as single string$1, $2, $3, etc. - Individual positional argumentsExample:
Create a React component named $ARGUMENTS with TypeScript support.
Usage: /component Button
Inject bash command output with !`command`:
Here are the current test results:
!`npm test`
Based on these results, suggest improvements.
Include file content with @filename:
Review the component in @src/components/Button.tsx.
Check for performance issues.
---
description: Format all files
---
Run the code formatter on all source files and report any changes.
---
description: Create new feature
agent: code
---
Create a new feature for $ARGUMENTS.
Include tests and documentation.
---
description: Analyze git changes
---
Recent commits:
!`git log --oneline -10`
Review these changes and suggest improvements.
---
description: Full code review
agent: reviewer
model: ollama/glm-5.1:cloud
subtask: true
---
Review the following files: $ARGUMENTS
Check for:
1. Code quality issues
2. Security vulnerabilities
3. Performance problems
Current test status:
!`npm test`
$ARGUMENTS and positional paramssubtask: true to keep primary context cleanWhen creating a command:
/init, /undo, /redo, etc.)test.md → /test)tools
Analyze a codebase and auto-generate project-specific agents, skills, tools, and rules into .opencode/. Project wrappers inject deep project context into subagents for dramatically more effective AI assistance.
development
Synchronize opencode.jsonc with the latest OpenCode config schema from Context7. Checks schema, detects drift, and updates config to remain compliant.
development
Enforce the <Agent_Prompt> XML wrapper convention across all agent definition files. Scan, validate, and auto-fix non-compliant agents.
development
Auto-maintained vector DB for semantic search over .opencode/context/ — zero manual triggers needed