Skip to main content

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 the built-in commands. Custom skills (created in .claude/skills/) also appear in the / menu. See the Skills page for details.

Some commands are bundled skills rather than hard-coded CLI behavior. They use the same prompt-based mechanism as custom skills and are marked [Skill] below. Claude can also invoke bundled skills automatically when relevant.

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 [prompt]Copy the current conversation into a new background session that runs independently in claude agents (agent view) while you keep working here. Pass a prompt to start the copy immediately; without one it waits for its first prompt.
/subtask [prompt]Send a side task to a subagent whose result comes back into the current conversation (the in-session behavior /fork used to have)
/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. Can resume a conversation from before /clear was run. (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)
/effort [level|auto]Set reasoning depth: low, medium, high, xhigh, or max. Available levels depend on the model. auto resets to the model default.
/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.
/btw <note>Add a quick aside to the session that is noted but does not enter the main conversation history
/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
/btw <question>Ask a quick side question without adding it to the main conversation history
/recapGenerate a one-line summary of the current session on demand

Configuration

CommandWhat it does
/config [key=value]Open the settings interface, or pass key=value (e.g. /config thinking=false) to change a setting directly without opening it. The key=value form also works in headless mode with -p and from Remote Control. (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)
/color [color]Set the prompt bar color for the current session (red, blue, green, yellow, purple, orange, pink, cyan). Use default to reset.
/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
/cd <path>Move the current session to a different working directory without rebuilding the prompt cache. The new directory's CLAUDE.md is appended as a message, and the session relocates to the new directory's project storage so --resume and --continue find it there. Prompts you to trust an unfamiliar directory. Requires v2.1.169 or later.

Tools & Integrations

CommandWhat it does
/mcpManage MCP server connections and OAuth authentication
/pluginManage Claude Code plugins (install, uninstall, enable, disable, update)
/reload-pluginsReload all active plugins to apply pending changes without restarting
/skillsList all available skills
/agentsManage agent and subagent configurations
/tasksList and manage background tasks
/background [prompt]Detach the current session to run as a background agent and free the terminal. Pass a prompt to send one more instruction before detaching. Alias: /bg
/stopStop the current background session (only available while attached to one)
/batch <instruction>[Skill] Orchestrate large-scale changes across a codebase in parallel: decomposes the work into independent units and spawns one background subagent per unit in an isolated git worktree
/goal [condition]Set a completion goal; Claude keeps working across turns until the condition is met. clear or cancel removes the goal early
/scheduleCreate and manage scheduled tasks and Routines (Anthropic-managed recurring tasks)
/loop [interval][Skill] Repeat a prompt on a recurring interval within the current CLI session
/autofix-pr [prompt]Spawn a Claude Code on the web session that watches the current branch's PR and pushes fixes when CI fails or reviewers leave comments. Requires the gh CLI
/chromeConfigure Claude in Chrome settings
/debug [description][Skill] Enable debug logging for the current session and troubleshoot issues by reading the session debug log
/simplify [target][Skill] Review changed code for cleanup opportunities and apply fixes. From v2.1.154, does not hunt for correctness bugs; use /code-review for that.
/code-review [level] [--fix] [--comment] [target][Skill] Review the current diff for correctness bugs and cleanups. Pass --fix to apply findings, --comment to post as GitHub PR comments, or ultra to run a deep multi-agent cloud review.
/claude-api[Skill] Load Claude API reference for your project's language. Also activates automatically when code imports anthropic or @anthropic-ai/sdk
/run[Skill] Launch and drive your project's app to see a change working in the running app (not just in tests). Requires Claude Code v2.1.145 or later.
/verify[Skill] Confirm a code change does what it should by building and running your app, then observing the result. Requires Claude Code v2.1.145 or later.
/run-skill-generator[Skill] Teach /run and /verify how to build, launch, and drive your project's app by writing a per-project skill.
/reload-skillsRe-scan skill and command directories so skills added or changed on disk during the session become available without restarting.
/workflowsOpen the workflow progress view to watch, pause, resume, or save running and completed workflows.
/deep-research <question>[Workflow] Fan out web searches on a question, fetch and cross-check sources, and synthesize a cited report.
/fewer-permission-prompts[Skill] Scan session transcripts for common read-only tool calls and add an allowlist to .claude/settings.json to reduce future permission prompts

Account & System

CommandWhat it does
/loginSign in to your Anthropic account
/logoutSign out from your Anthropic account
/doctor[Skill] Run a full setup checkup that diagnoses issues and can fix them: checks installation health, finds unused skills, MCP servers, and plugins versus their context cost, deduplicates and trims CLAUDE.md files, and flags slow hooks. Reports findings first and asks before changing anything. (alias: /checkup)
/statusShow version, model, account, and connectivity status
/statsVisualize daily usage, session history, streaks, and model preferences
/insightsGenerate a report analyzing your Claude Code sessions
/team-onboardingGenerate a team onboarding guide from your Claude Code usage history
/powerupLaunch interactive lessons with animated demos of Claude Code features
/voice [hold|tap|off]Toggle voice dictation (requires a Claude.ai account)
/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
/teleportPull a Claude Code on the web session into this terminal (alias: /tp). Requires a claude.ai subscriptionAll 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
/review [PR]Review a pull request for quality, correctness, security, and test coverageAll platforms
/ultrareview [PR]Run a deep, multi-agent cloud-based code review. The preferred invocation is now /code-review ultra. Includes 3 free runs on Pro/Max plans.All platforms
/ultraplan <prompt>Draft a plan in an ultraplan session, review it in your browser, then execute remotely or send it back to your terminalAll 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
!Shell mode: run a shell command (with live file-path autocomplete). Claude responds to the output once it lands in the transcript, so ! npm test explains the failures without a second prompt (costing the same as a normal prompt). Set respondToBashCommands to false in settings.json to add output to context without a response.
@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.
  • /vim was removed in v2.1.92; toggle editor mode in /config instead.
  • /pr-comments was removed in v2.1.91; ask Claude directly to view pull request comments instead.