Getting started

The Claude Code Cheat Sheet: Commands + Shortcuts

5 minute readUpdated June 2026Explore more

TL;DR

Claude Code has a small set of commands and shortcuts that do most of the work - and most people only use two of them. Learn the slash commands, the keyboard shortcuts, and the three inline symbols (@, #, !) and you stop fighting the tool and start moving. Keep this open in a second tab for your first week.

Start here: the five that save the most time

If you learn nothing else, learn these. They cover the moments where beginners lose the most time - running out of context, wanting to undo a step, giving Claude a file, and getting stuck in a mode they did not mean to enter.

  • /clear - wipe the conversation and start fresh. Use it between unrelated tasks so old context stops confusing the model (and stops costing you tokens).
  • Esc - interrupt Claude mid-response the instant it goes the wrong way. You do not have to wait for it to finish; stop it, correct course, continue.
  • Esc Esc (press twice) - rewind. Jump back to an earlier point in the conversation to edit a previous message and take a different path.
  • @ - reference a file by path. Type @ and start typing the filename; Claude reads that exact file instead of guessing.
  • Shift+Tab - cycle permission modes (normal, auto-accept edits, plan mode). This is the single most misunderstood shortcut - see the callout below.

Slash commands (type / at the start of a line)

Slash commands control the session itself - context, model, memory, login. This is the core set; your exact list can vary by version, so run /help any time to see everything available in your install.

  • /help - list every command available in your version. When in doubt, start here.
  • /clear - clear the current conversation and its context.
  • /compact - summarize the conversation so far to free up context without losing the thread. Use it when a long session starts to feel sluggish.
  • /init - scan the project and create a CLAUDE.md file so Claude remembers how your codebase works.
  • /memory - open and edit what Claude remembers about you and the project.
  • /model - switch models (for example, a faster model for simple edits, a stronger one for hard problems).
  • /review - have Claude review recent changes or a pull request.
  • /cost - see what the current session has cost so far.
  • /config - open settings.
  • /login and /logout - manage your account session.
  • /resume - pick up a previous conversation where you left off.

Keyboard shortcuts

  • Esc - interrupt the current response.
  • Esc Esc - rewind to edit an earlier message and branch from there.
  • Shift+Tab - cycle permission modes (normal / auto-accept / plan).
  • Up arrow - scroll back through your command history.
  • Ctrl+C - cancel the current input, or press again to exit.
  • Ctrl+L - clear the screen without clearing the conversation.
  • Enter - send. For a multi-line message, use the line-continuation your terminal supports (often the paste of a block, or a trailing backslash) rather than sending each line.

Inline symbols: @, #, and !

These three characters, typed inside a normal message, are where Claude Code gets fast. They tell Claude exactly what to look at, what to remember, and when to run a shell command.

  • @ (at) - reference a specific file or folder. Type @ then the path; Claude reads exactly that instead of searching. Example: 'Refactor @src/auth/login.ts to use the new session helper.'
  • # (hash) - add a note to memory on the fly. Start a line with # and the fact gets saved to your CLAUDE.md so Claude remembers it next session. Example: '# We deploy only from the main branch.'
  • ! (bang) - run a shell command directly and drop its output into the conversation. Example: '!npm test' runs your tests and lets Claude see the result.

A first-week workflow that uses all of it

  1. 1Open your project and run /init so Claude writes a CLAUDE.md and learns the codebase.
  2. 2Add a couple of standing facts with # - your deploy rule, your preferred test command, anything you would otherwise re-explain.
  3. 3Start a task and point Claude at the right files with @ instead of describing them.
  4. 4When it drifts, hit Esc, correct, and continue - do not let a wrong approach run.
  5. 5Between unrelated tasks, run /clear so stale context does not leak into the next job.
  6. 6When a session gets long, run /compact to keep it sharp, and check /cost if you want to watch spend.

Common questions

  • What is the single most useful shortcut for a beginner?

    Esc, to interrupt. New users tend to watch Claude go the wrong direction and wait for it to finish. Stopping it the moment the approach looks wrong - then correcting - is the habit that saves the most time and tokens.

  • Why did Claude stop asking permission before making changes?

    You most likely pressed Shift+Tab and entered auto-accept mode. Press Shift+Tab again to cycle back to a mode that asks before each change. The current mode is shown in the input bar.

  • What is the difference between /clear and /compact?

    /clear wipes the conversation entirely - use it when starting an unrelated task. /compact keeps the thread but summarizes it to free up context - use it when a single long task starts to slow down and you still need the history.

  • How do I give Claude a specific file to work on?

    Type @ followed by the file path inside your message. Claude reads exactly that file rather than searching for it, which is faster and more accurate. You can reference several files in one message.

  • This list looks slightly different from my version. Why?

    Claude Code updates frequently, so commands occasionally get added, renamed, or moved. Run /help inside your own install to see the exact set your version supports - treat this sheet as the orientation, and /help as the source of truth.

Get the command reference plus the beginner workflow

Get 650+ plug-and-play skills, MCPs & prompts, plus 5,000+ builders - $9/mo, cancel anytime.

Join the Club