What is in this Claude Code cheat sheet?
This Claude Code cheat sheet is a single page of the commands, flags, shortcuts and file locations you reach for most: how to launch and resume sessions, which CLI flags matter, the slash commands and keys you use every day, the permission modes, and where memory, settings, skills and MCP config live. Every entry below comes from the official docs at code.claude.com, checked on 23 October 2026.
It is a reference, not a tutorial. If you have not installed Claude Code yet, start with the Claude Code setup guide. For a deeper look at built-in and custom commands, see the slash commands guide.
Install and launch
The official installer is the recommended method on macOS, Linux and WSL. Homebrew is also supported, but Homebrew installs do not auto-update. Full instructions, including Windows, are on the official setup page.
# macOS, Linux, WSL (native install, auto-updates)
curl -fsSL https://claude.ai/install.sh | bash
# Homebrew (stable channel)
brew install --cask claude-code
# check it worked
claude --version
CLI commands
These are the commands you type in your shell, before a session starts. The first column is what you type; the second is what it does.
| Command | What it does |
|---|---|
claude |
Start an interactive session |
claude "query" |
Start a session with a first prompt already sent |
claude -p "query" |
Answer once, print the result, then exit |
cat file | claude -p "query" |
Process piped content, such as logs |
claude -c |
Continue the most recent conversation in this folder |
claude -c -p "query" |
Continue the last conversation non-interactively |
claude -r "<session>" "query" |
Resume a session by ID or name |
claude update |
Update to the latest version |
claude auth login |
Sign in (add --console to bill through the Anthropic Console) |
claude auth status |
Show sign-in status as JSON (--text for plain text) |
claude doctor |
Print install and settings diagnostics without starting a session |
claude mcp |
Configure MCP servers (see the MCP section below) |
claude plugin |
Manage plugins (alias claude plugins) |
claude agents |
Open agent view to watch and dispatch background sessions |
claude setup-token |
Generate a long-lived token for CI and scripts |
CLI flags
Flags change how a session starts. The official CLI reference notes that claude --help does not list every flag, so a flag missing from --help may still exist.
| Flag | What it does |
|---|---|
-p, --print |
Non-interactive mode: print the response and exit |
-c, --continue |
Load the most recent conversation in the current folder |
-r, --resume |
Resume a session by ID or name, or open a picker |
-n, --name |
Name the session so you can resume it by name later |
--model |
Pick a model by alias (sonnet, opus, haiku) or full name |
--effort |
Set the effort level for this session, such as high |
--permission-mode |
Start in default, acceptEdits, plan, auto, dontAsk or bypassPermissions |
--dangerously-skip-permissions |
Skip permission prompts; same as bypassPermissions. Containers and VMs only |
--allowedTools |
Tools that run without asking, such as "Bash(git diff *)" |
--disallowedTools |
Deny rules; a bare tool name removes that tool |
--add-dir |
Give Claude access to extra folders |
-w, --worktree |
Start in an isolated git worktree |
--output-format |
Print mode output: text, json or stream-json |
--max-turns |
Cap agentic turns in print mode |
--append-system-prompt |
Add text to the end of the default system prompt |
--mcp-config |
Load MCP servers from a JSON file or string |
--bare |
Skip hooks, skills, plugins, MCP, memory and CLAUDE.md for faster scripted runs |
--verbose |
Show full turn-by-turn output |
-v, --version |
Print the version |
A few combinations worth memorizing:
# start in plan mode, read-only until you approve a plan
claude --permission-mode plan
# one-off review in a script, JSON output, capped at 3 turns
claude -p "review src/auth for obvious bugs" --output-format json --max-turns 3
# name a session, then come back to it tomorrow
claude -n "auth-refactor"
claude -r "auth-refactor"
Slash commands you will use every day
Type / inside a session to see everything available to you, or / plus a few letters to filter. A command only runs when it starts your message. This is a short list; the official commands reference has all of them, and our slash commands guide explains how to write your own.
| Command | Use it to |
|---|---|
/init |
Generate a starter CLAUDE.md for the project |
/memory |
Edit CLAUDE.md files and turn auto memory on or off |
/clear |
Start a fresh conversation (aliases /reset, /new) |
/compact [focus] |
Summarize the conversation to free context |
/context |
See what is filling the context window |
/model |
Switch model; arrows adjust effort where supported |
/effort |
Set the effort level |
/plan [task] |
Enter plan mode, optionally with a task |
/permissions |
Manage allow, ask and deny rules |
/config |
Open settings (alias /settings) |
/resume |
Return to an earlier conversation |
/rewind |
Roll code and conversation back to a checkpoint |
/diff |
Review changes in your working tree |
/code-review |
Check the current diff for bugs (alias /review) |
/btw |
Ask a side question without adding it to history |
/mcp |
Manage MCP connections and sign-ins |
/plugin |
Browse, install, enable and disable plugins |
/skills |
List available skills |
/statusline |
Set up a custom status line |
/usage |
Session cost, plan limits and stats (aliases /cost, /stats) |
/doctor |
Run a setup checkup that can propose fixes |
/help |
Show help |
/exit |
Quit (alias /quit) |
Keyboard shortcuts
Shortcuts can vary by terminal. On macOS, the Option shortcuts that use Alt letters need Option set as Meta in your terminal. The full table is on the interactive mode page.
| Keys | What it does |
|---|---|
Esc |
Stop Claude mid-turn so you can redirect; closes dialogs |
Esc Esc |
Clear the draft; on an empty prompt, open the rewind menu |
Shift+Tab |
Cycle permission modes |
Ctrl+C |
Interrupt; on an idle prompt, clear input, press again to exit |
Ctrl+D |
Exit (press twice) |
Ctrl+R |
Reverse search your prompt history |
Ctrl+O |
Toggle the transcript viewer with full tool output |
Ctrl+G |
Open your prompt, or a proposed plan, in your text editor |
Ctrl+B |
Send a running Bash command or agent to the background |
Ctrl+T |
Show or hide Claude's task checklist |
Ctrl+S |
Stash the current prompt, press again to restore it |
Ctrl+L |
Redraw the screen if the display gets garbled |
Ctrl+V |
Paste an image from the clipboard (Cmd+V in iTerm2) |
Option+P / Alt+P |
Switch model without clearing your prompt |
Option+T / Alt+T |
Toggle extended thinking on models that support the toggle |
Up / Down |
Move through prompt history |
? |
On an empty prompt, toggle the shortcut help panel |
Prefixes and multiline input
| Type | Result |
|---|---|
/ at the start |
Run a command or skill |
! at the start |
Shell mode: run a command and add its output to the session |
@ |
Autocomplete a file path to mention |
\ then Enter |
New line, works in every terminal |
Ctrl+J |
New line, works without configuration |
Shift+Enter |
New line in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal; in VS Code, Cursor, Alacritty or Zed, run /terminal-setup first |
Permission modes
A permission mode decides what Claude can do without asking. Press Shift+Tab to cycle; the status bar shows the active mode, such as ⏸ plan mode on. According to the permission modes docs, interactive terminal and VS Code sessions start in auto mode by default on Claude Code v2.1.283 or later.
| Mode | Runs without asking | Good for |
|---|---|---|
default (shown as Manual) |
Reads only | Sensitive work, unfamiliar code |
acceptEdits |
Reads, file edits, common file commands like mkdir and mv |
Iterating on code you review |
plan |
Reads, plus classifier-approved commands when auto mode is available | Exploring before changing anything |
auto |
Everything, with background safety checks | Long tasks with fewer prompts |
dontAsk |
File reads in your working folders and pre-approved tools; anything else is denied | Locked-down CI |
bypassPermissions |
Everything | Isolated containers and VMs only |
Deny rules still block in every mode, including bypassPermissions. For a full walkthrough of planning, see the plan mode guide.
Memory files
Claude Code reads CLAUDE.md files at the start of each session and joins them together rather than letting one override another. Parent folders load at launch; CLAUDE.md files in subfolders load when Claude works in that folder. Our Claude Code memory guide covers loading order and auto memory, and the CLAUDE.md guide covers what to write.
| Scope | Location |
|---|---|
| Managed policy | /Library/Application Support/ClaudeCode/CLAUDE.md (macOS), /etc/claude-code/CLAUDE.md (Linux, WSL) |
| User | ~/.claude/CLAUDE.md |
| Project | ./CLAUDE.md or ./.claude/CLAUDE.md |
| Local, not committed | ./CLAUDE.local.md |
| Topic rules | .claude/rules/*.md and ~/.claude/rules/*.md |
| Auto memory | ~/.claude/projects/<project>/memory/MEMORY.md |
Inside a CLAUDE.md, @path/to/file imports another file. Run /context to see which memory files loaded.
Settings files
When the same key appears in several places, the higher level wins: managed settings, then --settings on the command line, then project local, then shared project, then user.
| Scope | File | Affects |
|---|---|---|
| User | ~/.claude/settings.json |
You, in every project |
| Shared project | .claude/settings.json |
Everyone in the repo (commit it) |
| Project local | .claude/settings.local.json |
You, in this project only |
| Managed | managed-settings.json and other managed sources |
Everyone your organization deploys it to |
For example, this makes every terminal session in a project start in plan mode:
{
"permissions": {
"defaultMode": "plan"
}
}
Skills and plugins
A skill is a folder with a SKILL.md file; the folder name, or the name in its frontmatter, becomes the /command. Custom commands in .claude/commands/ still work, but skills are the current format. See the Claude Code skills guide and the plugins guide for details.
| Where | Path | Applies to |
|---|---|---|
| Personal skill | ~/.claude/skills/<name>/SKILL.md |
All your projects on this machine |
| Project skill | .claude/skills/<name>/SKILL.md |
This repo; commit it to share |
| Plugin skill | <plugin>/skills/<name>/SKILL.md |
Wherever the plugin is enabled, as /plugin-name:skill-name |
# add a plugin marketplace, then install a plugin from it
claude plugin marketplace add <source>
claude plugin install <plugin>
# list installed plugins
claude plugin list
Inside a session, /plugin opens the plugin menu, /reload-plugins applies plugin changes without restarting, and /reload-skills picks up skills you added on disk.
MCP commands
MCP servers give Claude extra tools, such as an issue tracker or a database. The official MCP docs cover scopes and authentication; our Claude Code MCP guide walks through setup.
# add a remote HTTP server
claude mcp add --transport http notion https://mcp.notion.com/mcp
# add a local stdio server (everything after -- is the command)
claude mcp add --transport stdio myserver -- npx server
# list, inspect and remove servers
claude mcp list
claude mcp get notion
claude mcp remove notion
Add --scope project to save a server in a shared .mcp.json for your team, or --scope user to use it in every project. Inside a session, /mcp shows status and handles OAuth sign-in.
Keep your own cheat sheet
The commands above are the same for everyone. The prompts and skills you build on top of them are what make Claude Code yours, and they are easy to lose across machines and repos. Kipt keeps your prompts and skills as Markdown in a private GitHub repo you own, with Cmd+K search and one command that installs every skill into Claude Code. If you have a prompt you keep retyping, the free SKILL.md generator turns it into a skill you can drop into ~/.claude/skills/.