Slash Commands Reference

Summary

  • Slash commands control Claude Code session behavior, context, configuration, and integrations. Type / to list all available commands in your installed version.

Key Points

  • Command availability may vary by version; use / in the prompt to see what is available now.
  • Some commands have sub-options (e.g. /model lets you pick from available Claude models).
  • Keyboard shortcut reference: press ? while in the session.
  • Commands prefixed with ! run raw shell commands inline (e.g. !ls).
  • /rewind is within-session only (undo turns); /resume is cross-session (reload a previous session).

Emergency Quick Reference

When something is broken or unexpected → /doctor /status /help

Command Reference

Conversation Management

CommandDescription
/clearClear conversation history (context window).
/compactCompress the conversation into a summary to free context space.
/rewindUndo the last turn(s) in the current session (within-session only).
/resumeResume a previous session by selecting from session history (cross-session).
/exportExport the current conversation to a file.
/renameRename the current session.

Setting Management

CommandDescription
/configView or modify Claude Code configuration settings.
/modelSwitch the active Claude model for the session.
/themeChange the UI color theme.
/vimToggle vim keybindings for the input prompt.

Tools & Integration

CommandDescription
/agentsManage and inspect sub-agents.
/hooksView and configure event hooks (triggered on tool calls, session events, etc.).
/ideConfigure IDE integration settings.
/mcpList connected MCP servers and their available tools.
/skillsList and manage loaded skills.
/pluginManage Claude Code plugins.

Account & Permissions

CommandDescription
/loginSwitch to a different Anthropic account.
/logoutSign out of the current Anthropic account.
/permissionsView or update file/command permission settings.
/usageShow account-level usage and quota statistics.

File & Project Operations

CommandDescription
/initScan the project and generate a CLAUDE.md with a project overview.
/memoryOpen and edit CLAUDE.md memory files (project or global).
/add-dirAdd an additional directory to Claude Code’s working context.
/pr-commentsFetch and display comments from an open GitHub pull request.
/reviewAsk Claude to review staged or recent changes.
/security-reviewRun a security-focused review of the current codebase or changes.

Info & Status

CommandDescription
/contextShow what is currently loaded in the context window.
/costShow token usage and estimated cost for the current session.
/doctorRun a health check on the Claude Code installation.
/helpShow available commands and usage guide.
/statsShow session statistics (turns, tokens, tool calls).
/statusShow account, billing, and session status.

Utilities

CommandDescription
/planEnter plan mode to design an implementation before writing code.
/todosView and manage the current session’s to-do list.
/terminal-setupInstall shell integration (enables Shift+Enter for newline).
/statuslineConfigure the status line display.
/release-notesView the changelog for the current Claude Code version.

Keyboard Shortcuts

ShortcutAction
Ctrl+CCancel the current operation or clear the input line.
Ctrl+DExit Claude Code.
/ Navigate command history.
Shift+EnterInsert a newline (requires /terminal-setup first).
EscClear the current input.
?Show keyboard shortcut reference.

Examples

  • Switch model: /model
  • Initialize project memory: /init
  • Undo last response: /rewind
  • Come back to yesterday’s session: /resume
  • Add a second repo to context: /add-dir ../other-project
  • Check token spend: /cost
  • Edit memory file: /memory
  • View MCP tools: /mcp
  • Run shell inline: !git log --oneline -5
  • AI/Claude Code/index
  • AI/Claude Code/Usage of Claude Code
  • AI/Claude Code/Introduction