Slash commands control Claude Code session behavior, context, configuration, and integrations. Type / to list all available commands in your installed version.
Key Points
Command availability may vary by version; use / in the prompt to see what is available now.
Some commands have sub-options (e.g. /model lets you pick from available Claude models).
Keyboard shortcut reference: press ? while in the session.
Commands prefixed with ! run raw shell commands inline (e.g. !ls).
/rewind is within-session only (undo turns); /resume is cross-session (reload a previous session).
Emergency Quick Reference
When something is broken or unexpected → /doctor/status/help
Command Reference
Conversation Management
Command
Description
/clear
Clear conversation history (context window).
/compact
Compress the conversation into a summary to free context space.
/rewind
Undo the last turn(s) in the current session (within-session only).
/resume
Resume a previous session by selecting from session history (cross-session).
/export
Export the current conversation to a file.
/rename
Rename the current session.
Setting Management
Command
Description
/config
View or modify Claude Code configuration settings.
/model
Switch the active Claude model for the session.
/theme
Change the UI color theme.
/vim
Toggle vim keybindings for the input prompt.
Tools & Integration
Command
Description
/agents
Manage and inspect sub-agents.
/hooks
View and configure event hooks (triggered on tool calls, session events, etc.).
/ide
Configure IDE integration settings.
/mcp
List connected MCP servers and their available tools.
/skills
List and manage loaded skills.
/plugin
Manage Claude Code plugins.
Account & Permissions
Command
Description
/login
Switch to a different Anthropic account.
/logout
Sign out of the current Anthropic account.
/permissions
View or update file/command permission settings.
/usage
Show account-level usage and quota statistics.
File & Project Operations
Command
Description
/init
Scan the project and generate a CLAUDE.md with a project overview.
/memory
Open and edit CLAUDE.md memory files (project or global).
/add-dir
Add an additional directory to Claude Code’s working context.
/pr-comments
Fetch and display comments from an open GitHub pull request.
/review
Ask Claude to review staged or recent changes.
/security-review
Run a security-focused review of the current codebase or changes.
Info & Status
Command
Description
/context
Show what is currently loaded in the context window.
/cost
Show token usage and estimated cost for the current session.
/doctor
Run a health check on the Claude Code installation.
/help
Show available commands and usage guide.
/stats
Show session statistics (turns, tokens, tool calls).
/status
Show account, billing, and session status.
Utilities
Command
Description
/plan
Enter plan mode to design an implementation before writing code.
/todos
View and manage the current session’s to-do list.
/terminal-setup
Install shell integration (enables Shift+Enter for newline).
/statusline
Configure the status line display.
/release-notes
View the changelog for the current Claude Code version.
Keyboard Shortcuts
Shortcut
Action
Ctrl+C
Cancel the current operation or clear the input line.
Ctrl+D
Exit Claude Code.
↑ / ↓
Navigate command history.
Shift+Enter
Insert a newline (requires /terminal-setup first).
Esc
Clear the current input.
?
Show keyboard shortcut reference.
Examples
Switch model: /model
Initialize project memory: /init
Undo last response: /rewind
Come back to yesterday’s session: /resume
Add a second repo to context: /add-dir ../other-project