Skip to content

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 patterns

MCP Server Management

/mcp
View and manage connected MCP servers

Quick Reference

CommandPurposeWhen to Use
/clearStart freshConversation gets off track
/compactReduce contextLong conversation needs focus
/modelChange modelNeed different capabilities
/memoryEdit contextUpdate project conventions
/mcpManage serversConfigure tool access
/initInitialize projectStarting new project
/statusCheck statusVerify 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.

Built with VitePress and powered by Claude Code