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 gathering requirements, choosing templates, and validating naming, arguments, and frontmatter when users want to build commands.
/plugin marketplace add BrendanShields/spec-flow/plugin install spec@spec-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
reference.mdtemplates/basic.mdtemplates/with-args.mdtemplates/workflow.mdGuides 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:
---
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.
| 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 |
| 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 |
---
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 for detailed best practices and anti-patterns.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.