claude/opencode-tools/skills/oc-create-command/SKILL.md
Guides through creating a new OpenCode command with interactive interview, $VARIABLE configuration, and validation. Use when user says "create opencode command", "new opencode command", "build command for opencode", or wants to create an OpenCode command markdown file.
npx skillsauth add sequenzia/agent-alchemy oc-create-commandInstall 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.
You are initiating the OpenCode command creation workflow. This process guides the user through an interactive interview to gather requirements, generates a properly formatted command markdown file, and validates the result.
IMPORTANT: You MUST use the AskUserQuestion tool for ALL questions to the user. Never ask questions through regular text output.
Read the OpenCode platform overview and command guide:
${CLAUDE_PLUGIN_ROOT}/references/platform-overview.md${CLAUDE_PLUGIN_ROOT}/references/command-guide.mdGather requirements through a structured interview.
Question 1 — Command Name:
/{name}. Use kebab-case."Question 2 — Purpose:
Question 3 — Description:
Question 1 — Variables:
If "Yes":
Question 2 — Variable Names:
Question 3 — Model Override:
Question 4 — Agent Routing:
Question 1 — Location:
Present a summary:
## Command Summary
- **Name**: {name} (invoked as /{name})
- **Description**: {description}
- **Variables**: {list of $VARIABLE names or "none"}
- **Model override**: {model or "none"}
- **Agent**: {agent name or "none"}
- **Location**: {path}
Use AskUserQuestion to confirm:
Spawn the generator agent:
Task:
subagent_type: "agent-alchemy-opencode-tools:oc-generator"
prompt: |
Generate an OpenCode command with these specifications:
Type: command
Name: {name}
Description: {description}
Variables: {list of $VARIABLE names}
Model override: {model or "none"}
Agent: {agent name or "none"}
Subtask: {true/false}
Purpose: {detailed purpose from interview}
Target path: {target directory}/commands/{name}.md
NOTE: Commands support `agent` (which agent executes) and `subtask` (force subagent execution) frontmatter fields in addition to `model` and `description`.
Reference guide: ${CLAUDE_PLUGIN_ROOT}/references/command-guide.md
Template: ${CLAUDE_PLUGIN_ROOT}/references/templates/command-template.md
Interview notes:
{all gathered requirements}
Spawn the validator agent:
Task:
subagent_type: "agent-alchemy-opencode-tools:oc-validator"
prompt: |
Validate the following OpenCode artifact:
Type: command
Path: {path to generated file}
Reference guide: ${CLAUDE_PLUGIN_ROOT}/references/command-guide.md
If validation fails with errors, fix and re-validate.
Present the generated command:
/{name} in the OpenCode TUICRITICAL: Complete ALL 5 phases before finishing.
development
Systematic, hypothesis-driven debugging workflow with triage-based track routing. Use when asked to "fix this bug", "debug this", "why is this failing", "this is broken", "investigate this error", "track down this issue", or any debugging situation. Supports --deep flag to force full investigation.
development
Executes diagnostic investigation tasks to test debugging hypotheses. Runs tests, traces execution, checks git history, and reports evidence. (converted from agent)
content-media
Provides architectural pattern knowledge for designing feature implementations including MVC, event-driven, microservices, and CQRS patterns. Use when designing system architecture or choosing implementation patterns.
documentation
Provides Mermaid diagram syntax, best practices, and styling rules for technical visualizations. Use when creating diagrams, flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, architecture diagrams, C4 diagrams, or any visual documentation in markdown.