Slash Commands
Essential slash commands for Claude Code sessions.
Core Commands
Session Management
/clear- Clear conversation history and start fresh/compact [focus]- Compact conversation, optionally focusing on specific topic/model- Select or change the AI model you're using
Configuration
/memory- Edit CLAUDE.md memory files for project context/init- Initialize project with CLAUDE.md guide/mcp- Manage MCP server connections and OAuth authentication
Account & Status
/context- Visualize current context usage as a colored grid/status- View account and system statuses/login- Switch between Anthropic accounts/logout- Sign out from current account/help- Get usage help
Common Usage Examples
Starting Fresh
/clear
"Let's start over with the authentication module"Focusing Conversation
/compact focus on database schema
"Now let's optimize the queries"Switching Models
/model
Select: claude-3-opus-20240229
"Generate comprehensive test suite"Managing Project Context
/memory
Edit CLAUDE.md with project conventions and patternsMCP Server Management
/mcp
View and manage connected MCP serversQuick Reference
| Command | Purpose | When to Use |
|---|---|---|
/clear | Start fresh | Conversation gets off track |
/compact | Reduce context | Long conversation needs focus |
/model | Change model | Need different capabilities |
/memory | Edit context | Update project conventions |
/mcp | Manage servers | Configure tool access |
/init | Initialize project | Starting new project |
/status | Check status | Verify system state |
Complete Reference
For all available slash commands and their options: Official Slash Commands Documentation
Note: Custom commands and advanced configurations are covered in Steering.
Related
- Keyboard Shortcuts - Speed up your Claude Code interactions
- Interaction Modes - Master different conversation styles
- Advanced Steering - Combine commands with steering techniques