command-creator
БесплатноБез исполняемых скриптовНе проверенCreate custom /slash commands for repetitive tasks. Use proactively for command creation, prompt automation, or workflow shortcuts. Examples: - user: "Make a…
от IgorWarzocha★ 121 звезда на GitHubОб этом скилле
Command Creator
Create custom slash commands for repetitive tasks in OpenCode.
Command creation is conversational, not transactional.
- MUST NOT assume what the user wants—ask
- SHOULD start simple, add complexity only if needed
- MUST show drafts and iterate based on feedback
Batching: Use the question tool for 2+ related questions. Single questions → plain text.
Syntax: header ≤12 chars, label 1-5 words, add "(Recommended)" to default.
When to ask: Vague request ("make a command"), or multiple implementation approaches exist.
Command Locations
| Scope | Path |
|---|---|
| Project | .opencode/command/<name>.md |
| Global | ~/.config/opencode/command/<name>.md |
Template Placeholders (CRITICAL)
- Single Insertion: Each placeholder (
$ARGUMENTS,$1,@filename, etc.) MUST be inserted ONLY ONCE in the command body. - Dedicated Blocks: Use dedicated XML blocks for user inputs and file contents to keep the objective and instructions clean.
- Preference: Prefer using a single argument (
$ARGUMENTS) over complex positional ones unless strictly necessary.
BAD: "Do $ARGUMENTS and then check $ARGUMENTS for errors."
GOOD:
<user_guidelines>
$ARGUMENTS
</user_guidelines>
<context>
@src/schema.ts
</context>
<objective>
Analyze findings based on user guidelines and the provided schema.
</objective>
| Placeholder | Description | Example |
|---|---|---|
$ARGUMENTS |
All arguments passed | /cmd foo bar → "foo bar" |
$1, $2, $3 |
Positional arguments | /cmd foo bar → $1="foo", $2="bar" |
!command |
Shell output injection | !ls -F |
@filename |
Include file content | @src/index.ts |
Terminology Standard
- Direct Address: You MUST use "you" (referring to the agent executing the command) instead of "the agent" or "opencode".
Command File Format
---
description: 3-word command summary
agent: build # Optional: build, plan, or custom agent
model: provider/model-id # Optional: override model
subtask: true # Optional: run as subagent
---
<summary>
Line 1: You MUST [purpose].
Line 2: You SHOULD [inputs].
Line 3: You MUST [outcome].
</summary>
<user_guidelines>
$ARGUMENTS
</user_guidelines>
Template body goes here.
Frontmatter Options
| Field | Purpose | Required |
|---|---|---|
description |
Shown in command list | RECOMMENDED |
agent |
Route to specific agent | No |
model |
Override model | No |
subtask |
Force subagent invocation | No |
Conceptual Boundary (CRITICAL)
- Commands are for USERS: They are high-level shortcuts for humans to trigger an agent with specific context.
- Agents CANNOT use commands: Agents lack a terminal interface to "type" commands. They execute the template body provided by the command.
- One-Way Street: User -> Command -> Agent.
- NEVER tell an agent to use a command "proactively"—they literally cannot.
- If logic needs to be shared, put it in a Skill (script/instruction), not a Command.
Shell Commands in Templates
Use the !command syntax to inject bash output into your prompt. The shell execution is triggered by an exclamation mark followed by the command wrapped in backticks:
Review recent changes:
!`git log --oneline -10`
Suggest improvements.
File References
Use @ to include file content:
Given the schema in @prisma/schema.prisma, generate a migration for $ARGUMENTS.
Phase 1: Understand the Task
"What task do you want to automate?"
- Get the repetitive prompt/workflow
- Examples: "run tests", "review this file", "create a component"
"Can you show me how you'd normally ask for this?"
- Get the actual prompt they'd type
- This becomes the template body
Phase 2: Inputs & Routing
"Does it need arguments?"
- If they mention "this file", "a name", "the function" → yes
- Explain:
/command foo bar→$ARGUMENTS= "foo bar",$1= "foo",$2= "bar"
"Should it make changes or just analyze?"
- Changes → default agent (build)
- Analysis only → set
agent: plan
"Should it run as a background subtask?"
- Long-running or parallel work → set
subtask: true - Interactive or quick → leave unset
- Long-running or parallel work → set
"Project-specific or use everywhere?"
- Project →
.opencode/command/ - Global →
~/.config/opencode/command/
- Project →
Phase 3: Review & Refine
- Show the draft command, ask for feedback
- "He
Установить command-creator в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл command-creator?
Create custom /slash commands for repetitive tasks. Use proactively for command creation, prompt automation, or workflow shortcuts. Examples: - user: "Make a /test command that runs pytest" → create command in opencode.json, set prompt to run tests with bash tool - user: "Add a /review command for PRs" → design prompt to fetch diff, analyze changes, generate review comments - user: "Automate this repetitive task" → identify pattern, create slash command with parameterized prompt - user: "Make a /deploy command" → design workflow (build, test, deploy), encode in command prompt
Как установить скилл command-creator?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл command-creator запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic