Claude Code Commands Cheat Sheet (Printable PDF)

Claude Code Commands Cheat Sheet (Printable PDF)

This Claude Code commands cheat sheet puts the slash commands, prefix keys and keyboard shortcuts you will actually use on one page. You can read it below, or grab the printable PDF further down and keep it next to your keyboard.

Claude Code ships with well over a hundred commands and skills, so nobody remembers them all. We opened a real session, tried the menus and shortcuts ourselves, and checked every entry against Anthropic’s official reference.

This post is part of our Claude Code tutorials collection, where each post answers one specific question. If you also want to know what each command costs in tokens, see our guide on checking token usage.

Tested with Claude Code v2.1.316 on November 2, 2026. We tested on macOS; the Windows and Linux steps follow Anthropic’s official instructions.

Quick Answer: The Commands to Learn First

If you only memorize a handful, make it these. They cover starting fresh, saving space, checking what is going on and changing how Claude behaves.

Command or keyWhat it does
/clearStarts a new conversation with empty context
/compactSummarizes the conversation to free up context
/contextShows how full the context window is
/modelSwitches the AI model
/permissionsManages allow, ask and deny rules
/resumeReopens an earlier conversation
Shift+TabCycles through permission modes
! at the startRuns a shell command directly

Claude Code Commands Cheat Sheet as a Printable PDF

We rendered the full cheat sheet to a single A4 page, so it prints cleanly on one sheet. It groups the commands into sessions, context and cost, setup, working, prefix keys and keyboard shortcuts.

Download the PDF

Learn five commands and four prefix keys first. The slash menu can teach you the rest.

The commands list changes with each release. The PDF matches the version we tested, so type / in your own session to see what your copy offers.

How to Open the Command Menu

You never need to type a command from memory. Type / at the start of the prompt and Claude Code lists what is available.

Claude Code terminal showing the slash command menu after typing a single slash
Typing a single / opens the menu of commands and skills.

The menu mixes built-in commands with skills, so it may also show skills from plugins you installed. In our demo it listed items such as /doctor, /add-dir and /autocompact next to a short description of each.

Filter the menu as you type

Keep typing and the list narrows. We typed com and /compact rose to the top, with the matching letters shown in white.

Claude Code slash menu filtered by the letters com with compact highlighted first
Typing /com puts /compact at the top of the list.

According to the official docs, Claude Code highlights the top suggestion only when your letters match the start of a command name, or the start of a word inside it. Typing /adddir highlights /add-dir, and typing /new highlights /clear through its alias.

Official Claude Code docs page explaining how the command menu matches what you type
The docs explain which typing patterns get a highlighted suggestion.

Two more details from that page are worth knowing. After a typo, nothing is highlighted, and pressing Enter sends your text as typed and reports an unknown command. Commands you cannot use are left out of the menu entirely.

See the full list with /help

Run /help and press the right arrow to reach the commands tab. In our session it showed a block of commands and a counter reading 97 more below them.

Claude Code help screen listing default commands with a counter for the remaining ones
The help screen lists the commands and counts how many more are below.

The Official Claude Code Commands Reference

For the complete list with every argument, use Anthropic’s reference. Each row gives the command, its arguments in brackets and a plain description.

Official Claude Code commands reference table with the compact row highlighted
The official reference lists /compact [instructions] and every other command with its arguments.

The commands reference also marks which entries are skills, such as /batch, /loop and /simplify, and which are plain built-in commands. It notes a few hidden ones, such as /heapdump, that only run when you type the full name.

Claude Code Session Commands

These control the conversation itself: starting, shrinking, saving and going back.

CommandWhat it does
/clearStarts a new conversation with empty context. Pass a name to label the old one in the resume picker
/compact [instructions]Summarizes the conversation so far. You can pass focus instructions
/resume [session]Resumes a conversation by ID or name, or opens the picker
/rename [name]Renames the current session
/branch [name]Branches the conversation so you can try another direction
/rewindRewinds the conversation, the code, or both to an earlier point
/export [filename]Exports the conversation as plain text
/copy [N]Copies the last response, or the Nth-latest
/exitExits the CLI. /quit is an alias

If your question is about wiping history rather than starting fresh, our guide on clearing session history covers it.

Context and Cost Commands

Long conversations get expensive and less sharp. These commands show you where you stand.

  • /context shows context usage as a colored grid, with suggestions for heavy tools and bloated memory files.
  • /usage shows session cost, plan limits and activity. The docs list /cost and /stats as aliases for it.
  • /diff reviews the changes in your working tree, including the edits Claude has made.
  • /btw [question] asks a side question without adding it to the conversation.
  • /focus toggles a view that shows only your last prompt, a one-line tool summary and the final response.
  • /tasks shows and manages background work in the current session.

Be careful with account screens. Commands such as /usage and /status can show account details, so we left them out of our screenshots and avoid pasting them in public.

Setup and Configuration Commands

Run these once, or whenever you change how Claude should work in a project.

CommandWhat it does
/initCreates a CLAUDE.md guide for the project
/memoryEdits CLAUDE.md files and shows auto memory entries
/configOpens settings for theme, model, output style and more
/model [model]Switches the model and saves it as your default
/effort [level]Sets the effort level
/permissionsManages allow, ask and deny rules
/hooksShows hook configurations
/mcpManages MCP server connections
/pluginManages plugins
/skillsLists available skills
/agentsPoints you to creating and managing subagents
/doctorRuns a setup checkup
/themeChanges the color theme
/keybindingsOpens your keyboard shortcuts file

Many of these edit files you can also change by hand. See our settings.json examples and the CLAUDE.md template for what to put inside. For the effort levels, read our post on effort levels.

Commands for Getting Work Done

These start bigger jobs. Several are skills, which means they are prompts bundled with Claude Code rather than hard-coded commands.

  • /plan [description] enters plan mode straight from the prompt.
  • /goal [condition] keeps Claude working across turns until the condition is met.
  • /loop [interval] [prompt] runs a prompt repeatedly while the session stays open.
  • /code-review reviews the current diff or a pull request. /review is an alias.
  • /security-review analyzes your branch changes for security problems.
  • /simplify reviews changed code for cleanup and applies the fixes.
  • /batch plans a large change and splits it across background agents.
  • /background detaches the session to run in the background and frees the terminal.

Some commands need extra setup or a specific plan. The reference notes, for example, that /schedule is not available on a Console API key, so your menu may differ from ours.

Prefix Keys: Slash, Bang, At and Question Mark

The first character of your prompt changes what Claude Code does with it. This is the part most beginners miss.

Diagram showing that a prompt starting with slash is a command, bang is shell mode, at is a file mention and question mark opens shortcuts
The first key of a prompt decides how Claude Code treats it.

Press ? to see shortcuts

On an empty prompt, type ? and a panel lists the shortcuts your terminal supports. Our panel showed the prefix keys in the first column and keys such as shift + tab, ctrl + o and ctrl + t in the next ones.

Claude Code shortcut help panel with the shell mode, commands, file paths and side question prefixes highlighted
The ? panel gathers the prefix keys and common shortcuts in one place.

Typing ? when the prompt already has text just inserts the character. That is how the docs describe it, and it matches what we saw.

Run shell commands with !

Start a prompt with ! and Claude Code switches to shell mode. In a demo folder we ran ls this way, and it listed two files at once with no approval prompt.

Claude Code shell mode output of ls showing two files, followed by a short reply from Claude
Shell mode ran ls directly, and Claude then replied about the output.

The docs say shell mode runs the command, adds its output to the session and lets Claude respond to it. That reply costs a little, so use plain ! for quick checks only.

Official docs quick commands table with the exclamation mark shell mode row highlighted
The docs list /, !, @ and ? as quick commands.

Mention files with @

Type @ in a prompt to trigger file path autocomplete, so Claude knows exactly which file you mean. It saves you from typing long paths by hand.

Keyboard Shortcuts You Will Use Daily

The interactive mode reference has dozens of shortcuts. These are the ones worth keeping in muscle memory.

ShortcutWhat it does
Shift+TabCycles permission modes
EscInterrupts Claude mid-turn without losing the work done so far
Esc twiceClears your draft, or rewinds when the input is empty
Ctrl+CInterrupts, or clears input. A second press with nothing running exits
Ctrl+DExits the session
Ctrl+RSearches your command history
Ctrl+BMoves a running command to the background
Ctrl+TShows or hides Claude’s task checklist
Ctrl+OToggles the transcript viewer
Ctrl+GOpens your prompt in your default text editor
Ctrl+SStashes your prompt, and restores it on the next press
Option+P (macOS)Switches model without clearing your prompt

Cycle permission modes with Shift+Tab

Press Shift+Tab and the status line under the prompt changes. In our run it moved from manual mode to accept edits on, and it said to press shift+tab to cycle.

Claude Code status line reading accept edits on after pressing Shift+Tab
One Shift+Tab press changed the mode shown under the prompt.
Official interactive mode docs row for Shift+Tab describing how it cycles permission modes
The docs say Shift+Tab cycles through the permission modes.

The reference lists default, acceptEdits and plan, plus bypassPermissions and auto when they are available to you. Know which mode you are in before you walk away from a long task.

Start a new line without sending

Typing \ and then Enter works in every terminal. Ctrl+J also works without any setup, and Shift+Enter works natively in several terminals, including iTerm2, WezTerm, Ghostty, Kitty, Warp and Apple Terminal.

Claude Code Commands Cheat Sheet Card

Here is the compact card version. Save the image, or use the PDF for the longer list.

Cheat sheet card with Claude Code session commands, setup commands, prefix keys and keyboard shortcuts
Claude Code commands cheat sheet, tested with v2.1.316.

Try It Yourself

Practice in a throwaway folder so nothing real is at risk. Make an empty folder, start Claude Code there and follow these steps.

  1. Type / and scroll the menu with the arrow keys, then press Esc.
  2. Type /com and notice which command is highlighted.
  3. Type ? on an empty prompt to read the shortcut panel.
  4. Type ! ls and press Enter.
  5. Press Shift+Tab and read the new mode on the status line.

Then ask Claude to teach you more with this prompt:

Explain what /context, /compact and /clear each do in one sentence, and tell me when I should use each one.

Common Mistakes

  • Typing a command with a typo and pressing Enter. The docs say Enter submits your text as typed and reports an unknown command.
  • Using /clear when you wanted /compact. Clearing starts empty, while compacting keeps a summary.
  • Forgetting which permission mode is active after pressing Shift+Tab.
  • Expecting every command to exist on every plan or install. Some are hidden, removed in newer versions or limited to certain accounts.
  • Pressing Ctrl+C twice by habit. With nothing running, the second press exits Claude Code.

Pro Tips

  • Use /compact with focus instructions, such as keeping the failing test names, so the summary keeps what matters.
  • Use /btw for quick questions that should not clutter the main conversation.
  • Press Ctrl+R to search old prompts instead of retyping them.
  • Press Ctrl+G to write a long prompt in your own editor.
  • If you queued a message by mistake, see our guide on cancel queued messages.
  • Learn where project instructions live in our project structure guide.

Frequently Asked Questions

How many commands does Claude Code have?

It depends on your version, plan and plugins. Our help screen counted about a hundred commands in the list, and the official reference page lists more than that. Type / to see yours.

How do I see all Claude Code commands?

Type / for the filtered menu, or run /help and open the commands tab. The full list with arguments lives in the official commands reference.

What is the difference between a command and a skill?

Built-in commands are part of Claude Code. Skills are prompts that Claude follows, and they appear in the same menu. The reference marks skill rows with the word Skill.

How do I run a terminal command inside Claude Code?

Start the prompt with !, for example ! ls. It runs directly, and the output goes into the session.

Why is a command missing from my menu?

Claude Code leaves out commands that are not available to you. Some are also hidden on purpose and appear only when you type the full name.

Conclusion

You do not need to learn every command in Claude Code. Learn /clear, /compact, /context, /model and /permissions, remember the prefix keys /, !, @ and ?, and add Shift+Tab to your habits. Print the PDF, tape it nearby, and use the / menu for everything else. For deeper details, the official interactive mode reference covers every shortcut, and you can use Claude through our Claude AI overview if you are new to it.

Newsletter

New AI tools in your inbox

The best new tools and the AI news that matters, in one short email. Unsubscribe any time.

Free · No spam · Unsubscribe any time

✓ Looks like you’re subscribed

Loading Google’s sign-up form…

Looks like you’re already subscribed

Thanks for reading! New AI tools and the AI news that matters will land in your inbox.

Not subscribed yet? Refresh the page to load the sign-up form.

The sign-up form couldn’t load. If you use an ad or content blocker, allow news.google.com and reload the page.

Free instant check before you pay. Takes a few seconds.

Scroll to Top