Cheatsheet every command, shortcut & flag

A quick-reference for everything built into Claude Code. Print it, bookmark it, keep it handy.

Built-in Commands type / in Claude Code to browse

Session & Navigation

/clear /reset, /new
Clear conversation history and free context
/compact [instructions]
Compact conversation with optional focus
/resume [session] /continue
Resume a conversation by ID or name
/branch [name] /fork
Branch conversation at this point
/rewind /checkpoint
Rewind conversation and/or code to a prior point
/rename [name]
Rename the current session
/export [filename]
Export conversation as plain text
/copy [N]
Copy last response (or Nth) to clipboard
/btw <question>
Ask a side question without adding to history
/exit /quit
Exit the CLI

Model & Display

/config /settings
Open settings (theme, model, output style)
/model [model]
Select or change the AI model
/effort [level]
Set effort: low, medium, high, max, auto
/fast [on|off]
Toggle fast mode
/theme
Change color theme (light, dark, daltonized, ANSI)
/color [color]
Set prompt bar color for current session
/statusline
Configure the status line display
/vim
Toggle between Vim and Normal editing modes
/keybindings
Open keybindings configuration file
/terminal-setup
Configure terminal keybindings (Shift+Enter, etc.)
/voice
Toggle push-to-talk voice dictation

Code & Projects

/init
Initialize project with a CLAUDE.md guide
/memory
Edit CLAUDE.md memory files and auto-memory
/context
Visualize current context usage as a grid
/diff
Interactive diff viewer for uncommitted changes
/plan [description]
Enter plan mode (optionally with a task)
/tasks
List and manage background tasks
/sandbox
Toggle sandbox mode
/security-review
Analyze branch changes for security vulnerabilities
/pr-comments [PR]
Fetch and display GitHub PR comments
/add-dir <path>
Add a working directory for the session
🔗

Integrations

/agents
Manage subagent configurations
/mcp
Manage MCP server connections and OAuth
/plugin
Manage plugins (install, enable, disable)
/reload-plugins
Reload all active plugins without restarting
/skills
List all available skills
/hooks
View hook configurations for tool events
/permissions /allowed-tools
Manage allow, ask, and deny rules
/chrome
Configure Claude in Chrome settings
/ide
Manage IDE integrations and show status
/desktop /app
Continue session in desktop app
/mobile /ios, /android
QR code to download mobile app
/remote-control /rc
Make session available for remote control
/remote-env
Configure default remote environment
/schedule [desc]
Create and manage cloud scheduled tasks
/install-github-app
Set up Claude GitHub Actions for a repo
/install-slack-app
Install the Claude Slack app
👤

Account & Usage

/login
Sign in to your Anthropic account
/logout
Sign out from your account
/cost
Show token usage statistics
/usage
Show plan usage limits and rate limit status
/extra-usage
Configure extra usage when rate-limited
/status
Show version, model, account, and connectivity
/stats
Visualize daily usage, streaks, and history
/insights
Generate a session analysis report
/upgrade
Open upgrade page (Pro/Max)
/privacy-settings
View and update privacy settings (Pro/Max)
/passes
Share a free week of Claude Code
/help
Show help and available commands
/feedback /bug
Submit feedback about Claude Code
/doctor
Diagnose and verify your installation
/release-notes
View the full changelog
/stickers
Order Claude Code stickers

Bundled Skills

Prompt-based skills that ship with Claude Code. They orchestrate multi-step work using Claude's tools.

/simplify [focus]
Review changed files for reuse, quality, and efficiency — then fix
/batch <instruction>
Orchestrate large-scale parallel changes across the codebase
/debug [description]
Enable debug logging and troubleshoot session issues
/loop [interval] <prompt>
Run a prompt repeatedly on an interval (e.g. poll a deploy)
/claude-api
Load Claude API and SDK reference for your language

Keyboard Shortcuts interactive mode essentials

General

Enter / Return
Submit message
Escape
Cancel / exit current action
Tab
Autocomplete file paths
Up / Down
Navigate command history
Ctrl+R
Reverse search through history
Ctrl+E
Open external editor for input
Ctrl+B
Background a long-running process
! <cmd>
Execute shell command directly (bash mode)

Vim — Navigation

h j k l
Move left, down, up, right
w / e / b
Next word / end of word / back word
0 / $ / ^
Line start / end / first non-blank
gg / G
Go to start / end of document
f<c> / F<c>
Find char forward / backward
; / ,
Repeat / reverse last find
Enable with /vim or set editorMode: "vim" in config

Vim — Editing

i / a / o
Insert before / after / new line below
I / A / O
Insert at start / end / new line above
x
Delete character under cursor
dd / D
Delete line / delete to end of line
dw / de / db
Delete word / to end / to beginning
cw / cc / C
Change word / line / to end of line
yy / yw / p / P
Yank line / word / paste after / before
. (dot)
Repeat last editing command
> / <
Indent / dedent
J
Join current line with next
Esc
Return to Normal mode

CLI Flags launch-time options for claude

$

Execution

--model <name>
Set AI model (sonnet, opus, haiku)
-p, --print
Non-interactive print mode for scripting
-v, --version
Show version number
-n, --name <name>
Set session display name

Sessions

--continue
Resume most recent conversation
--resume <id>
Resume a specific session by ID
--from-pr <num>
Resume session linked to a GitHub PR
--fork-session
Fork session with full history retained
-w, --worktree
Start in an isolated git worktree
--no-session-persistence
Don't save session to disk

System Prompt

--system-prompt <text>
Replace entire system prompt
--system-prompt-file <path>
Replace system prompt from file
--append-system-prompt <text>
Append text to default prompt
--append-system-prompt-file <path>
Append file contents to prompt
🔒

Tools & Permissions

--allowedTools <tools>
Restrict which tools are available
--disallowedTools <tools>
Block specific tools
--dangerously-skip-permissions
Bypass all permission prompts
--disable-slash-commands
Disable all slash commands
--permission-mode <mode>
Set initial permission mode

Config & Integration

--output-format <fmt>
Output format: text, json, stream-json
--mcp-config <path>
Path to MCP server configuration
--max-turns <n>
Maximum conversation turns
--debug <modules>
Enable debug output (e.g. api,mcp)
--plugin-dir <path>
Directory to load plugins from
--no-chrome
Disable Chrome browser integration
--remote <name>
Create web session on claude.ai
--remote-control <name>
Interactive session with remote control
--agents <json>
Define ephemeral subagents as JSON

Custom Skills extend Claude Code with your own commands

📝

Create Your Own

Add SKILL.md files to .claude/skills/ (or .md files to .claude/commands/) and they become slash commands.

$ARGUMENTS Reference user input for parameterized commands
context: fork Run in a subagent for isolated execution
allowed-tools Restrict which tools the skill can access
!`command` Inject dynamic shell output into skill content
📁

Skill Locations

~/.claude/skills/
Personal skills — available in all projects
.claude/skills/
Project skills — this project only
.claude/commands/
Legacy commands — still supported
Skills take precedence when a skill and command share the same name.