Skip to main content
Slash commands are invoked with the / prefix inside the Claude Code REPL. You can also run them directly from the terminal with claude /command.

Using commands

Type / followed by the command name at the REPL prompt:
> /help
> /doctor
> /commit
You can also run any command non-interactively:
claude /doctor
claude /review

Command reference

Session & navigation

CommandDescription
/helpShow available commands and keyboard shortcuts
/exitExit the REPL
/clearClear the conversation and start fresh
/resumeRestore a previous conversation session
/contextVisualize the current context window usage
/compactCompress conversation history to free up context space

Git & code

CommandDescription
/commitAnalyze staged changes and create a commit with a generated message
/reviewReview current code changes for bugs, style, and best practices
/diffView current git diff
/pr_commentsFetch and display open PR review comments
/branchCreate or switch git branches

Settings & configuration

CommandDescription
/configView and set configuration options
/modelSwitch between Claude models
/themeChange the terminal color theme
/vimToggle vim keybinding mode
/effortAdjust Claude’s reasoning effort level
/output-styleChange Claude’s response format

Memory & context

CommandDescription
/memoryView, add, and manage persistent memory entries
/costShow token usage and cost for the current session
/statsView session statistics

Integrations

CommandDescription
/mcpManage MCP server connections
/skillsList and manage reusable skill workflows
/desktopHand off session to the Claude desktop app
/mobileHand off session to the Claude mobile app
/shareShare a session link

Diagnostics & auth

CommandDescription
/doctorCheck environment, authentication, and connectivity
/versionShow the installed Claude Code version
/loginAuthenticate with your Anthropic account
/logoutSign out of your Anthropic account
/upgradeUpgrade Claude Code to the latest version
Run /help inside the REPL at any time to see a quick reference of all available commands and keyboard shortcuts.

Build docs developers (and LLMs) love