Last Updated: March 2, 2026
Frontmatter Fields
Custom commands are defined in.claude/commands/<name>.md with optional YAML frontmatter.
What the command does. Shown in autocomplete and used by Claude for auto-discovery
Hint shown during autocomplete (e.g.,
[issue-number], [filename])Tools allowed without permission prompts when this command is active
Model to use when this command runs (e.g.,
haiku, sonnet, opus)String Substitutions
Available inside command markdown for dynamic values:| Variable | Description |
|---|---|
$ARGUMENTS | All arguments passed when invoking the command |
$ARGUMENTS[N] | Access a specific argument by 0-based index |
$N | Shorthand for $ARGUMENTS[N] (e.g., $0, $1) |
${CLAUDE_SESSION_ID} | Current session identifier |
!`command` | Dynamic context injection — shell command output replaces the placeholder before Claude sees it |
Invocation
Custom commands are invoked by typing/command-name in Claude Code’s interactive mode:
Direct Invocation
/command-name — Invoke directly from the command menuWith Arguments
/command-name [args] — Pass arguments that map to $ARGUMENTSAutocomplete
Type
/ to see all available commands with descriptionsSubdirectories
Commands in subdirectories use
/subdir:command-nameExample: Minimal Command
Example: Full-Featured Command (All Fields)
Scope and Priority
When multiple commands share the same name, the higher-priority location wins:| Location | Scope | Priority |
|---|---|---|
Project (.claude/commands/) | This project only | 1 (highest) |
Personal (~/.claude/commands/) | All your projects | 2 |
Plugin (<plugin>/commands/) | Where plugin is enabled | 3 (lowest) |
Claude Commands
Session Management
/clear
/clear
SessionClear conversation history and start fresh
/compact [instructions]
/compact [instructions]
SessionCompress conversation to free context window. Optional instructions focus the compaction
/exit
/exit
SessionExit the REPL
/fork
/fork
SessionFork the current conversation into a new session
/rename <name>
/rename <name>
SessionRename the current session for easier identification
/resume [session]
/resume [session]
SessionResume a previous conversation by ID or name, or open the session picker
/rewind
/rewind
SessionRewind conversation and/or code to an earlier point
/teleport
/teleport
SessionResume a remote session from claude.ai (subscribers only)
Context & Usage
/context
/context
ContextVisualize current context usage as a colored grid with token counts
/cost
/cost
ContextShow token usage statistics and spending for the current session
/stats
/stats
ContextVisualize daily usage, session history, streaks, and model preferences
/usage
/usage
ContextShow plan usage limits and rate limit status (subscription plans only)
Model Configuration
/fast
/fast
ModelToggle fast mode — same Opus 4.6 model with faster output
/model
/model
ModelSwitch models (haiku, sonnet, opus) and adjust effort level
/plan
/plan
ModelEnter read-only planning mode — suggests approaches without making changes
Project & Memory
/init
/init
ProjectInitialize a new project with CLAUDE.md guide
/memory
/memory
MemoryView and edit CLAUDE.md memory files (user, project, and local scope)
Configuration
/config
/config
ConfigOpen the interactive Settings interface with search functionality
/keybindings
/keybindings
ConfigCustomize keyboard shortcuts per context, create chord sequences
/permissions
/permissions
ConfigView or update tool permissions
/sandbox
/sandbox
ConfigConfigure sandboxing with dependency status
/statusline
/statusline
ConfigSet up Claude Code’s status line UI
/terminal-setup
/terminal-setup
ConfigEnable shift+enter for newlines in IDE terminals
/theme
/theme
ConfigChange the color theme
/vim
/vim
ConfigEnable vim-style editing mode
Extensions
/agents
/agents
ExtensionsManage custom subagents — view, create, edit, delete
/hooks
/hooks
ExtensionsInteractive interface to manage hooks
/ide
/ide
ExtensionsConnect to IDE integration
/mcp
/mcp
ExtensionsManage MCP server connections — add, enable, list, get info, OAuth
/plugin
/plugin
ExtensionsManage plugins — install, uninstall, enable, disable, browse marketplaces
/skills
/skills
ExtensionsView available skills and their descriptions
Debug & Troubleshooting
/debug [description]
/debug [description]
DebugTroubleshoot the current session by reading the debug log
/doctor
/doctor
DebugCheck the health of your Claude Code installation
/feedback
/feedback
DebugGenerate a GitHub issue URL for reporting bugs or feedback
/help
/help
DebugShow all available slash commands and usage help
/tasks
/tasks
DebugList and manage background tasks
/todos
/todos
DebugList current TODO items
Export & Authentication
/copy
/copy
ExportCopy the last assistant response to clipboard
/export [filename]
/export [filename]
ExportExport the current conversation to a file or clipboard
/login
/login
AuthAuthenticate with Claude Code via OAuth
/logout
/logout
AuthLog out from Claude Code
Sources
Slash Commands
Official documentation for built-in slash commands
Interactive Mode
Guide to Claude Code’s interactive REPL
CHANGELOG
Latest updates and feature releases
