Skip to content

SOP-009: Slash Commands

DOCUMENT CONTROL

FieldValue
SOP IDSOP-009
Version1.0
StatusActive

Purpose

Create and use custom slash commands to automate repetitive tasks in Claude Code.

Built-in Commands

CommandDescription
/helpShow help
/configOpen settings
/clearClear conversation
/compactCompress context
/costShow token usage
/modelSwitch model
/memoryManage memory
/mcpMCP server status
/doctorRun diagnostics
/quitExit 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

LocationScope
.claude/commands/Project only
~/.claude/commands/All projects

Best Practices

Command Tips

  1. Keep commands focused on single tasks
  2. Use clear, descriptive names
  3. Include context in the prompt
  4. Document complex commands

Next Steps

Based on Official Claude Code Documentation