oc-create-command skill
Guides users through an interactive interview to create, configure, and validate new OpenCode command markdown files.
- GitHub stars
- 45
- Files
- 1
- Last commit
- May 31, 2026
- License
- MIT
- Allowed tools
- 7
What does the oc-create-command skill do?
oc-create-command guides users through an interactive interview to create, configure, and validate new OpenCode command markdown files.
Summary generated from the skill's SKILL.md.
About the oc-create-command skill
Building new OpenCode command markdown files through a structured interview is the primary function of this skill. It is designed for developers who need to automate workflows, create template tasks, or execute scripted operations within the OpenCode platform. The process begins by loading platform overviews and command guides from specific reference directories to ensure accuracy.
An agent should load this skill when a user requests to create, build, or configure a new OpenCode command. The workflow uses the AskUserQuestion tool to conduct a multi-round interview covering command names, purposes, $VARIABLE configurations, model overrides, and agent routing. Once requirements are gathered, the skill coordinates with a generator agent to produce the file and a validator agent to check the result against the command guide. The final output is a validated markdown file located in a project, global, or custom directory.
What an agent can do with it
- 1Configure variable inputsYou can set up commands that require specific user-provided information through $VARIABLE placeholders.
- 2Assign specific AI modelsDevelopers can specify whether a command should use a particular model like Opus, Sonnet, or Haiku for specialized reasoning.
- 3Ensure file accuracyThe skill automatically runs a validation agent to confirm the generated markdown file meets all platform requirements.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the oc-create-command skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the oc-create-command skill in Plugin
/plugin marketplace add sequenzia/agent-alchemy /plugin install agent-alchemy-opencode-tools@agent-alchemy
Install the oc-create-command skill in Claude Code
~/.claude/skills/oc-create-command/SKILL.md
$ npx degit sequenzia/agent-alchemy/claude/opencode-tools/skills/oc-create-command ~/.claude/skills/oc-create-commandInstall the oc-create-command skill in Claude Code (project)
.claude/skills/oc-create-command/SKILL.md
$ npx degit sequenzia/agent-alchemy/claude/opencode-tools/skills/oc-create-command .claude/skills/oc-create-commandInstall the oc-create-command skill in Codex
~/.agents/skills/oc-create-command/SKILL.md
$ npx degit sequenzia/agent-alchemy/claude/opencode-tools/skills/oc-create-command ~/.agents/skills/oc-create-commandInstall the oc-create-command skill in Gemini CLI
~/.gemini/skills/oc-create-command/SKILL.md
$ npx degit sequenzia/agent-alchemy/claude/opencode-tools/skills/oc-create-command ~/.gemini/skills/oc-create-commandInstall the oc-create-command skill in Claude.ai
npx degit sequenzia/agent-alchemy/claude/opencode-tools/skills/oc-create-command oc-create-command && zip -r oc-create-command.zip oc-create-command # claude.ai → Customize → Skills → + → Create skill → Upload a skill → oc-create-command.zip
SKILL.md
View on GitHubCreate OpenCode Command
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.
Critical Rules
AskUserQuestion is MANDATORY
IMPORTANT: You MUST use the AskUserQuestion tool for ALL questions to the user. Never ask questions through regular text output.
Phase 1: Load References
Read the OpenCode platform overview and command guide:
- Read
${CLAUDE_PLUGIN_ROOT}/references/platform-overview.md - Read
${CLAUDE_PLUGIN_ROOT}/references/command-guide.md
Phase 2: Interview
Gather requirements through a structured interview.
Round 1: Basics
Question 1 — Command Name:
- Header: "Command Name"
- Question: "What should this command be named? It will be invoked as
/{name}. Use kebab-case." - Options:
- "I'll type the name" — Let me provide a custom name
Question 2 — Purpose:
- Header: "Purpose"
- Question: "What does this command do?"
- Options:
- "Workflow shortcut" — Automates a frequently used multi-step process
- "Template task" — Structured prompt with variable inputs
- "Scripted operation" — Executes specific tool sequences
- "Custom" — I'll describe it
Question 3 — Description:
- Header: "Description"
- Question: "Briefly describe what this command does (shown in the command list)."
- Options:
- "I'll type a description" — Let me write a custom description
Round 2: Variables & Model
Question 1 — Variables:
- Header: "Variables"
- Question: "Does the command need user-provided input via $VARIABLE placeholders?"
- Options:
- "Yes, I'll list them" — I need specific named variables
- "Just $ARGUMENTS" — A single free-text argument
- "No variables" — The command works without user input
- multiSelect: false
If "Yes":
Question 2 — Variable Names:
- Header: "Var Names"
- Question: "List the variable names (e.g., FILE_PATH, TARGET_BRANCH, OUTPUT_FORMAT). Each becomes a $VARIABLE prompt."
- Options:
- "I'll type them" — Let me list the variable names
Question 3 — Model Override:
- Header: "Model"
- Question: "Should this command use a specific model? (Commands are the only extension type with per-invocation model override.)"
- Options:
- "No override (Recommended)" — Use the session's current model
- "Opus" — Use anthropic/claude-opus-4-6 for complex reasoning
- "Sonnet" — Use anthropic/claude-sonnet-4-6 for balanced performance
- "Haiku" — Use anthropic/claude-haiku-4-5 for speed
- multiSelect: false
Question 4 — Agent Routing:
- Header: "Agent"
- Question: "Should this command be routed to a specific agent?"
- Options:
- "No (Recommended)" — Use the current agent context
- "Yes" — Route to a specific named agent
- multiSelect: false
Round 3: Location
Question 1 — Location:
- Header: "Location"
- Question: "Where should the command be created?"
- Options:
- "Project (.opencode/commands/)" — Available only in this project
- "Global (~/.config/opencode/commands/)" — Available in all projects
- "Custom path" — I'll specify the directory
- multiSelect: false
Interview Summary
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:
- Header: "Confirm"
- Question: "Does this look correct? Ready to generate the command?"
- Options:
- "Yes, generate it"
- "Make changes"
Phase 3: Generate
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}
Phase 4: Validate
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.
Phase 5: Present
Present the generated command:
- Read the generated file
- Show the file contents
- Explain key design decisions:
- $VARIABLE placeholder usage
- Model override rationale (if applicable)
- Why command vs skill was the right choice
- Show validation results
- Explain how to invoke:
/{name}in the OpenCode TUI - If variables are present, show what the user will be prompted for
CRITICAL: Complete ALL 5 phases before finishing.
Files in this skill
1oc-create-command skill questions
How do I install the oc-create-command skill in Claude Code?
Run npx degit sequenzia/agent-alchemy/claude/opencode-tools/skills/oc-create-command ~/.claude/skills/oc-create-command. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the oc-create-command skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
How do I create a new OpenCode command?
You can initiate the process by asking to create a new OpenCode command, build a command for OpenCode, or create an OpenCode command markdown file.
Can I specify a specific AI model for an OpenCode command?
Yes, commands are the only extension type that allow for a per-invocation model override, such as Opus, Sonnet, or Haiku.