← All guides

Guide · Cheat sheet · ★☆☆☆☆

Claude Code cheat sheet: the commands a beginner needs

Every command from the beginner guides on this site, on one page. Bookmark it. Each row links to the guide with the details.

By Arthur Hsiao · Last updated · 4 min read

Checked on 15 Nov 2026 against the commands and keyboard shortcuts docs, and claude --help on Claude Code 2.1.325, Windows 11. Type / in a session to see every command you have. This page is only the ones a beginner needs. In the VS Code panel, some terminal-only items (!, /config) are missing: see Claude Code in VS Code.

1Start and stop

Type What it does More
claude Start a session in the current folder Install
claude -c Continue the most recent conversation here /clear vs /compact
claude -r Pick an old conversation to resume /clear vs /compact
/resume The same, from inside a session /clear vs /compact
Esc Stop Claude mid-reply; it keeps the work so far
Ctrl+C Stop a running step, or clear the input; press twice to quit
/exit Quit Claude Code

2Undo

Type What it does More
Esc Esc With an empty input: open the rewind menu Undo
/rewind The same menu (also /undo) Undo
/diff See what changed in the folder Beginners
git diff See changes since the last commit Git
git restore <file> Throw away a file's uncommitted changes Git
git revert <id> Undo a commit with a new commit Git

Rewind can't undo shell commands such as rm or mv. Commit before a big task.

3Context and memory

Type What it does More
/context See what fills the context window /clear vs /compact
/clear New conversation, empty context (also /new) /clear vs /compact
/compact keep ... Summarise the chat so far, keeping what you name /clear vs /compact
/init Create a CLAUDE.md for the project CLAUDE.md
/memory Open and edit your CLAUDE.md and memory files CLAUDE.md
@ + path Add a file to your prompt Save tokens

4Permissions and modes

Type What it does More
Shift+Tab Cycle modes: Manual, Accept edits, Plan, Auto Permissions
/plan Go straight to plan mode Plan mode
/permissions See and remove allow, ask and deny rules Permissions
Tab on Yes or No Add a comment to your answer Permissions

5Models and usage

Type What it does More
/model Pick a model; saves it as your default Which model
/model opusplan Opus in plan mode, Sonnet for the build Which model
Alt+P Switch model without clearing your prompt Which model
/usage Session cost and your plan's limits Pro vs Max

6Help and fixes

Type What it does More
/help Show help and the commands you have
/status Version, model, account, which settings loaded Which model
claude doctor Check the install and settings, from the terminal Install
/login Sign in again Install
! + command Run a shell command yourself and show Claude the output (terminal only) VS Code

Keys for typing

  • Shift+Enter: a new line without sending (works in Windows Terminal).
  • Up: your previous prompts.
  • Alt+V: paste an image on Windows.
  • Ctrl+O: show the full transcript, with the model used on each reply.

The habit that saves the most retries is not a command: how to write prompts for Claude Code.

New here? The path is which plan, install, then Claude Code for beginners.