AI cheatsheet
Claude Code in plain language, plus a survey of what people around the world do with AI. Three sections — pick yours.
Learning the tool from scratch: what to type, what it does and why it matters. Every entry checked against the official documentation.
154 entries in this cheatsheet
What this actually is
Claude Code is an assistant that lives in a terminal window and has access to the files in the folder you started it from. It doesn't suggest lines like editor autocomplete — it reads files, runs commands, makes changes and shows them to you for approval. It's closer to an intern with access to your machine than to a search engine.
Within a session it remembers everything you both said. Closing the window ends it — but you can come back to it.
Everything it has read and written takes up room in its working memory. The longer the conversation, the less room for new things. Hence the commands for cleaning up context.
Before it edits a file or runs a command it asks. You can loosen or tighten that — see the permission modes section.
In a terminal, in a desktop app for Mac and Windows, in the browser (claude.ai/code) and as a VS Code and JetBrains extension. The same thing in different wrappers.
Your first five minutes
The order that saves you frustration later. Open a terminal inside your project folder — that matters, because the starting directory defines what Claude can reach.
Starts a session in the current folder. That's it — no parameters needed.
A desktop icon instead of opening a terminal and typing the path every time. Right-click the desktop → New → Shortcut, paste the line above as the target (swapping in your own path), name it, change the icon. Double-click and you're in a session, already in the right project. Add -c at the end if you'd rather drop straight into the last conversation. This is how we run it day to day — one click instead of three commands.
Sign in to your Anthropic account. Opens a browser, you confirm, you come back to the terminal.
Scans the project and writes a CLAUDE.md — a note about what this project is and how it's built. Do it once, benefit in every later session.
Pick the model. A stronger one thinks better and costs more; a lighter one is faster for simple things.
A snapshot of the current session: model, directory, permission mode, what got loaded.
A list of everything you can type. Always current — unlike any cheatsheet on the internet, this one included.
Interactive lessons about Claude Code's features. Good if you'd rather learn by doing than by reading.
In practice
Start with a question, not a task. "Explain how this folder works" gives you the lay of the land and shows whether Claude understood the project at all. Only then start assigning changes.
Slash commands — the everyday ones
A slash at the start of your input opens the command list. Start typing and the list narrows. Below are the ones you'll actually reach for daily — the rest are in the sections that follow.
A clean slate. New conversation, empty context. The most important command on this list — use it between unrelated tasks instead of dragging one giant session along.
Summarizes the conversation so far and frees up room while keeping the thread. For when a task drags on and context is running out.
Shows what's taking up context and how much. This is where you check whether your CLAUDE.md loaded at all.
Rolls code and conversation back to an earlier checkpoint. The escape hatch when changes went the wrong way — instead of cleaning up by hand, you go back.
Return to an earlier conversation from a list. Closed the window mid-task? This is how you get back.
Switches to plan mode: Claude analyses and proposes a plan but touches no files until you accept it.
An interactive view of file changes. Left/right switches between the whole diff and individual turns, Enter opens a file, Esc goes back.
How much effort to put into thinking — from quick and cheap to slow and thorough.
Fast mode: same model, quicker output.
View and edit memory files — CLAUDE.md and the notes Claude keeps on its own.
Copies the last response to the clipboard. In the picker, `w` writes it to a file instead.
How much you've used and what it costs. Alias: /cost.
A one-line summary of the session. Handy for a work log entry or a commit message.
A side question that doesn't get added to the main conversation. Ask something without polluting the task's context.
Quit. Ctrl+D does the same, faster.
Commands for working on code
Ready-made procedures somebody already thought through for you. Instead of writing "look through these changes and tell me if there are bugs", you type one command.
Reviews a diff or a pull request for bugs and things worth simplifying. You can pick how thorough it should be.
The same, but hunting for security holes in what you just changed.
Finds roundabout constructions in your changes and simplifies them. It doesn't hunt for bugs — that's what /code-review is for.
Checks whether the changes actually work — not just whether they look right.
Turns on detailed logging and helps work out what's happening under the hood.
You set a goal and Claude keeps working until it's met, instead of handing back after the first step.
The same change in many places at once — splits the work into parallel threads.
Repeats a prompt on an interval while the session stays open. For watching something that changes — a deployment status, say.
Hooks Claude up to a GitHub repository so it can act on pull requests.
Context, memory and settings
The commands that decide what Claude knows and what it's allowed to do.
Adds another folder to the current session's reach. For when you're working across two projects.
Moves the session to a different working directory.
The allow / ask / deny rules. Set them here so you stop approving the same thing twenty times a day.
Scans your history and proposes a list of things worth allowing once and for all.
The settings panel. Among other things, this is where you turn on vim-style editing.
A view of your hooks — commands set to run automatically at given events, before every commit for instance.
Manage skills: your own procedures saved as a file, invoked like a command.
Connect external tools (databases, services, the browser) over MCP — the Model Context Protocol.
Plugins: ready-made bundles of commands, skills and integrations.
Opens your keyboard shortcut file if you want to rearrange things.
Colour theme. Inside the menu, Ctrl+T toggles syntax colouring for code.
Sets how full the context has to get before automatic summarizing kicks in.
Agents, background work and other devices
Claude can spin up helpers for side tasks or push work into the background. You don't need this on day one — but it's worth knowing it exists.
Configure subagents — specialized helpers with their own set of tools.
Hands a side task to a helper so it doesn't clutter the main conversation.
Lists what's running in the background: commands and helpers.
Detaches the current session and lets it run in the background. Close the window, the work continues.
Copies the conversation into a separate background session — for trying a what-if without spoiling the original.
Branches the conversation: two variants from the same point.
Opens Claude Code in the browser.
Pulls a web session down into your terminal.
Continues the current session in the desktop app.
Lets you drive this session from another device.
A QR code for downloading the mobile app.
Chrome integration settings — with it, Claude can click around pages and read the console.
The remaining commands
Less common, but good to know they're there. The full, always-current list is under /help.
An install checkup: what's wrong with your configuration and how to fix it.
Report a bug together with the conversation transcript.
Product feedback, for when something is annoying but isn't a bug.
Saves the conversation as plain text.
An HTML report analysing your recent sessions — where your time actually goes.
What changed between versions. With a tool that moves weekly, this isn't a luxury.
Update to the latest version.
Brings configuration over from other coding agents.
Connects to your editor — VS Code, JetBrains.
Fans out web searches on a question and pulls the findings together.
Account privacy settings.
Focus view — fewer distractions on screen.
The prompt bar colour for this session. Genuinely useful when you have three windows open and keep mixing them up.
Lo-fi radio. No further comment.
Keyboard shortcuts
The ones that change how you work the most. On Windows and Linux, Alt does what Option does on a Mac.
Interrupt. Stops the response or tool call mid-flight, keeping the work done so far. The single most important key here — when you see it heading the wrong way, don't wait for it to finish.
Twice in a row: on an empty prompt it opens the rewind menu; with text typed it clears the draft (and saves it to history, so Up recalls it).
Cycles permission modes. On Windows sometimes Alt+M, when the terminal swallows Shift+Tab.
Interrupts a running operation. With nothing running, the first press clears the input and a second exits.
Exits the session — press twice quickly. With text in the prompt it deletes the character after the cursor instead.
Shows the full transcript: every tool call, timestamps, which model was used. This is where you check what it actually did.
Reverse search through your command history.
Pushes the running task into the background. Handy during a long build — it stops blocking your window.
Shows or hides the checklist Claude keeps for itself.
Stashes what you typed and clears the prompt. Pressed again on an empty prompt, it restores it.
Opens your prompt in a real text editor. For long instructions this beats typing into a terminal.
Redraws the screen when it gets garbled. In fullscreen rendering, twice in a row runs /clear.
Pastes an image from the clipboard (Windows and WSL; Ctrl+V elsewhere). A screenshot of an error beats three paragraphs describing it.
Switch models without clearing what you've already typed.
Toggles extended thinking.
Toggles fast mode.
Move the cursor; at the edge of the input, browse command history.
Stops all background subagents in this session. Press twice within three seconds to confirm.
Typing in the prompt
The input behaves like a classic Unix command line. If you've never used these, learn at least the first three — they save an enormous amount of arrow-key mashing.
Cursor to the start of the line.
Cursor to the end of the line.
Deletes the word before the cursor.
Deletes from the cursor back to the start of the line.
Deletes from the cursor to the end of the line.
Pastes back what those shortcuts deleted.
Move the cursor back / forward one word.
Undoes the last edit in the input.
A new line without sending. Works in every terminal — the most reliable way to write something longer.
The same, but nicer. Works out of the box in Windows Terminal, iTerm2, WezTerm, Ghostty, Kitty, Warp and others.
A new line in terminals that don't handle Shift+Enter.
Characters that start an input
Four characters at the start of a line change what your input means. The middle two save the most time.
A command or a skill. The list filters as you type.
Shell mode: runs a command in your terminal and drops the output into the conversation. Perfect when Claude needs to see the result of something it can't run itself — an interactive login, say.
File path autocomplete. Instead of describing "that config file", you point at it. Saves it a search and saves you context.
Emoji by shortcode, e.g. :rocket:.
On an empty prompt, shows the keyboard shortcut panel.
Permission modes
How much Claude may do without asking you. Shift+Tab cycles them, and the current mode shows next to the input. This is the dial between "I approve everything" and "just go and we'll see".
Manual. Asks before every file change and every command. The default and the safest.
File edits go through without asking; commands still need approval. A good middle ground when you know a lot of small edits are coming.
Reads and plans only, changes nothing. The best mode to open a bigger task with — agree on what should happen, then let it happen.
Claude decides what needs your approval and what doesn't, following classifier rules.
Asks about nothing. Only use it where there's nothing to break — a container, a VM, a throwaway directory. Not on a machine with production access.
In practice
Rather than permanently loosening the mode, add specific rules in /permissions. "Always allow npm test" is safe; "always allow everything" is not.
Memory: CLAUDE.md and notes
Every session starts with an empty head. Two things carry knowledge across sessions: the CLAUDE.md file you write, and the notes Claude keeps on its own. This is where the tool stops being a gadget and starts saving time.
The project's instructions, loaded at the start of every session in that folder. Write down what you'd explain anyway: how it builds, what the conventions are, what not to touch. Aim for under 200 lines — longer files get followed less reliably.
The same, but personal and applied to every project. Preferences like "write comments in Polish" go here.
Private notes for this project that you don't want in the repository. Add it to .gitignore.
Inside CLAUDE.md you can pull in other files with this syntax. Note: imported content still takes up context, so it tidies but doesn't slim down.
Instructions split by topic. With a paths: header they load only when Claude touches matching files — frontend rules take no room while you're in the database.
Claude saves what it learned about the project and about you into ~/.claude/projects/<project>/memory/. MEMORY.md acts as an index and loads at the start of every session — the rest on demand.
The simplest way to add something to memory: just say it in plain words. If you want it in CLAUDE.md instead of the notes, say "add this to CLAUDE.md".
Check in /context whether the file loaded at all, then whether the instruction is concrete. "Two-space indentation" works, "format nicely" doesn't. And if something must happen every single time without exception, that's not a job for an instruction — that's a hook (/hooks).
Starting from the terminal
What you type before a session even starts. Mostly useful in scripts and when picking up interrupted work.
An interactive session in the current folder.
The same, but with your first prompt already typed.
One question, one answer, exit. No interactive mode — for scripts and automation.
Resumes the most recent conversation in this folder. The flag you'll use most day to day.
Resumes a specific session by name or id.
Pick the model up front.
Effort level: low, medium, high, xhigh, max.
Adds an extra folder to the session's reach.
Start directly in a chosen permission mode.
Starts the session in the background and hands the terminal straight back.
Update to the latest version.
Install and settings diagnostics without entering a session.
Starts with all your customizations disabled. The first thing to try when something broke after a config change.
Configure MCP servers from the command line.
How to work with it so it pays off
The commands are easy to memorize. What's below is harder — the habits that separate "neat gadget" from an actual saving of time.
For anything bigger than a small fix, switch to plan mode. Reading the plan takes a minute and catches the misunderstanding before it becomes three hundred lines you have to throw away.
Three tasks in one prompt gets you three half-done things. Break it into steps and check after each one.
New task, new session. Dragging one conversation through the whole day makes answers worse and costs more, because the morning is still sitting in context.
Tests, a command that runs the app, a check script — anything that answers "works / doesn't" without you. With one it corrects itself; without one it guesses and hands you the checking.
The full message or a screenshot beats a paragraph of "something breaks on save". Paste an image with Alt+V (Windows) or Ctrl+V.
Giving a path saves it a search through the project — and saves you the context that search would eat.
Hit Esc when you see it heading the wrong way. There's no point politely waiting for it to finish something you won't use.
If you're explaining the same thing twice in a week, move it into the file. Rule of thumb: correcting the same mistake a second time is the signal to write it down.
/diff and Ctrl+O exist so you know what landed. Approving without looking only works for people who enjoy surprises a week later.
Passwords, API keys, production personal data — none of it should end up in the conversation. If Claude needs something behind a login, use shell mode (!) and log in yourself.
Fast, well-read, hard-working — and occasionally confidently wrong. Responsibility for what lands in the project stays on your side.
When something breaks
A short first-aid list, roughly in the order worth trying.
Automatic diagnosis of your install and settings. Always the first step.
When it "ignores instructions" — check whether the instructions file loaded at all.
When changes broke the project. Rolls code and conversation back.
When it started misbehaving after a config change — start with customizations off.
When a plugin or skill doesn't show up after you added it.
When the display goes garbled — redraw without losing the conversation.
When something worked yesterday and doesn't today. Sometimes it simply changed.
When it really is a bug — a report with the transcript attached.
Caveat
Claude Code changes weekly — commands get added, shortcuts occasionally move. This cheatsheet reflects 2026-08-19. The always-current list is one keystroke away: type /help in a session.
Official Claude Code documentation