Wipes conversation history and frees context window space so you can start fresh without exiting.
alias: /reset
Slash commands and Vim mode guide for the Claude Code CLI. Every command in one searchable reference.
! to run it directly (e.g. !git status). Type @ for file path autocomplete. Custom skills appear alongside built-in commands when you type /.
Wipes conversation history and frees context window space so you can start fresh without exiting.
alias: /reset
Compresses the conversation into a summary to reclaim context space. Optional focus argument guides what gets preserved.
Picks up a previous conversation by session ID or name, or opens an interactive picker.
alias: /continue
Creates a branching copy at the current point to explore a different direction without losing the original.
Gives the session a custom name, or auto-generates one from conversation history.
Rolls back conversation and optionally code to a previous checkpoint. Useful for undoing a wrong turn.
alias: /checkpoint
Closes the Claude Code session and returns you to your shell.
alias: /quit
Displays a colored grid visualization of context window consumption so you know when to compact.
Shows token usage breakdown: input tokens, output tokens, and cache hits for the current session.
Displays current plan limits and rate-limit status to see remaining capacity.
Dashboard of daily usage patterns, session history, streaks, and model preferences over time.
Configures overflow usage so Claude keeps working when you hit rate limits instead of stopping.
Switches the active model mid-session (e.g. Opus to Sonnet) and lets you adjust effort level.
Toggles fast mode: same model, optimized for faster output at the cost of some thoroughness.
Switches between output styles. Deprecated -- use /config instead. Output style is now fixed at session start for better prompt caching.
Toggles voice input mode for dictating prompts instead of typing. Shows your dictation language on enable.
Opens a status overlay showing session info, model, context usage, and config. Works even while Claude is responding.
Opens the interactive settings UI to configure all Claude Code options in one place.
alias: /settings
Shows and edits which tools run automatically vs. requiring approval each time.
alias: /allowed-tools
Manages shell commands that run automatically in response to tool events (pre/post hooks).
Opens CLAUDE.md memory files for editing and manages auto-memory settings.
Creates a CLAUDE.md file in the project root with starter instructions tailored to your codebase.
Opens keybindings config to customize keyboard shortcuts and add chord bindings.
Configures the persistent status bar showing model, context, and live info.
Changes color theme between light, dark, colorblind-accessible, and ANSI palettes.
Configures terminal keybindings for Shift+Enter multi-line input and other shortcuts.
Toggles sandboxed execution mode that restricts file system and network access.
View and update data privacy preferences (Pro and Max subscribers).
Manages Model Context Protocol server connections and OAuth for external tool integrations.
Installs, removes, and manages plugins that extend Claude Code with custom capabilities.
Hot-reloads all active plugins to pick up code changes without restarting the session.
Lists all available skills (custom slash commands) configured for your project or globally.
Manages agent configurations that define specialized sub-agents with their own tools and instructions.
Shows IDE integration status and connects to editors like VS Code or Cursor.
Configures Chrome integration for browser-based workflows and debugging.
Interactive diff viewer showing all uncommitted changes and per-turn diffs.
Comprehensive pull request review checking code quality, correctness, security, and test coverage.
Scans pending changes specifically for security vulnerabilities and unsafe patterns.
Fetches and displays all comments from a GitHub pull request in the terminal.
Enters plan mode: Claude explores the codebase and designs an approach for your approval before writing code.
Overview of available commands, usage tips, and documentation links.
Runs a diagnostic check verifying settings, permissions, and connectivity are healthy.
Toggles debug logging on mid-session for troubleshooting. Debug logs are not written by default.
Lists and manages TODO items tracked in the current session.
Submits a bug report or feature request directly to the Claude Code team.
alias: /bug
Displays the full changelog of recent Claude Code updates.
Analytical report of usage patterns, productivity metrics, and session trends.
Lists and manages background tasks like running agents or async shell commands.
Adds an additional working directory so Claude can access files outside the launch directory.
Sets up the Claude GitHub Actions app for CI/CD integration and automated code review.
Installs the Claude Slack app to interact with Claude from Slack channels.
Order physical Claude Code stickers for your laptop or workspace.
Displays a QR code to download the Claude mobile app.
aliases: /ios /android
Plugins extend Claude Code with custom slash commands, agents, MCP servers, and hooks. They're distributed as directories with a plugin.json manifest.
Use /plugin to browse the plugin marketplace, or install from a local directory or Git URL. Plugins can also be loaded via --plugin-dir on the CLI.
A plugin is a directory containing plugin.json (manifest with name, description, version), plus optional commands/, agents/, and hooks/ folders. Each command is a Markdown file with YAML frontmatter.
After editing plugin files, run /reload-plugins to pick up changes without restarting your session. Great for development.
Plugins can bundle their own MCP servers. If a plugin's server duplicates one you've already configured, the duplicate is automatically suppressed.
View installed plugins with /plugin. Remove with the plugin menu. Use --plugin-dir (repeatable) to load plugins from custom directories.
Use the community /create-plugin command for a guided workflow, or manually create the directory structure. Plugins can include custom agents with their own tools and instructions.
Skills are custom slash commands defined as Markdown files with YAML frontmatter. They appear alongside built-in commands when you type /.
Skills live in .claude/skills/ directories. Global skills go in ~/.claude/skills/. Project skills go in .claude/skills/ at the repo root. Each skill is a folder with a SKILL.md file inside.
YAML frontmatter defines the skill's name, description, whether it's user-invocable, allowed tools, and optional model override. The Markdown body is the prompt Claude receives when the skill is invoked.
Set user-invocable: true in frontmatter to make a skill appear in the / menu. Skills without this flag can still be invoked programmatically by Claude via the Skill tool.
Use allowed-tools: in frontmatter to restrict which tools a skill can access. This provides sandboxing for skills that shouldn't have full tool access.
Add model: haiku (or sonnet, opus) in frontmatter to force a specific model when the skill runs, regardless of the session's current model.
Use /skills to see all available skills, or just type / and start filtering. Skills from plugins also appear here.
MCP (Model Context Protocol) servers give Claude access to external tools, APIs, and data sources. They run as separate processes and communicate via stdio or HTTP.
Use claude mcp add <name> -- <command> from the CLI. For example: claude mcp add github -- npx @anthropic-ai/mcp-server-github. Servers can also be added via /mcp in-session.
Add with -s user for global (all projects), -s project for repo-specific, or via org-managed connectors. Config is stored in ~/.claude/settings.json or .claude/settings.json.
Some MCP servers (like Slack) use OAuth. Use --client-id and --client-secret with claude mcp add for servers that don't support Dynamic Client Registration.
Use claude mcp list to see configured servers, claude mcp remove <name> to delete one, or /mcp in-session for an interactive view with connection status.
MCP tools are loaded on-demand to save context. Claude uses ToolSearch to fetch tool schemas before calling them. This means MCP servers with many tools don't bloat the context window.
If an MCP server isn't connecting, check /mcp for status. Common issues: missing Node.js/Python, wrong path, or the server needs environment variables set via -e KEY=VALUE.
Enable via /config → Editor mode. The /vim slash command was removed in v2.1.92 -- use the config menu instead.
| Key | Action | From |
|---|---|---|
| Esc | Enter NORMAL mode | INSERT |
| i | Insert before cursor | NORMAL |
| I | Insert at beginning of line | NORMAL |
| a | Insert after cursor | NORMAL |
| A | Insert at end of line | NORMAL |
| o | Open new line below | NORMAL |
| O | Open new line above | NORMAL |
| Key | Action |
|---|---|
| x | Delete character under cursor |
| dd | Delete entire line |
| D | Delete to end of line |
| dw | Delete word forward |
| de | Delete to end of word |
| db | Delete word backward |
| Key | Action |
|---|---|
| cc | Change entire line |
| C | Change to end of line |
| cw | Change word forward |
| ce | Change to end of word |
| cb | Change word backward |
| Key | Action |
|---|---|
| yy / Y | Yank (copy) entire line |
| yw | Yank word |
| ye | Yank to end of word |
| yb | Yank word backward |
| p | Paste after cursor |
| P | Paste before cursor |
| >> | Indent line |
| << | Dedent line |
| J | Join current line with next |
| . | Repeat last change |
Use with operators: d (delete), c (change), y (yank). Example: ci" = change inside quotes.
| Object | Description |
|---|---|
| iw / aw | Inner / around word |
| iW / aW | Inner / around WORD (whitespace-delimited) |
| i" / a" | Inner / around double quotes |
| i' / a' | Inner / around single quotes |
| i( / a( | Inner / around parentheses |
| i[ / a[ | Inner / around brackets |
| i{ / a{ | Inner / around braces |
These standard Vim features are not available in Claude Code's Vim mode:
/rewind instead of u for undo -- it rolls back both conversation and code. Enable vim mode via /config → Editor mode.