Commands reference
Slash commands control Claude Code from inside a session. Type / to see everything available, or / followed by letters to filter. Commands marked Skill are bundled skills — prompt-based workflows Claude can also trigger automatically when relevant.
For the official reference see code.claude.com/docs/en/commands.
Top 26 commands
Section titled “Top 26 commands”Commands you’ll reach for in almost every session.
| Command | What it does |
|---|---|
/clear | Clear conversation history and free up context. Aliases: /reset, /new |
/compact [instructions] | Summarize the conversation to reclaim context. Pass instructions to focus what’s kept, e.g. /compact focus on the auth changes |
/model [model] | Switch the active model mid-session. Takes effect immediately — no need to restart |
/plan [description] | Enter plan mode. Pass a description to jump straight in: /plan fix the auth bug |
/cost | Show token usage and session cost. See cost tracking docs |
/context | Visualize context window usage as a colored grid with optimization suggestions |
/rewind | Rewind the conversation and/or code to a previous point. See checkpointing docs. Alias: /checkpoint |
/btw <question> | Ask a quick side question without adding it to the main conversation thread |
Manage, navigate, and share your sessions.
| Command | What it does |
|---|---|
/resume [session] | Resume a previous conversation by name or ID, or open the session picker. Alias: /continue |
/rename [name] | Name the current session — shows on the prompt bar. Omit the name to auto-generate one |
/branch [name] | Fork the conversation at this point to explore a different direction. Alias: /fork |
/copy [N] | Copy the last assistant response to clipboard. /copy 2 copies the second-to-last. Shows a picker when code blocks are present |
/export [filename] | Export the current conversation as plain text to a file or clipboard |
/diff | Open an interactive diff viewer showing uncommitted changes and per-turn diffs. Use arrows to navigate |
/stats | Visualize daily usage, session history, streaks, and model preferences |
Set up Claude Code the way you work.
| Command | What it does |
|---|---|
/config | Open the Settings UI to adjust theme, model, output style, and other preferences. Alias: /settings |
/permissions | Manage allow, ask, and deny rules for tool permissions interactively. See permissions docs. Alias: /allowed-tools |
/memory | Edit CLAUDE.md memory files and manage auto-memory entries. See memory docs |
/init | Initialize a project with a CLAUDE.md guide. Set CLAUDE_CODE_NEW_INIT=1 for an interactive flow covering skills, hooks, and personal memory |
/statusline | Configure the status line at the bottom of Claude Code. Describe what you want in natural language |
/hooks | View hook configurations for tool events |
/effort [low|medium|high|max|auto] | Set the model effort level. low–high persist across sessions. max is current-session only (Opus 4.6) |
/skills | List all available skills, including bundled and custom ones |
Advanced workflows and automation.
| Command | What it does |
|---|---|
/simplify [focus] | Skill Review recently changed files for code quality issues and fix them. Runs three review agents in parallel. Pass text to narrow focus: /simplify focus on memory efficiency |
/batch <instruction> | Skill Orchestrate large-scale parallel changes. Decomposes work into up to 30 units, spawns one agent per unit in isolated git worktrees, and opens PRs. Example: /batch migrate src/ from Solid to React |
/security-review | Analyze pending changes on the current branch for security vulnerabilities — injection, auth issues, data exposure, and more |
/autofix-pr [prompt] | Spawn a remote session that watches your PR and pushes fixes when CI fails or reviewers leave comments. Requires the gh CLI |
/ultraplan <prompt> | Draft a plan in an ultraplan session, review it in your browser, then execute remotely or send back to terminal |
/schedule [description] | Create, update, list, or run Cloud scheduled tasks conversationally |
/debug [description] | Skill Enable debug logging and troubleshoot issues by reading the session debug log. Optionally describe the issue to focus the analysis |
Full command reference
Section titled “Full command reference”All commands included in Claude Code. Availability depends on your platform, plan, and environment — some commands only appear on macOS/Windows, or on Pro/Max plans.
| Command | Purpose |
|---|---|
/add-dir <path> | Add a working directory for file access during the current session |
/agents | Manage agent configurations |
/autofix-pr [prompt] | Spawn a remote session to auto-fix CI failures and PR review comments on your open PR |
/batch <instruction> | Skill. Orchestrate large-scale parallel changes across a codebase in isolated worktrees |
/branch [name] | Fork the conversation at this point. Alias: /fork |
/btw <question> | Ask a side question without adding it to the conversation thread |
/chrome | Configure Claude in Chrome settings |
/claude-api | Skill. Load Claude API reference for your project’s language. Also activates automatically when your code imports anthropic or @anthropic-ai/sdk |
/clear | Clear conversation history and free up context. Aliases: /reset, /new |
/color [color|default] | Set the prompt bar color for the current session: red, blue, green, yellow, purple, orange, pink, cyan |
/compact [instructions] | Compact conversation with optional focus instructions |
/config | Open the Settings UI. Alias: /settings |
/context | Visualize current context usage as a colored grid |
/copy [N] | Copy the last (or Nth-latest) assistant response to clipboard |
/cost | Show token usage statistics |
/debug [description] | Skill. Enable debug logging and troubleshoot the current session |
/desktop | Continue the session in the Claude Code Desktop app. macOS and Windows only. Alias: /app |
/diff | Open an interactive diff viewer showing uncommitted changes and per-turn diffs |
/doctor | Diagnose and verify your Claude Code installation and settings |
/effort [level] | Set model effort: low, medium, high, max, or auto |
/exit | Exit the CLI. Alias: /quit |
/export [filename] | Export the current conversation as plain text |
/extra-usage | Configure extra usage to keep working when rate limits are hit |
/fast [on|off] | Toggle fast mode |
/feedback [report] | Submit feedback about Claude Code. Alias: /bug |
/help | Show help and available commands |
/hooks | View hook configurations for tool events |
/ide | Manage IDE integrations and show status |
/init | Initialize project with a CLAUDE.md guide |
/insights | Generate a report analyzing your Claude Code sessions and interaction patterns |
/install-github-app | Set up the Claude GitHub Actions app for a repository |
/install-slack-app | Install the Claude Slack app |
/keybindings | Open or create your keybindings configuration file |
/login | Sign in to your Anthropic account |
/logout | Sign out from your Anthropic account |
/loop [interval] [prompt] | Skill. Run a prompt repeatedly while the session stays open. See scheduled tasks |
/mcp | Manage MCP server connections and OAuth authentication |
/memory | Edit CLAUDE.md memory files and manage auto-memory |
/mobile | Show QR code to download the Claude mobile app. Aliases: /ios, /android |
/model [model] | Select or change the AI model |
/passes | Share a free week of Claude Code with friends (account-eligible only) |
/permissions | Manage allow, ask, and deny rules for tool permissions. Alias: /allowed-tools |
/plan [description] | Enter plan mode, optionally with an initial task |
/plugin | Manage Claude Code plugins |
/powerup | Discover Claude Code features through quick interactive lessons |
/privacy-settings | View and update privacy settings (Pro and Max plans only) |
/release-notes | View the changelog in an interactive version picker |
/reload-plugins | Reload all active plugins to apply changes without restarting |
/remote-control | Make this session available for remote control from claude.ai. Alias: /rc |
/remote-env | Configure the default remote environment for web sessions |
/rename [name] | Rename the current session |
/resume [session] | Resume a conversation by ID or name. Alias: /continue |
/rewind | Rewind conversation and/or code to a previous point. See checkpointing. Alias: /checkpoint |
/sandbox | Toggle sandbox mode (supported platforms only) |
/schedule [description] | Create, update, list, or run Cloud scheduled tasks |
/security-review | Analyze pending changes for security vulnerabilities |
/setup-bedrock | Configure Amazon Bedrock authentication and settings (requires CLAUDE_CODE_USE_BEDROCK=1) |
/setup-vertex | Configure Google Vertex AI authentication and settings (requires CLAUDE_CODE_USE_VERTEX=1) |
/simplify [focus] | Skill. Review and fix recently changed files for code quality issues |
/skills | List available skills |
/stats | Visualize daily usage, session history, streaks, and model preferences |
/status | Open Settings (Status tab) showing version, model, account, and connectivity |
/statusline | Configure Claude Code’s status line |
/stickers | Order Claude Code stickers |
/tasks | List and manage background tasks. Alias: /bashes |
/teleport | Pull a Claude Code web session into this terminal. Alias: /tp |
/terminal-setup | Configure terminal keybindings for Shift+Enter and other shortcuts |
/theme | Change the color theme, including light, dark, colorblind-accessible, and ANSI variants |
/ultraplan <prompt> | Draft and execute a plan in an ultraplan session |
/upgrade | Open the upgrade page to switch plan tier |
/usage | Show plan usage limits and rate limit status |
/voice | Toggle push-to-talk voice dictation |
/web-setup | Connect your GitHub account to Claude Code on the web |
Related docs
Section titled “Related docs”- Commands reference — official full reference
- Customize your status line — set up a rich statusline with git, model, context, and cost
- Skills — create your own slash commands
- Permissions — control tool and skill access
- Memory & CLAUDE.md — persistent project context
- Hooks — automate workflows around tool events
- Interactive mode — keyboard shortcuts, vim mode, command history
- Checkpointing — rewind and branch conversations
- Subagents — delegate tasks to specialized agents