Claude Code cheat sheet: commands and shortcuts
One page to come back to: the keys that move you around the Code tab, how to stop, steer and undo, the slash commands you type in the prompt box, the terminal commands for the optional terminal lessons, and what each permission mode lets Claude do. You do not need to memorize any of it.
Desktop Code tab shortcuts
On Windows, Cmd becomes Ctrl. Shortcuts that start with Ctrl are the same on both. Press Cmd+/ (Ctrl+/ on Windows) inside the app to see the full list.
| Action | Mac | Windows |
|---|---|---|
| Show all shortcuts | Cmd+/ | Ctrl+/ |
| New session | Cmd+N | Ctrl+N |
| Next session / previous session | Ctrl+Tab / Ctrl+Shift+Tab | Ctrl+Tab / Ctrl+Shift+Tab |
| Stop Claude's response (or click the square stop button inside the prompt box) | Esc | Esc |
| Send a message after Claude finishes (queue it) | Cmd+Enter | Ctrl+Enter |
| Rewind to an earlier message (prompt box empty) | Esc Esc | Esc Esc |
| Accept the suggested next prompt, then press Enter to send it | Tab or Right arrow | Tab or Right arrow |
| Side chat: ask a question without adding it to the session (same as /btw) | Cmd+; | Ctrl+; |
| Open the permission mode menu | Cmd+Shift+M | Ctrl+Shift+M |
| Open the model menu | Cmd+Shift+I | Ctrl+Shift+I |
| Open or close the Terminal pane | Ctrl+` | Ctrl+` |
| Open or close the Browser pane | Cmd+Shift+B | Ctrl+Shift+B |
| Open or close the Changes (diff) pane | Cmd+Shift+D | Ctrl+Shift+D |
| Close the pane you are in | Cmd+\ | Ctrl+\ |
| Show more or less detail of Claude's work (Normal, Thinking, Verbose) | Ctrl+O | Ctrl+O |
Stop, steer and undo
These work in every permission mode. Stop Claude before you rewind: Rewind is not available while Claude is working.
| What you want | How | Good to know |
|---|---|---|
| Stop Claude right now | Click the square stop button inside the prompt box, beside the microphone, or press Esc. | What Claude already did stays. The step shows Stopped. |
| Correct Claude while it works | Type your correction in the prompt box and press Enter. | Claude reads it after its current step, without stopping. |
| Send a message for after Claude finishes | Type it and press Cmd+Enter (Ctrl+Enter on Windows). | It shows as Queued until Claude's turn ends. |
| Go back to an earlier message | Stop Claude, then type /rewind, or press Esc twice with the prompt box empty. | In the Rewind window, click the message, choose what to restore (files, conversation or both) and confirm. |
| What Rewind cannot bring back | Files changed by commands Claude runs (for example moving or renaming many files at once), or files you changed yourself. | Restore those from Google Drive version history, or from your own copy of the folder. |
| See a plan before anything changes | Pick Plan in the mode selector, or start your message with /plan. | When the plan looks right, click Accept and use auto mode and Claude starts. |
Slash commands for every day
Type the command at the start of your message and press Enter. In the Code tab, type / alone or click + then Slash commands to browse everything available, including skills.
| Command | What it does | Where it works |
|---|---|---|
| /help | Shows help and the list of available commands. | Terminal. In the Code tab, type / to see the list. |
| /status | Shows the version, model, account and connection. Read the Claude Code row to confirm a session is running. | Code tab and terminal. |
| /usage | Shows plan usage bars and what counts against your limit. /cost does the same. | Terminal. In the Code tab, click the usage ring under the prompt box, or open Settings > Usage on claude.ai. |
| /context | Shows what is filling up the conversation. | Code tab and terminal. |
| /compact | Summarizes the conversation so far to free space. Add words after it to say what to keep. | Code tab and terminal. |
| /clear | Starts a fresh conversation with empty context. The old one stays available in /resume. | Terminal. In the Code tab, press Cmd+N (Ctrl+N on Windows) for a new session instead. |
| /model | Switches the model and saves it as your default. In the picker, press s to switch for this session only. | Terminal. In the Code tab, use the model picker under the prompt box. |
| /btw | Asks a side question that is not added to the conversation. | Code tab and terminal. Cmd+; (Ctrl+; on Windows) does the same. |
| /plan | Runs the request you type after it in Plan mode: Claude shows a plan and changes nothing until you accept it. | Code tab and terminal. |
Slash commands for sessions, undo, memory and phone
| Command | What it does | Where it works |
|---|---|---|
| /rewind | Goes back to an earlier message: click it in the Rewind window, then choose to restore the files, the conversation or both. | Code tab and terminal. Stop Claude first. Esc twice on an empty prompt box does the same. |
| /resume | Picks an earlier conversation to continue. | Code tab and terminal. In the Code tab it can also pick up a terminal session. |
| /init | Creates a starter CLAUDE.md rules file for the current folder. | Code tab and terminal. |
| /memory | Opens your CLAUDE.md files and the auto memory switch. | Terminal only. In the Code tab, open the session details panel (first icon at the right of the title bar) and expand Memory files in the Context card. Edit CLAUDE.md from the Files pane. |
| /mcp | Lists your connectors and MCP servers, shows which are connected, and signs you in to the ones that need it. | Terminal. In the Code tab, click + > Connectors > Browse connectors (or Manage connectors), or open Customize > Connectors. |
| /remote-control | Makes this session reachable from your phone or claude.ai/code. Run it again to disconnect. /rc is the short form. | Code tab and terminal. Your computer must stay on with the app open. |
| /mobile | Shows a QR code to download the Claude mobile app. | Code tab and terminal. |
Terminal commands (optional terminal lessons)
Only for the optional terminal lessons. The Desktop app already includes Claude Code, so you never need these for the Code tab. Git for Windows is optional.
| Task | Command | Note |
|---|---|---|
| Install on Mac (Terminal) | curl -fsSL https://claude.ai/install.sh | bash | Shows no progress while downloading. When it finishes, open a new Terminal window. |
| Install on Windows (PowerShell) | irm https://claude.ai/install.ps1 | iex | If you see 'irm' is not recognized, you opened Command Prompt instead of PowerShell. Open a new window when it finishes. |
| Check it works | claude --version | Prints a version such as 2.1.211 (Claude Code). |
| Start a session in the folder you are in | claude | The first run opens your browser to sign in. |
| Start with a task already typed | claude "explain this project" | Same as starting, then typing the prompt. |
| Update now | claude update | The version you installed above also updates itself in the background. |
| Check the installation | claude doctor | Checks your install for problems and changes nothing. |
| Continue the last conversation in this folder | claude --continue | Prints 'No conversation found to continue' if there is none. |
| Pick an earlier conversation | claude --resume | Opens a picker. Add a session name after it to resume that one directly. |
| Start in Plan mode | claude --permission-mode plan | Claude shows a plan and changes nothing until you accept it. |
| Open this folder in the Desktop app instead | claude --desktop | Needs Claude Code 2.1.285 or newer, on Mac or x64 Windows. |
| Leave Claude Code | exit | Or press Ctrl+D twice on an empty prompt. Esc interrupts Claude without leaving. |
Permission modes
In the Code tab the mode selector sits at the right end of the row under the prompt box, after the model name and the effort setting (how hard Claude thinks). This course uses Auto. In the terminal, Shift+Tab cycles the modes and the status bar shows the current one.
| Mode | What runs without asking | How to choose it |
|---|---|---|
| Auto (Recommended) | Routine work in your folder, with no cards. A built-in check reviews each action and stops some, such as deleting files that were already there; a stopped step shows Blocked by auto mode. If you add a limit to the prompt, such as "don't delete anything", it counts as a block too. | Mode selector > Auto. If it is missing, pick Opus 5.5 or Sonnet 5.5 in the model picker and look again. |
| Plan | Reading and exploring only. Claude shows a plan and changes nothing until you accept it. | Mode selector > Plan, or start your message with /plan. Terminal: claude --permission-mode plan. |
| Accept edits | File edits and file commands, deleting files included, without asking. Clicking Always allow on a file card switches the session here. | Mode selector > Accept edits. You can pick Auto again in the mode selector any time. |
| Bypass permissions | Everything, with no checks at all. | Hidden unless 'Allow bypass permissions mode' is turned on in Settings. This course uses Auto. |
| Every mode still asks before | Claude's own questions to you, its first action on an outside website, and edits to Claude Code's own settings files. | Nothing to choose. These cards appear in every mode. |
| When a plan is ready | A card, Claude proposed a plan, shows: Reject / Revise… / Accept and use auto mode. | Click Open plan to read it. Revise… lets you type what should change. Click Accept and use auto mode to let Claude start; if you also see a plain Accept, skip it. |
| When a card asks before one action | For example: Allow Claude to run this command? or Allow Claude to write notes.md? | If it matches what you asked, Always allow is a good choice: Claude stops asking for that kind of action (on a file card it switches the session to Accept edits). Allow once is for a one-off; on a file card it is under the arrow next to Always allow. Choose Deny if it is not what you asked for. |
| To choose what a connector can do | Each tool row has three choices: always allow, ask first, or Blocked. Leave them on, or block the ones you don't want. | Customize > Connectors > the connector > the icons on each tool row. For read only, block the tools that send, post or delete. Blocked works in every mode. |