Guide for creating Claude Code slash commands with best practices. Use when the user wants to create a new slash command, asks about slash command structure, or needs help with command frontmatter, arguments, or tool restrictions.
From provenpx claudepluginhub mjmorales/claude-prove --plugin proveThis skill uses the workspace's default tool permissions.
references/best-practices.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Facilitates interactive brainstorming sessions using diverse creative techniques and ideation methods. Activates when users say 'help me brainstorm' or 'help me ideate'.
Create Claude Code slash commands following best practices for structure, frontmatter, and organization.
Shared conventions: See references/creator-conventions.md for the standard creator workflow (gather, generate, quality self-check, validate, review gate, commit).
Prompting best practices: See references/prompt-engineering-guide.md for optimization techniques to apply when generating command prompt content.
Use AskUserQuestion for discrete choices, free-form for open-ended questions.
Command purpose (free-form):
Command location — AskUserQuestion with header "Location":
.claude/commands/ — versioned with the repo)~/.claude/commands/ — available across all projects)commands/ — if adding to a prove-style plugin)Arguments — AskUserQuestion with header "Arguments":
$ARGUMENTS)$1, $2, etc.)Tool restrictions — AskUserQuestion with header "Tools":
allowed-tools)Read, Grep, Glob)Bash(git *))Skill delegation (conditional — only if the command is part of a plugin):
Refer to references/best-practices.md for frontmatter fields, tool restriction patterns, and argument handling.
Standard command structure:
---
description: [Action-oriented description — REQUIRED for model invocation]
argument-hint: [Expected arguments shown in autocomplete]
allowed-tools: [Tool restrictions if needed]
---
[Command prompt content here]
Plugin command structure (thin wrapper — keep all logic in the skill):
---
description: Do the thing
argument-hint: "[input]"
---
# Command Name: $ARGUMENTS
Load and follow the skill (`skills/<name>/SKILL.md` from the workflow plugin).
Apply the quality self-check from references/creator-conventions.md before presenting. Key checks for commands:
| Location | Path | Notes |
|---|---|---|
| Project | .claude/commands/<name>.md | Versioned with repo |
| User | ~/.claude/commands/<name>.md | Available across projects |
| Plugin | commands/<name>.md | Add scope to .claude/.prove.json |
| Namespaced | commands/<ns>/<name>.md | Invoked as /ns:name |
Before writing the file, verify:
description field is present (required for model invocation and /help)argument-hint is set if the command accepts argumentsUse AskUserQuestion with header "Review" to confirm: "Create Command" / "Revise".
Delegate to the commit skill. Example: feat(commands): add review command
references/best-practices.md — frontmatter fields, tool restriction patterns, argument handlingreferences/creator-conventions.md — shared creator workflow patternsreferences/prompt-engineering-guide.md — prompting techniques for command content