Zum Hauptinhalt springen

Slash Commands & Shortcuts

Claude Code's interactive mode provides built-in slash commands for controlling sessions, switching models, managing context, and more. Type / in the prompt to see all available commands, including your custom skills.

This page covers only the built-in commands. Custom skills (created in .claude/skills/) also appear in the / menu. See the Skills page for details.

Session & Navigation

CommandWhat it does
/helpShow help and available commands
/exitExit Claude Code (alias: /quit)
/clearClear conversation history and free up context (aliases: /reset, /new)
/resume [session]Resume a previous conversation by ID or name, or open the session picker (alias: /continue)
/fork [name]Create a fork of the current conversation at this point
/rename [name]Rename the current session (auto-generates a name if none provided)
/export [filename]Export current conversation as plain text
/copyCopy the last assistant response to clipboard (shows interactive picker for code blocks)
/rewindRewind conversation and code to a previous point, or summarize from a selected message (alias: /checkpoint)

Model & Output

CommandWhat it does
/model [model]Select or change the AI model. Use arrow keys to adjust effort level.
/fast [on|off]Toggle fast mode (same model, faster output)
/output-style [style]Switch between output styles: Default, Explanatory, or Learning
/planEnter plan mode (Claude analyzes and plans before writing code)

Context & Cost

CommandWhat it does
/contextVisualize current context usage as a colored grid
/compact [instructions]Compact the conversation to free context. Optional instructions guide what to preserve.
/costShow token usage statistics for the current session
/usageShow plan usage limits and rate limit status
/extra-usageConfigure extra usage to keep working when rate limits are hit
/diffOpen interactive diff viewer showing uncommitted changes and per-turn diffs

Configuration

CommandWhat it does
/configOpen the settings interface (alias: /settings)
/permissionsView or update tool permissions (alias: /allowed-tools)
/hooksManage hook configurations for tool lifecycle events
/keybindingsOpen or create your keybindings configuration file
/themeChange the color theme (light, dark, colorblind variants, ANSI themes)
/vimToggle between Vim and Normal editing modes
/statuslineConfigure the status line display
/terminal-setupConfigure terminal keybindings (Shift+Enter for multiline, etc.)
/sandboxToggle sandbox mode for additional filesystem/network isolation
/privacy-settingsView and update privacy settings (Pro/Max plans only)

Project & Memory

CommandWhat it does
/initInitialize a project with a CLAUDE.md guide
/memoryEdit CLAUDE.md memory files, enable or disable auto-memory
/add-dir <path>Add a new working directory to the current session

Tools & Integrations

CommandWhat it does
/mcpManage MCP server connections and OAuth authentication
/pluginManage Claude Code plugins (install, uninstall, enable, disable, update)
/skillsList all available skills
/agentsManage agent and subagent configurations
/tasksList and manage background tasks
/chromeConfigure Claude in Chrome settings

Account & System

CommandWhat it does
/loginSign in to your Anthropic account
/logoutSign out from your Anthropic account
/doctorDiagnose and verify your Claude Code installation and settings
/statusShow version, model, account, and connectivity status
/statsVisualize daily usage, session history, streaks, and model preferences
/insightsGenerate a report analyzing your Claude Code sessions
/feedback [report]Submit feedback about Claude Code (alias: /bug)
/release-notesView the full changelog
/upgradeOpen the upgrade page to switch to a higher plan tier

Platform-Specific Commands

CommandWhat it doesAvailability
/desktopContinue the current session in the Claude Code Desktop app (alias: /app)macOS, Windows
/remote-controlMake this session available for remote control from claude.ai (alias: /rc)All platforms
/remote-envConfigure the default remote environment for teleport sessionsAll platforms
/ideManage IDE integrations and show statusAll platforms
/install-github-appSet up the Claude GitHub Actions app for a repositoryAll platforms
/install-slack-appInstall the Claude Slack appAll platforms
/mobileShow QR code to download the Claude mobile app (aliases: /ios, /android)All platforms
/pr-comments [PR]Fetch and display comments from a GitHub pull requestAll platforms
/review [PR]Review a pull request for quality, correctness, security, and test coverageAll platforms
/security-reviewAnalyze pending changes on current branch for security vulnerabilitiesAll platforms

Keyboard Shortcuts

General

ShortcutWhat it does
Ctrl+CCancel current input or generation
Ctrl+DExit Claude Code
Ctrl+LClear terminal screen (keeps conversation history)
Ctrl+OToggle verbose output (shows detailed tool usage)
Ctrl+RReverse search through command history
Ctrl+GOpen current prompt in your default text editor
Ctrl+BBackground running tasks (press twice in tmux)
Ctrl+FKill all background agents (press twice within 3 seconds to confirm)
Ctrl+TToggle task list visibility
Esc + EscRewind or summarize (same as /rewind)
Shift+Tab or Alt+MToggle permission modes (Auto-Accept, Plan, Normal)

Model & Thinking

ShortcutWhat it does
Option+P (macOS) / Alt+PSwitch model without clearing prompt
Option+T (macOS) / Alt+TToggle extended thinking mode

Text Editing

ShortcutWhat it does
Ctrl+KDelete to end of line
Ctrl+UDelete entire line
Ctrl+YPaste deleted text
Alt+B / Alt+FMove cursor back/forward one word

Multiline Input

MethodHow
Backslash\ then Enter (works everywhere)
Option+EnterDefault on macOS
Shift+EnterWorks in iTerm2, WezTerm, Ghostty, Kitty
Ctrl+JLine feed character
PastePaste multi-line text directly

Quick Prefixes

PrefixWhat it does
/Open command and skill menu
!Bash mode: run a shell command and add its output to the session
@File path autocomplete: mention a file to add it to context

MCP Prompts as Commands

MCP servers can expose prompts that appear as slash commands using the format:

/mcp__<server-name>__<prompt-name>

These are dynamically discovered from your connected MCP servers and appear in the / menu alongside built-in commands and skills.

Notes

  • Not all commands are visible to every user. Some depend on your platform, plan, or environment.
  • /desktop only appears on macOS and Windows. /upgrade and /privacy-settings require Pro/Max plans.
  • macOS users may need to configure Option/Alt as "Meta" in their terminal settings for Alt-key shortcuts to work.
  • Command history is stored per working directory and resets when you run /clear.