Skip to content

Keyboard

Shortcuts

Everyone learns Esc. These are the rest — all checked against Claude Code itself, not copied off a blog.

The three to learn first

If you remember nothing else.

  • Esc Esc
    Stop Claude mid-action The moment Claude starts doing something you did not intend.
  • Esc thenEsc Esc thenEsc
    Clear the input box Your half-written prompt has turned into a mess and you want a clean line.
  • Shift +Tab Shift +Tab
    Cycle permission mode Starting an exploration (plan) or letting an agreed plan run (accept edits). On older Windows setups without VT mode, this is Meta+M instead.

Writing the prompt

Composing, searching, pasting.

  • Ctrl +J Ctrl +J
    Start a new line without sending Any prompt longer than one sentence.
  • Ctrl +R Ctrl +R
    Search your prompt history "What did I type last week that worked?" Inside the search, Ctrl+S cycles the scope: this session → this project → everywhere.
  • Ctrl +S Ctrl +S
    Park the half-written prompt You are three sentences into a prompt and need to go check something.
  • Ctrl +G Ctrl +G
    Edit the prompt in your real editor Writing anything long or carefully structured.
  • Ctrl +V Alt +V
    Paste an image Anything visual. Annotate the screenshot first and it works even better. Ctrl+V, not Cmd+V — macOS keeps Cmd+V for its own paste. Windows and WSL use Alt+V. On WSL both Ctrl+V and Alt+V work.
  • Option +T Alt +T
    Toggle thinking for the next turn One hard question in the middle of otherwise simple work.
  • Ctrl +_ Ctrl +_
    Undo in the input box You deleted half a prompt by accident.

Seeing what happened

What Claude did and what it plans to do.

  • Ctrl +O Ctrl +O
    Toggle the full transcript You want to know what it actually did, not the summary.
  • Ctrl +T Ctrl +T
    Toggle the task checklist Any multi-step task, before it gets far.

Running the session

Long jobs, models, the terminal.

  • Ctrl +B Ctrl +B
    Send the running job to the background A long build, test run, or search you do not want to sit and watch.
  • Option +P Alt +P
    Switch model Between tasks — rarely a good idea mid-task.
  • Option +O Alt +O
    Toggle fast mode Straightforward work where you would rather have speed than depth.
  • Ctrl +Z Ctrl +Z
    Step out to the shell without quitting You need the terminal for one command and do not want to lose the session. Terminal-level shortcut (Unix SIGTSTP), not a Claude Code binding. Windows has no direct equivalent.

The keys are the same on both systems — only the modifier's name changes (macOS calls Alt Option). Run /keybindings in any session to see exactly what is bound on your machine.

When Claude does something wrong, add a line to CLAUDE.md

← Tips Workflow & commands

When Claude does something wrong, add a line to CLAUDE.md

Boris Cherny's ('s creator) golden rule — every time Claude makes the same mistake twice, add a one-liner to so it doesn't make it a third time. The file grows as your 's tribal knowledge gets written down.

beginner

The most underrated habit in is also the simplest. Boris Cherny — who built Claude Code — explained his team’s rule like this:

Anytime we see Claude do something incorrectly, we add it to so it doesn’t repeat next time.

That’s the whole tip.

What it looks like in practice:

  • Claude keeps creating files in src/lib/ when they belong in src/services/. Add to CLAUDE.md: “New business logic lives in src/services/, not src/lib/. lib/ is reserved for stateless helpers.”
  • Claude keeps using let where the team writes const. Add: “Prefer const for everything; let only when the variable is genuinely reassigned.”
  • Claude keeps logging customer IDs in plain text. Add: “Customer IDs (cust_*) are PII. Use redactCustId() from src/lib/log.ts.”

Each line is short. Each line replaces a correction you would otherwise type every .

Two rules that keep this from bloating:

  • One line per rule. If the rule needs five lines of explanation, it probably belongs in a real doc (docs/conventions.md), referenced from CLAUDE.md by one line. The CLAUDE.md is the index, not the encyclopedia.
  • Delete rules that no longer apply. If you moved the file, changed the convention, or fixed the underlying bug — drop the line. Stale rules are worse than missing ones because Claude follows them anyway.

CLAUDE.md is shared (it’s in ). When you write down a rule, you’re teaching the next colleague too. The file is the team’s collective memory written in a form Claude can read.

The meta-trick: you don’t have to open the file yourself. When you catch Claude making a mistake, say:

That’s wrong — we always do X instead. Add a one-line rule to CLAUDE.md in the right section so this doesn’t happen again next session.

Claude opens CLAUDE.md, picks the right section, adds the rule, and shows you the diff. The habit becomes typing one sentence instead of editing a file every time.

Pair this with the Worked CLAUDE.md example tip for the shape, and the Keep CLAUDE.md clean tip for what to trim.

Next tip →

Install gh (and other CLIs) — Claude knows how to use them

Claude is fluent with tools like ``, `az`, `aws`, `jq`, ``. Install them, log in once, and Claude can read , query Azure resources, inspect — without a single server.