Free Cheat Sheet

The Claude Code cheat sheet that's actually current

Every Claude Code slash command, keyboard shortcut, hook event, and CLI flag in one searchable page, checked against the version installed right now. Free to use. No sign up required.

276 entries6 categorieschecked against Claude Code v2.1.220verified 2026-08-03

Slash commands

77 entries
/add-dir <path>

Add a working directory for file access during the current session.

/advisor [model|off]

Enable or disable the advisor tool, which consults a second model for guidance.

/agents

Reminder to ask Claude to create or manage subagents, or edit agent configurations.

/autofix-pr [prompt]

Spawn a Claude Code on the web session that watches the current branch's PR and pushes fixes.

/background [prompt]

Detach the current session to run as a background agent and free up the terminal.

/batch <instruction>

Orchestrate large-scale changes across a codebase in parallel using worktrees.

/branch [name]

Create a branch of the current conversation to try a different direction.

/btw [question]

Ask a quick side question without adding it to the conversation history.

/bug [report]

Report a bug, optionally sharing your conversation with session history.

/cd <path>

Move this session to a new working directory.

/chrome

Configure the Claude in Chrome browser integration.

/claude-api [migrate|managed-agents-onboard]

Load Claude API reference material and Managed Agents reference into context.

/clear [name]

Start a new conversation with empty context. Resets input history for the session.

/code-review [level] [--fix] [--comment] [target]

Review the current diff for correctness bugs and cleanup opportunities.

/color [color|default]

Set the prompt bar color for the current session.

/compact [instructions]

Free up context by summarizing the conversation so far.

/config [key=value ...]

Open the Settings interface, or set preferences directly from the command line.

/context [all]

Visualize current context window usage as a colored grid.

/copy [N]

Copy the last assistant response (or the Nth one back) to the clipboard.

/cost

Alias for /usage - show token usage and cost for the current session.

/dataviz [request]

Get design guidance for charts, graphs, and dashboards before writing chart code.

/debug [description]

Enable debug logging and troubleshoot a runtime issue.

/deep-research <question>

Fan out web searches on a question and synthesize a cited report.

/design-login

Authorize design-system access so /design-sync can run.

/design-sync [hint]

Convert your repo's React design system and upload it to Claude Design.

/desktop

Continue the current session in the Claude Code Desktop app.

/diff

Open an interactive diff viewer showing uncommitted changes.

/doctor

Run a setup checkup that diagnoses and fixes installation issues.

/effort [level|auto]

Set the model's reasoning effort level for the session.

/exit

Exit the CLI.

/export [filename]

Export the current conversation as plain text.

/fast [on|off]

Toggle fast mode on or off for the session.

/feedback [report]

Send product feedback about Claude Code directly to Anthropic.

/fewer-permission-prompts

Scan your transcripts and add an allowlist to reduce permission prompts.

/focus

Toggle a focus view that shows only essential information.

/fork [prompt]

Copy the current conversation into a new background session.

/goal [condition|clear]

Set a goal that Claude keeps working toward across multiple turns.

/heapdump

Write a JavaScript heap snapshot for diagnosing memory usage.

/help

Show help and the full list of available commands.

/hooks

View the current hook configurations for tool events.

/ide

Manage IDE integrations and show connection status.

/init

Initialize the project with a generated CLAUDE.md guide.

/insights

Generate a report analyzing your Claude Code sessions.

/install-github-app

Install the Claude GitHub App for a repository.

/install-slack-app

Install the Claude Slack app (Claude Tag) for a workspace.

/keybindings

Open your keyboard shortcuts file for editing.

/login

Sign in to your Anthropic account.

/logout

Sign out of your Anthropic account.

/loop [interval] [prompt]

Run a prompt repeatedly on an interval while the session stays open.

/mcp [reconnect <server>|enable|disable]

Manage MCP server connections and OAuth authentication.

/memory

Edit CLAUDE.md memory files and manage auto-memory.

/mobile

Show a QR code to download the Claude mobile app.

/model [model]

Switch the active model and save the choice as your default.

/passes

Share a free week of Claude Code with friends.

/permissions

Set approval rules for file access, tool use, and other sensitive operations.

/plugin

Manage Claude Code plugins: install, enable, disable, update.

/pr-comments

Post code review findings as inline comments on a GitHub PR.

/recap

Summarize the conversation so far in one message.

/rename

Rename the current session.

/resume

Return to an earlier conversation or branch.

/review

Give a fast, single-pass, read-only review of a GitHub pull request.

/rewind

Roll code and conversation back to a checkpoint, or summarize part of the conversation.

Also reachable by pressing Esc twice on an empty prompt.

/security-review

Check the current diff for security vulnerabilities.

/status

Show current session status and background task progress.

/statusline

Configure the status bar shown at the bottom of the terminal.

/tasks

List the current session's background work, including subagents that have finished.

/terminal-setup

Configure terminal integration, including the Shift+Enter multiline binding.

/theme

Set the display theme.

/todos

Manage a to-do list for the current session.

/tui

Toggle between fullscreen and split-pane rendering modes.

/update

Check for and install Claude Code updates.

/upgrade

Upgrade your Claude subscription plan.

/usage

Show token usage and costs for the current session.

/verify

Skill that verifies code correctness and test coverage.

/vim

Toggle vim-style keybindings for the prompt input.

/voice

Enable or disable voice input and output.

/workflows

View and manage dynamic workflows.

Keyboard shortcuts

45 entries
Ctrl+C

Interrupt a running operation. On empty input, one press clears the prompt and a second exits Claude Code.

Ctrl+X Ctrl+K

Stop all running background subagents in this session.

Press twice within 3 seconds to confirm.

Ctrl+D

Exit the Claude Code session (or delete the character after the cursor when the prompt has text).

Ctrl+G (or Ctrl+X Ctrl+E)

Open your prompt in your default text editor.

Ctrl+L

Redraw the screen if the display looks garbled.

Press twice within two seconds to also run /clear.

Ctrl+O

Toggle the transcript viewer, showing detailed tool usage with timestamps.

Ctrl+R

Reverse search through your prompt history.

Ctrl+V (Cmd+V in iTerm2, Alt+V on Windows/WSL)

Paste an image from the clipboard as an [Image #N] chip.

Ctrl+B

Move a running Bash command or agent to the background.

tmux users press it twice, since tmux claims Ctrl+B as its own prefix key.

Ctrl+T

Toggle Claude's to-do task checklist in the status area.

Ctrl+S

Stash the current prompt text, or restore it when pressed again on an empty prompt.

Ctrl+Z

Suspend Claude Code to your shell (Unix only). Run fg to resume.

Left / Right arrows

Cycle through tabs in permission dialogs and menus.

Up / Down arrows (or Ctrl+P / Ctrl+N)

Move the cursor within a multiline prompt, then step through command history.

Esc

Interrupt Claude mid-turn, or close an open dialog.

Esc Esc

Clear the input draft, or open the rewind menu when the prompt is already empty.

Shift+Tab (or Alt+M on some Windows terminals)

Cycle through permission modes: default, acceptEdits, plan, and any you've enabled.

Option+P (macOS) / Alt+P (Windows/Linux)

Switch models without clearing your current prompt.

Option+T (macOS) / Alt+T (Windows/Linux)

Toggle extended thinking mode.

Option+O (macOS) / Alt+O (Windows/Linux)

Toggle fast mode.

Ctrl+A

Move the cursor to the start of the current line.

Ctrl+E

Move the cursor to the end of the current line.

Ctrl+K

Delete to the end of the line, storing the text for pasting.

Ctrl+U

Delete from the cursor to the start of the line, storing the text for pasting.

Ctrl+W

Delete the previous word, storing the text for pasting.

Ctrl+Y

Paste text deleted with Ctrl+K, Ctrl+U, or Ctrl+W.

Alt+Y (after Ctrl+Y)

Cycle through previously deleted text.

Alt+B

Move the cursor back one word.

Alt+F

Move the cursor forward one word.

Ctrl+_ (or Ctrl+Shift+-)

Undo the last input edit.

\ + Enter

Insert a newline in the prompt. Works in every terminal with no setup.

Option+Enter

Insert a newline after enabling Option as Meta on macOS.

Shift+Enter

Insert a newline natively in iTerm2, WezTerm, Ghostty, Kitty, Warp, Terminal.app, and Windows Terminal.

In VS Code, Cursor, Alacritty, or Zed, run /terminal-setup first to install the binding.

Ctrl+J

Insert a newline. Works in any terminal without configuration.

Paste directly

Paste multiline content like code blocks or logs straight into the prompt.

/ at the start of input

Open the command or skill menu.

! at the start of input

Enter shell mode and run a command directly, without Claude's approval.

@

Trigger file path autocomplete.

:name:

Type a full emoji shortcode to insert it, or two-plus letters for suggestions.

? on empty input

Toggle the shortcut help panel.

? (in transcript viewer)

Toggle the keyboard shortcut help panel inside the transcript viewer.

{ / } (in transcript viewer)

Jump to the previous or next user prompt, like a vim paragraph motion.

[ (in transcript viewer)

Write the full conversation to your terminal's native scrollback so you can search it.

q, Ctrl+C, or Esc (in transcript viewer)

Exit the transcript viewer.

Hold or tap Space

Voice dictation. Hold to record, or run /voice tap for tap-to-toggle.

Vim mode

63 entries
/config -> Editor mode

Turn on vim-style editing for the prompt input.

vimInsertModeRemaps (settings.json)

Map a two-key INSERT-mode sequence like "jj" to Escape.

Only read from user or managed settings, never a project's .claude/settings.json - a checked-out repo can't remap your keystrokes.

Esc

Enter NORMAL mode from INSERT or VISUAL mode.

i

Insert text before the cursor.

I

Insert text at the beginning of the line.

a

Insert text after the cursor.

A

Insert text at the end of the line.

o

Open a new line below and enter INSERT mode.

O

Open a new line above and enter INSERT mode.

v

Start character-wise visual selection.

V

Start line-wise visual selection.

h / j / k / l

Move left / down / up / right.

Space

Move right.

w

Jump to the next word.

e

Jump to the end of the current word.

b

Jump to the previous word.

0

Jump to the beginning of the line.

$

Jump to the end of the line.

^

Jump to the first non-blank character on the line.

gg

Jump to the beginning of the input.

G

Jump to the end of the input.

f{char}

Jump to the next occurrence of a character.

F{char}

Jump to the previous occurrence of a character.

t{char}

Jump to just before the next occurrence of a character.

T{char}

Jump to just after the previous occurrence of a character.

;

Repeat the last f/F/t/T motion.

,

Repeat the last f/F/t/T motion in reverse.

/ (in NORMAL mode)

Open reverse history search, same as Ctrl+R.

x

Delete the character under the cursor.

dd

Delete the current line.

D

Delete to the end of the line.

dw / de / db

Delete the word, to its end, or back a word.

cc

Change (clear and re-insert) the current line.

C

Change to the end of the line.

cw / ce / cb

Change the word, to its end, or back a word.

s

Substitute the character under the cursor and enter INSERT mode.

S

Substitute the whole line and enter INSERT mode.

yy / Y

Yank (copy) the current line.

yw / ye / yb

Yank the word, to its end, or back a word.

p

Paste after the cursor.

P

Paste before the cursor.

>>

Indent the current line.

<<

Dedent the current line.

J

Join the current line with the next.

u

Undo the last change.

.

Repeat the last change.

iw / aw

Inner or around a word (a text object, used with d, c, or y).

iW / aW

Inner or around a WORD, delimited by whitespace only.

i" / a"

Inner or around double quotes.

i' / a'

Inner or around single quotes.

i( / a(

Inner or around parentheses.

i[ / a[

Inner or around brackets.

i{ / a{

Inner or around braces.

d / x (VISUAL mode)

Delete the selection.

y (VISUAL mode)

Yank the selection.

c / s (VISUAL mode)

Change the selection.

p (VISUAL mode)

Replace the selection with register contents.

r{char} (VISUAL mode)

Replace every selected character with {char}.

~ / u / U (VISUAL mode)

Toggle, lowercase, or uppercase the selection.

> / < (VISUAL mode)

Indent or dedent the selected lines.

J (VISUAL mode)

Join the selected lines.

o (VISUAL mode)

Swap the cursor and the anchor of the selection.

v / V (VISUAL mode)

Toggle between character-wise and line-wise selection, or exit visual mode.

Permissions & settings

12 entries
default

Requires your approval for each action.

Shown as "Manual" in the mode indicator.

acceptEdits

Automatically accepts file edits without prompting for approval.

plan

Requires you to review and approve Claude's plan before it executes anything.

auto

Classifier-based mode that automatically blocks or allows actions based on configured rules.

bypassPermissions

Skips every permission check.

Recommended only in sandboxes with no internet access.

Shift+Tab

Cycles through default, acceptEdits, plan, and any other modes you've enabled.

Managed settings

Highest precedence. Deployed by IT to every organization member or machine user.

.claude/settings.local.json

Project-specific and personal. Gitignored, applies to you alone in this repository.

.claude/settings.json

Project scope. Committed to the repo so every collaborator gets the same rules.

~/.claude/settings.json

User scope. Applies to every project on your machine and is never shared.

.mcp.json

Project-scoped MCP server config, meant to be committed so the whole team gets the same servers.

~/.claude.json

User-scope MCP servers and CLI state, tracked per project, never committed.

Hooks events

34 entries
SessionStart

Fires when a session begins or resumes.

Setup

Fires when you start Claude Code with --init-only, or with --init or --maintenance in -p mode.

UserPromptSubmit

Fires when you submit a prompt, before Claude processes it.

UserPromptExpansion

Fires when a user-typed command expands into a prompt, before it reaches Claude.

PreToolUse

Fires before a tool call executes.

PermissionRequest

Fires when a tool call needs a permission decision.

PermissionDenied

Fires when a tool call is denied by the auto mode classifier.

PostToolUse

Fires after a tool call succeeds.

PostToolUseFailure

Fires after a tool call fails.

PostToolBatch

Fires after a full batch of parallel tool calls resolves, before the next model call.

Notification

Fires when Claude Code sends a notification.

MessageDisplay

Fires while assistant message text is displayed.

SubagentStart

Fires when a subagent is spawned.

SubagentStop

Fires when a subagent finishes.

TaskCreated

Fires when a task is being created via TaskCreate.

TaskCompleted

Fires when a task is being marked as completed.

Stop

Fires when Claude finishes responding.

One of several events that ignores matchers entirely.

StopFailure

Fires when the turn ends due to an API error.

TeammateIdle

Fires when an agent team teammate is about to go idle.

InstructionsLoaded

Fires when a CLAUDE.md or .claude/rules/*.md file is loaded into context.

ConfigChange

Fires when a configuration file changes during a session.

CwdChanged

Fires when the working directory changes.

DirectoryAdded

Fires when a working directory is added mid-session.

FileChanged

Fires when a watched file changes on disk.

WorktreeCreate

Fires when a worktree is being created.

The one event where any non-zero exit code aborts the action, not just exit 2.

WorktreeRemove

Fires when a worktree is being removed.

PreCompact

Fires before context compaction.

PostCompact

Fires after context compaction completes.

Elicitation

Fires when an MCP server requests user input during a tool call.

ElicitationResult

Fires after a user responds to an MCP elicitation.

SessionEnd

Fires when a session terminates.

Exit 0

Success. Claude Code parses stdout for JSON output fields - JSON is only processed on exit 0.

Exit 2

Blocking error. Stderr is fed back to Claude as the reason; the exact effect depends on the event (PreToolUse blocks the tool call, UserPromptSubmit rejects the prompt).

Any other exit code

Non-blocking error for most events - the transcript shows the first line of stderr and execution continues.

CLI flags

45 entries
--add-dir <directories...>

Allow tool access to additional directories beyond the current working one.

--agent <agent>

Set the agent for the current session, overriding the agent setting.

--agents <json>

Define custom agents inline as a JSON object for this session only.

--allowedTools, --allowed-tools <tools...>

Allow specific tools without a permission prompt, e.g. "Bash(git *) Edit".

--disallowedTools, --disallowed-tools <tools...>

Deny specific tools for this session.

--append-system-prompt <prompt>

Append extra instructions to the default system prompt.

-c, --continue

Continue the most recent conversation in the current directory.

-r, --resume [value]

Resume a conversation by session ID, or open the interactive picker.

--dangerously-skip-permissions

Bypass all permission checks.

Recommended only for sandboxes with no internet access.

-d, --debug [filter]

Enable debug mode, optionally filtered by category, e.g. "api,hooks".

--effort <level>

Set the reasoning effort for the session: low, medium, high, xhigh, or max.

--fallback-model <model>

Automatically fall back to another model when the default is overloaded.

Only works with --print.

--ide

Automatically connect to the IDE on startup if exactly one valid IDE is available.

--mcp-config <configs...>

Load MCP servers from JSON files or strings for this session.

--strict-mcp-config

Only use MCP servers passed via --mcp-config, ignoring every other configured source.

--model <model>

Set the model for the session, by alias (fable, opus, sonnet) or full name.

-n, --name <name>

Set a display name for the session, shown in the prompt box and the /resume picker.

--no-chrome

Disable the Claude in Chrome integration for this session.

--permission-mode <mode>

Set the permission mode at startup: acceptEdits, auto, bypassPermissions, manual, dontAsk, or plan.

--plugin-dir <path>

Load a plugin from a local directory or .zip for this session only.

-p, --print

Print the response and exit, for piping into other commands.

--output-format <format>

Set the print-mode output format: text, json, or stream-json.

--input-format <format>

Set the print-mode input format: text or stream-json.

--json-schema <schema>

Constrain print-mode output to a JSON Schema.

--max-budget-usd <amount>

Cap dollar spend on API calls for this run.

Only works with --print.

--session-id <uuid>

Use a specific session ID for the conversation.

--setting-sources <sources>

Choose which settings sources load: user, project, local.

--settings <file-or-json>

Load extra settings from a file path or a JSON string.

--system-prompt <prompt>

Replace the default system prompt entirely.

--tools <tools...>

Restrict the built-in tool list available this session.

--verbose

Override the verbose mode setting from config.

-v, --version

Print the installed Claude Code version.

-w, --worktree [name]

Create a new git worktree for this session.

--bare

Minimal mode: skip hooks, plugins, auto-memory, and CLAUDE.md auto-discovery.

--safe-mode

Disable all customizations (CLAUDE.md, skills, plugins, hooks, MCP, themes) to troubleshoot a broken config.

claude mcp add <name> <commandOrUrl>

Add an MCP server, local (stdio) or remote (HTTP), to Claude Code.

claude mcp list

List every configured MCP server and its connection health.

claude mcp remove <name>

Remove a configured MCP server.

claude agents

Manage background agents from the terminal: list, dispatch, inspect.

claude auth login

Sign in to your Anthropic account from the CLI.

claude auth status

Show the current authentication status.

claude doctor

Check the health of your Claude Code installation from outside a session.

claude plugin install <plugin>

Install a plugin from an available marketplace.

claude update

Check for updates and install the latest version.

claude project purge [path]

Delete all Claude Code state for a project: transcripts, tasks, file history, config entry.

This is one searchable page, not a PDF: every built-in slash command, every keyboard shortcut and vim binding, the five permission modes and the settings file precedence, all 31 hook lifecycle events with their exit-code rules, and the CLI flags you actually reach for. Type into the search box and it filters across all of it at once, or pick a category tab to browse one section at a time.

The reason this exists is that Claude Code ships changes constantly and a cheat sheet written once goes stale fast. Pulling the list straight from the installed CLI's own help output turned up commands that most write-ups from even a few months back miss entirely: /btw for a side question that never touches your conversation history, /goal for a condition Claude keeps working toward across turns, /loop for running a prompt on a repeating interval, and /workflows for the scripted multi-agent runs this exact page could be one of. A static list can't catch up to that pace. This one gets rechecked against the CLI and the official docs, not rewritten from memory.

The permission modes section is the part people usually get wrong by half-remembering it. Shift+Tab cycles through default (labeled Manual in the UI), acceptEdits, plan, and auto or bypassPermissions if you've turned them on, and settings resolve in a fixed order: managed settings first, then command-line flags, then .claude/settings.local.json, then the committed .claude/settings.json, then your personal ~/.claude/settings.json last. Get that order backwards and a rule that should win silently loses. The settings.json generator builds the file itself if you're setting these rules up for the first time.

Hooks are the section with the most room to get burned, because the exit code is the only thing that decides whether anything actually blocks. Exit 0 means success and Claude Code parses stdout for JSON; exit 2 is the one that blocks the action and hands your stderr message back to Claude as the reason; any other code is non-blocking almost everywhere except WorktreeCreate, which treats every non-zero exit as a hard failure. All 31 events are listed here with when each one fires, and the complete hooks guide is where I go deeper on why PreToolUse and Stop are the two worth building around first.

Vim mode gets maybe a sentence in most other write-ups on this keyword, if it gets mentioned at all. It's here in full: mode switching, every NORMAL-mode motion and edit, the text objects, and visual mode, plus the vimInsertModeRemaps setting for mapping something like jj to Escape. Turn it on from /config under Editor mode.

I run Claude Code daily and this is the same reference I keep open in a tab while I work. If you want the finished version of the whole idea - a tuned CLAUDE.md, a tuned settings.json, and the full vetted tool stack, installed in one paste - that is what ClockedCode is. The link is at the bottom of this page.

Neo ZinoBy Neo Zino - builder of ClockedCode

FAQ

What's actually in this Claude Code cheat sheet?

Six categories: every built-in slash command, keyboard shortcuts (general controls, text editing, multiline input), vim-mode bindings, the five permission modes plus the settings file precedence, all 31 hook lifecycle events with their exit-code rules, and the CLI flags and subcommands from claude --help. It adds up to around 280 entries, all searchable from one box.

How do I know this is actually up to date?

The version and date are printed in the ledger above the search box. Every entry was pulled from the CLI actually installed on the machine that built this page (v2.1.220) and the official docs at code.claude.com, not copied from an older write-up, so it catches newer commands like /btw and /workflows that predate most competing lists.

Does this cover keyboard shortcuts too, or just commands?

Yes - keyboard shortcuts and vim-mode bindings are their own tabs, covering everything from Ctrl+O toggling the transcript viewer to the full set of vim text objects like iw and i". Search box works across every category at once, so typing "model" surfaces the /model command, the Option+P shortcut, and the --model flag together.

What's the difference between the permission modes?

default (shown as Manual) asks before every action, acceptEdits auto-approves file edits only, plan makes you approve Claude's plan before anything runs, auto uses a rule-based classifier to decide automatically, and bypassPermissions skips checks entirely and is meant for sandboxes with no internet access. Shift+Tab cycles through whichever ones you have enabled.

Is this cheat sheet free?

Yes - free, no sign-up, and the search runs entirely in your browser against a static list. ClockedCode separately sells a complete done-for-you Claude Code setup, but this reference itself is not gated.

Other free tools

Config generator

Hooks Preset Generator

Pick the automations you want, and get a validated Claude Code hooks block for settings.json, grouped and merged the same way the official examples are.

Try tool
Config generator

Permissions Generator

Pick a safe starting mode and your OS, and get a validated allow/deny permissions block for settings.json in under a minute.

Try tool
Config generator

Output Style Generator

Pick a persona and a tone, and get a valid output-style file with correct frontmatter, ready to save and switch to.

Try tool
Config generator

Subagent Generator

Describe the job in plain English, pick a specialty, and get a complete subagent file ready to save.

Try tool
Config generator

MCP Config Generator

Pick the MCP servers you use and get the exact claude mcp add commands or a ready .mcp.json block, scoped and copy-pasteable.

Try tool
Config generator

Slash Command Generator

Answer 7 quick questions and get a custom Claude Code slash command with valid frontmatter, ready to drop into .claude/commands/.

Try tool
Config generator

Statusline Generator

Toggle the segments you want, watch the exact statusline render live, then copy the tested script and settings.json block.

Try tool
Config generator

settings.json Generator

Pick permission rules, hook presets, env vars, and a model override one step at a time, then copy or download the finished settings.json.

Try tool
Config generator

CLAUDE.md Generator

Answer 7 quick questions, get a tuned CLAUDE.md for your project in 30 seconds.

Try tool
Template library

Claude Code Templates

A curated library of copy-paste Claude Code templates: subagents, hooks, slash commands, settings, and CLAUDE.md starters, each one explained and pulled from a setup that gets used every day.

Try tool
Token scanner

UsageCut

Scan your Claude Code setup in 30 seconds and see exactly what is burning your tokens - bloated context, heavy MCP servers, and settings quietly draining your usage limits.

Try tool