/ (like /clear or /init) is an instruction to the Claude Code tool itself. Everything else you type is a message to Claude — plain English, no syntax required.Guide
Twelve controls cover 95% of daily use. Learn them in your first week — five of them on day one.
Two kinds of input exist in a session: anything starting with / is a command to
the tool itself, everything else is a message to Claude. Add a couple of keyboard controls
and a special prefix or two, and this is the entire cockpit:
| Control | What it does | When |
|---|---|---|
/init | Scans your project and auto-generates CLAUDE.md | Once per project, day one |
Shift+Tab | Cycles modes → Plan Mode: Claude proposes a plan before touching files | Any task affecting 3+ files |
Esc | Interrupts Claude mid-action | The moment it goes the wrong direction |
/clear | Wipes the session — fresh context | Between unrelated tasks (after committing) |
/compact | Summarizes the session, keeps going | Mid-task when it's getting long or slow |
/model | Switch model | A faster model for routine work, the strongest for hard problems |
/usage | Shows token/usage status | Glance occasionally; learn what tasks cost |
claude --continue | Reopens your most recent session | "Oops, closed the terminal" |
/resume | Pick any past session to reopen | Returning to yesterday's thread |
/rewind | Restore code/conversation to an earlier checkpoint | Undo an AI change without git surgery |
@filename | Attaches a specific file to your message | Pointing Claude at exactly the right file |
# your note | Quickly appends a memory to CLAUDE.md | # always use pnpm, not npm |
/init — run it before anything else
It scans your project and writes a first draft of CLAUDE.md — the file that
briefs Claude about your project at the start of every session. It's so important
it gets its own chapter; for now, just run it once in
each project.
Shift+Tab — Plan ModeMakes Claude show you the plan before it touches a file. The single best habit for avoiding wrong turns — the next chapter is all about it.
Esc — the brake pedal
Stops Claude mid-action. Watch it work; the moment it heads somewhere you didn't intend,
press Esc and redirect. Interrupting is normal, not rude — cheaper than letting
a wrong idea finish.
/clear — the fresh start
Wipes the session so the next task starts with clean, cheap context. The habit is: finish a
task, commit it, /clear, next task. Why that matters so much is
chapter six.
@filename — point, don't describe
Typing @ lets you attach a specific file to your message. "Fix the mobile menu
in @Header.astro" beats a paragraph describing where the menu code might live —
Claude reads exactly the right file instead of hunting.
/permissions — control what Claude may do without asking you first./mcp — manage and authenticate MCP servers (chapter 15)./plugin — the plugin manager (chapter 14).!command — a ! prefix runs a shell command yourself, inside the session, with the output visible to Claude.The official reference: every command, flag and shortcut is documented at code.claude.com/docs under "Interactive mode" and "Slash commands". Bookmark it — this chapter is the working subset, not the encyclopedia.
Up next: Plan Mode deserves more than a table row — when to use it, how to review a plan properly, and why interrupting early is a superpower.
FAQ
/ (like /clear or /init) is an instruction to the Claude Code tool itself. Everything else you type is a message to Claude — plain English, no syntax required./init (generate CLAUDE.md, once per project), Shift+Tab (Plan Mode), Esc (interrupt), /clear (fresh session between tasks) and @filename (point Claude at the exact file).! — for example !npm run build runs the command yourself, right in the session, and the output lands where Claude can see it too.# — e.g. # always use pnpm, not npm — and it's appended to CLAUDE.md, the memory file Claude reads at the start of every session.