Skill · Prompt Engineering
Command development
Creates, edits, and organizes Claude Code slash commands as markdown files with YAML frontmatter, and explains command features. Use when the user wants a new slash command, wants to modify or namespace existing commands, or asks about $ARGUMENTS, @ file references, or frontmatter fields.
How to use it
- Start your plan and connect your AI once
- Ask for the task in your own words, or say it directly:
Use the Command development skill to help me with this.Without a connection: copy the SKILL.md below into your AI's project instructions.
Command Development
Helps users create, edit, organize, and understand Claude Code slash commands stored as markdown files. For users who want working command files with correct frontmatter, argument handling, and directory structure.
When to use
- User asks to create a new slash command
- User wants to change an existing command's frontmatter, prompt content, arguments, or file references
- User has many commands and wants them organized into namespaces
- User asks how command structure, YAML frontmatter, dynamic arguments, @ file references, or bash execution work
Workflows
Create a slash command
Inputs: command name, location (project .claude/commands/ or personal ~/.claude/commands/), prompt content written as instructions to Claude (not to the user), and any frontmatter fields: description, allowed-tools, model, argument-hint, disable-model-invocation.
- Interview the user once for name, location, prompt content, and frontmatter fields.
- Save these preferences and do not ask again in later sessions.
- Generate the markdown file with proper frontmatter and instructions.
- Present the file as a draft for review before writing it.
Check: Frontmatter is valid YAML, the prompt is addressed to Claude, and the target path is inside a commands directory. Output: The full draft markdown file, then the written file after approval.
Edit or update an existing command
Inputs: the command to change and the current file contents.
- Read the current file from the appropriate commands directory.
- Ask what to change: frontmatter fields, prompt content, argument handling, or file references.
- Apply the changes.
- Present a diff or the full updated file as a draft.
Check: The diff shows only the intended changes and frontmatter still parses. Output: Diff or full updated file; overwrite only after user approval.
Organize commands into namespaces
Inputs: the current list of commands and their categories.
- List the current commands.
- Suggest a namespaced directory structure (e.g.,
ci/,git/,docs/) based on the categories. - Propose a reorganization plan as a draft.
- Record the original locations for rollback.
- Move files only after user approval.
Check: Every command appears exactly once in the plan and original paths are recorded. Output: Reorganization plan draft, then the moves performed after approval.
Explain command features and best practices
Inputs: the specific feature the user is asking about.
- Explain command structure, YAML frontmatter fields, dynamic arguments (
$ARGUMENTS,$1,$2, etc.), file references using@syntax, bash execution for context, or command organization patterns. - Give clear examples with each explanation.
- Do not invent features that do not exist.
Check: Every claim matches documented command behavior. Output: Explanation with examples.
Tools and data
- Use file system access to
.claude/commands/and~/.claude/commands/when available; if not available, ask the user to provide the file contents or connect it.
Guardrails
- Never write or modify any file outside
.claude/commands/or~/.claude/commands/. - Always present command files as drafts for user review before writing them to disk.
- Never execute bash commands or run the commands you create.
- If the request falls outside command creation, editing, organization, or explanation, decline and redirect to that scope.
Getting started
Ask what the user wants to do: create a new command, edit an existing one, organize commands, or learn about command features. If they want to create, ask for the command name, location, and prompt content.
Credits
Adapted from an open-source original (MIT): https://www.aitmpl.com/component/skills/development/command-development