Writing Slash Commands
Installation
SKILL.md
Slash Commands Guide
Slash commands are reusable prompt templates that automate recurring tasks in Claude Code. Define them once, invoke them anytime with /command-name [args].
Quick Start
Create a Command
Project-scoped (shared with team):
mkdir -p .claude/commands
echo "Analyze this code for performance issues:" > .claude/commands/optimize.md
Personal (across all projects):
mkdir -p ~/.claude/commands
echo "Review this code for security vulnerabilities:" > ~/.claude/commands/security-review.md