creating-commands
Creates new Claude Code slash commands following best practices. Guides through command structure, naming, arguments, and frontmatter. Use when user wants to create a command, build a slash command, or asks about command best practices.
Best use case
creating-commands is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Creates new Claude Code slash commands following best practices. Guides through command structure, naming, arguments, and frontmatter. Use when user wants to create a command, build a slash command, or asks about command best practices.
Creates new Claude Code slash commands following best practices. Guides through command structure, naming, arguments, and frontmatter. Use when user wants to create a command, build a slash command, or asks about command best practices.
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "creating-commands" skill to help with this workflow task. Context: Creates new Claude Code slash commands following best practices. Guides through command structure, naming, arguments, and frontmatter. Use when user wants to create a command, build a slash command, or asks about command best practices.
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/creating-commands/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How creating-commands Compares
| Feature / Agent | creating-commands | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Creates new Claude Code slash commands following best practices. Guides through command structure, naming, arguments, and frontmatter. Use when user wants to create a command, build a slash command, or asks about command best practices.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Creating Commands Guides creation of Claude Code slash commands using documented best practices. ## Quick Start For a new command: 1. Ask user for command purpose and arguments needed 2. Generate using appropriate template 3. Validate against checklist For reviewing existing command: 1. Read command file 2. Check against anti-patterns in [reference.md](reference.md) 3. Report issues with fixes ## Workflow: Create New Command ``` Progress: - [ ] Gather requirements (purpose, arguments, scope) - [ ] Choose template (basic, with-args, workflow) - [ ] Generate command file - [ ] Validate against checklist ``` ### Step 1: Gather Requirements Ask user with AskUserQuestion: - What should this command do? (purpose) - Does it need arguments? (none, single, multiple) - Project or personal? (scope) ### Step 2: Choose Template | Type | Template | When to Use | |------|----------|-------------| | Basic | [templates/basic.md](templates/basic.md) | No arguments, simple prompt | | With Args | [templates/with-args.md](templates/with-args.md) | Single or multiple arguments | | Workflow | [templates/workflow.md](templates/workflow.md) | Integrates with skills/agents | ### Step 3: Generate Command Create in appropriate location: - `.claude/commands/` - Project commands (git-tracked) - `~/.claude/commands/` - Personal commands (your machine only) ### Step 4: Validate Run through checklist before finishing: ``` Validation Checklist: - [ ] Name: lowercase with hyphens only - [ ] Name: descriptive, verb-noun format preferred - [ ] Description: explains what command does - [ ] Arguments: documented with argument-hint if used - [ ] Prompt: clear, actionable instructions - [ ] Tools: allowed-tools declared if needed ``` ## Naming Rules **Format**: `verb-noun` or `action` (lowercase, hyphens) - `fix-issue` - `review-pr` - `run-tests` - `optimize` **Constraints**: - Lowercase letters, numbers, hyphens only - No spaces or underscores - Keep concise (1-3 words) ## Command File Format ```markdown --- description: Brief explanation shown in help allowed-tools: - Bash(bash:*) - WebSearch argument-hint: "param_name" --- Your command prompt here. Use $ARGUMENTS for all args or $1, $2 for positional. ``` ## Argument Syntax | Syntax | Usage | Example | |--------|-------|---------| | `$ARGUMENTS` | All arguments as one string | `/cmd foo bar` → `foo bar` | | `$1`, `$2` | Positional arguments | `/cmd foo bar` → `$1=foo`, `$2=bar` | | `@file` | Include file contents | `Review @src/main.ts` | ## Frontmatter Options | Field | Purpose | Required | |-------|---------|----------| | `description` | Shown in help, enables auto-invoke | Recommended | | `allowed-tools` | Tools the command can use | If using tools | | `argument-hint` | Documents expected args | If has args | | `model` | Specific model to use | Optional | ## Example: Basic Command ```markdown --- description: Run all tests and report failures allowed-tools: - Bash(npm:*) --- Run the test suite and summarize results: 1. Execute `npm test` 2. If failures, show failing tests with context 3. Suggest fixes for common issues ``` See [reference.md](reference.md) for detailed best practices and anti-patterns.
Related Skills
pentest-commands
This skill should be used when the user asks to "run pentest commands", "scan with nmap", "use metasploit exploits", "crack passwords with hydra or john", "scan web vulnerabilities with nikto", "enumerate networks", or needs essential penetration testing command references.
when-creating-slash-commands-use-slash-command-encoder
Create ergonomic slash commands for fast access to micro-skills with auto-discovery and parameter validation
when-creating-skill-template-use-skill-builder
Create new Claude Code Skills with proper YAML frontmatter, progressive disclosure structure, and complete directory organization
when-creating-presentations-use-pptx-generation
Enterprise-grade PowerPoint deck generation using evidence-based prompting, workflow enforcement, constraint-based design
creating-issues
Issue creation expertise and convention enforcement. Auto-invokes when creating issues, writing issue descriptions, asking about issue best practices, or needing help with issue titles. Validates naming conventions, suggests labels, and ensures proper metadata.
creating-feedback-loops
Expert at creating continuous improvement feedback loops for Claude's responses. Use when establishing self-improvement processes, tracking progress over time, or implementing iterative refinement workflows.
building-commands
Expert at creating and modifying Claude Code slash commands. Auto-invokes when the user wants to create, update, modify, enhance, validate, or standardize slash commands, or when modifying command YAML frontmatter fields (especially 'model', 'allowed-tools', 'description'), needs help designing command workflows, or wants to understand command arguments and parameters. Also auto-invokes proactively when Claude is about to write command files (*/commands/*.md), or implement tasks that involve creating slash command components.
creating-agents
Creates Claude Code subagents for task delegation. Guides through agent configuration, tool selection, and system prompts. Use this skill when the user wants to create a new agent, delegate tasks to specialists, or asks about subagents.
creating-bauplan-pipelines
Creates bauplan data pipeline projects with SQL and Python models. Use when starting a new pipeline, defining DAG transformations, writing models, or setting up bauplan project structure from scratch.
creating-financial-models
This skill provides an advanced financial modeling suite with DCF analysis, sensitivity testing, Monte Carlo simulations, and scenario planning for investment decisions
creating-claude-hooks
Use when creating or publishing Claude Code hooks - covers executable format, event types, JSON I/O, exit codes, security requirements, and PRPM package structure
creating-claude-agents
Use when creating or improving Claude Code agents. Expert guidance on agent file structure, frontmatter, persona definition, tool access, model selection, and validation against schema.