SOP-009: Slash Commands
DOCUMENT CONTROL
| Field | Value |
|---|---|
| SOP ID | SOP-009 |
| Version | 1.0 |
| Status | Active |
Purpose
Create and use custom slash commands to automate repetitive tasks in Claude Code.
Built-in Commands
| Command | Description |
|---|---|
| /help | Show help |
| /config | Open settings |
| /clear | Clear conversation |
| /compact | Compress context |
| /cost | Show token usage |
| /model | Switch model |
| /memory | Manage memory |
| /mcp | MCP server status |
| /doctor | Run diagnostics |
| /quit | Exit Claude Code |
Custom Commands
Create markdown files in .claude/commands/ directory.
Example: .claude/commands/review.md with your review prompt.
Usage: Type /review in Claude Code.
Command with Arguments
Use ARGS variable in your command file to accept arguments.
Example: /test auth module passes auth module as ARGS.
Project vs User Commands
| Location | Scope |
|---|---|
| .claude/commands/ | Project only |
| ~/.claude/commands/ | All projects |
Best Practices
Command Tips
- Keep commands focused on single tasks
- Use clear, descriptive names
- Include context in the prompt
- Document complex commands