Claude Code Cheat Sheet
A searchable, printable Claude Code reference — CLI commands, slash commands, modes, flags, configuration and handy workflows. Free.
Launching
10claude
claude "fix the build"
claude -p "explain this repo"
cat log | claude -p "find the error"
claude -c / claude --continue
claude -r / claude --resume
claude --resume <session-id>
claude update
claude doctor
claude mcp
Slash commands
12/help
/clear
/compact
/init
/model
/agents
/mcp
/config
/review
/vim
/memory
/cost
Prompt prefixes
6@path/to/file
# remember this
! ls -la
/command
@folder/
paste image
Modes
6Shift + Tab
auto-accept edits
plan mode
normal mode
--permission-mode plan
--permission-mode acceptEdits
Keyboard shortcuts
9Esc
Esc Esc
Ctrl + C
Ctrl + D
Ctrl + L
Ctrl + R
Up / Down
Shift + Tab
\ + Enter
Common flags
10--model <name>
--add-dir <path>
--permission-mode <m>
--allowedTools "Bash,Edit"
--disallowedTools "Bash"
--output-format json
--max-turns 5
--append-system-prompt "..."
--verbose
--dangerously-skip-permissions
Configuration & memory
9.claude/settings.json
.claude/settings.local.json
~/.claude/settings.json
CLAUDE.md
CLAUDE.local.md
~/.claude/CLAUDE.md
.claude/commands/*.md
.mcp.json
permissions.allow / deny
Hooks
8PreToolUse
PostToolUse
UserPromptSubmit
Stop
SubagentStop
SessionStart
Notification
matcher: "Edit|Write"
MCP servers
8claude mcp add <name> -- <cmd>
claude mcp add --transport http <name> <url>
claude mcp list
claude mcp get <name>
claude mcp remove <name>
/mcp
--mcp-config <file>
@server:resource
Handy workflows
8claude "/review"
plan first, then build
# add a project convention
@file.php explain this
claude -p "..." | tee out.txt
git diff | claude -p "write a commit msg"
/clear between tasks
/compact when long
No entry matches “:q”.
About Claude Code Cheat Sheet
This Claude Code cheat sheet is a quick reference to the AI coding CLI: launching the tool, slash commands, prompt prefixes, modes, keyboard shortcuts, common flags, configuration and memory, hooks, MCP servers, and a section of handy workflows that combine them.
Agentic CLIs grow features quickly, and the useful ones — how to switch modes, which slash command manages memory, how to wire up an MCP server or a hook — are easy to forget between sessions. Each row here pairs the exact command or keystroke with a one-line description.
The sheet is free and rendered entirely in your browser. Filter it live with the search box, jump between sections from the sticky table of contents, copy any command with one click and print it as an onboarding hand-out for your team.
How to use Claude Code Cheat Sheet
- Skim the sections, from Launching and Slash commands through Hooks and MCP servers to Handy workflows.
- Search for a term like memory, mode or mcp to filter the commands live.
- Jump to a section such as Common flags or Configuration & memory via the sticky sidebar.
- Click a command or its copy icon to copy it into your terminal or notes.
- Print the sheet as a quick-start reference for teammates adopting the tool.