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.
Guides creation of Claude Code slash commands using documented best practices.
For a new command:
For reviewing existing command:
Progress:
- [ ] Gather requirements (purpose, arguments, scope)
- [ ] Choose template (basic, with-args, workflow)
- [ ] Generate command file
- [ ] Validate against checklist
Ask user with AskUserQuestion:
| Type | Template | When to Use |
|---|---|---|
| Basic | templates/basic.md | No arguments, simple prompt |
| With Args | templates/with-args.md | Single or multiple arguments |
| Workflow | templates/workflow.md | Integrates with skills/agents |
Create in appropriate location:
.claude/commands/ - Project commands (git-tracked)~/.claude/commands/ - Personal commands (your machine only)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
Format: verb-noun or action (lowercase, hyphens)
fix-issuereview-prrun-testsoptimizeConstraints:
---