Terminal tricks for Claude Code
Top ten, then everything else. Print the cheat sheet when you're done.
The difference between a CEO who has Claude Code installed and a CEO who uses it well is about fifteen tricks. Half of them are in the docs. The other half are operator moves you only pick up by watching someone who's already fluent. None of them take more than two minutes to learn, and every one of them buys back time you're currently spending re-explaining yourself to a tool that should already know the answer.
What's below is the working list. The first ten are the ones that move the needle most, the tricks I wish I'd known in week one. Below those, the rest of what's worth knowing, grouped by what you're trying to do, so you can come back and use this page as a reference once the top ten are muscle memory.
Print the shortcut card at the bottom and tape it to your monitor for a week. By the end of the week most of this is automatic, and you stop reaching for the cheat sheet because it's in your hands.
This is the power-user follow-up to why CEOs should use Claude Code in the terminal. If you haven't installed it yet, start there and with the CLAUDE.md setup walk-through; the tricks below assume you already have a session you can open.
The top ten tricks
1 · Pick up exactly where you left off
The single biggest difference from a chat window: your sessions don't evaporate. Type claude --continue (or the short form claude -c) and you drop straight back into your most recent conversation in that folder, full context intact. Type claude --resume (or claude -r) and you get a picker of past sessions to choose from.
claude --continue # jump back into the most recent session
claude --resume # choose from a list of past sessions
In a chat tab, closing the window means starting over Monday morning. Here, the work you did Friday is still loaded Monday morning. This one trick is most of why the terminal compounds and the chat tab resets. Make claude -c the way you start your day.
2 · Drop in files by name with `@`
Stop pasting. Type @ and Claude shows a fuzzy file picker; keep typing the path and it autocompletes.
Summarize @notes/meetings/2026-05-21.md and pull out every commitment I made.
@CLAUDE.md attaches your context file. @notes/meetings/ attaches a whole folder. It's faster than copy-paste, it never truncates a long file the way a paste does, and it keeps the exact filename in the conversation so Claude can cite its source. Once this is a habit you'll never paste a wall of text into a prompt again.
3 · Two CLAUDE.md files load automatically
Claude reads two CLAUDE.md files on startup without you doing anything: the project-level one in the folder you opened, and the user-level one at ~/.claude/CLAUDE.md that applies everywhere. Knowing both exist saves you from re-explaining things Claude already knows.
Two shortcuts make these files live documents instead of things you forget to update. Run /init in a new project and Claude drafts a starter CLAUDE.md by reading the folder. And any time you start a line with #, Claude writes what you type straight into memory:
# Always refer to the EU launch as "the Q3 rollout," never "the European thing."
That note is now in your CLAUDE.md and loads in every future session. The setup walk-through covers what belongs in each file.
4 · The slash menu is your command palette
Type / and pause. Claude shows every command available to you, including the ones you've built yourself. /help prints the full catalog. The four you'll use daily:
/clearwipes the conversation and starts fresh (use it when you switch tasks so old context stops bleeding in)./compactsummarizes the conversation so far to reclaim room when a long session is filling up./costshows what the current session has spent./modelswitches which model you're talking to mid-session.
You don't need to memorize the list. Type /, read what's there, pick one. The menu is the documentation.
5 · Plan before you act with Shift+Tab
Press Shift+Tab to cycle the mode indicator at the bottom of your session. One of those modes is plan mode, and it's the guardrail nobody tells you about. In plan mode Claude investigates your request and writes out exactly what it intends to do, but changes nothing until you approve.
Use it for anything with side effects: editing a batch of files, running a migration, anything you'd want to read before it happened. You get the plan, you read it, you approve it or redirect it, and only then does Claude touch anything. It's the difference between "Claude did something to my files" and "Claude told me what it was going to do and I said yes." For a CEO who isn't going to read every diff, plan mode is the safety you turn on by reflex.
6 · Run a shell command without leaving the session
Start any line with ! and the rest runs as a shell command, with the output dropped straight into the conversation for Claude to read.
!git status
!ls ~/notes/meetings/
This matters more than it sounds. Instead of switching to another window, running a command, and pasting the result back, you stay in one place and Claude sees the output immediately. Want Claude to act on what a command returned? Run it with ! and then ask your question; the result is already in context.
7 · Turn a repeated prompt into a slash command
If you type roughly the same instruction every week, make it a command once. Drop a markdown file into .claude/commands/ and its filename becomes a slash command.
# .claude/commands/standup.md becomes /standup
The file is just the prompt you'd otherwise retype, written out once. Project-level commands live in .claude/commands/; personal ones that follow you everywhere live in ~/.claude/commands/. This is the lightweight cousin of a full skill: a skill is the heavier, smarter unit (here's how to build one), but a custom command is the thirty-second version for a prompt you're tired of retyping.
8 · Interrupt and rewind with Esc
Claude heading the wrong direction? Press Esc once and it stops immediately. You don't have to wait for it to finish a run you already know is wrong.
Press Esc twice and you get something better: a list of your previous messages, so you can jump back to an earlier point in the conversation and edit what you said. It's an undo for the whole exchange. If a session went sideways three prompts ago, you don't start over; you rewind to the fork, rephrase, and continue from there. Most people discover this trick late and wish they'd had it from day one.
9 · Send research to a subagent
When you need Claude to go read a lot before it answers (search the whole project, dig through old transcripts, survey what's where) send that work to a subagent. Type /agents to see and manage them, or just ask: "use a subagent to find every place we mention the Q3 rollout."
The subagent does the heavy reading in its own separate context and reports back a tight summary, which keeps your main session clean instead of clogged with hundreds of lines of search output. The practical payoff: your primary conversation stays focused on the decision while the grunt work happens off to the side. Operators running serious workloads lean on this constantly to keep the main thread sharp.
10 · Set the safety perimeter once
Type /permissions to see and edit what Claude is allowed to do without asking. You decide which actions run automatically (reading files, say) and which always stop for your approval (anything that deletes, pushes, or sends). Set it once and it holds for every future session.
For repeatable safety and automation, hooks go a level deeper: in .claude/settings.json you can wire a shell command to run on events like "before any tool call" or "after every edit," which is how operators log every action or auto-run a check. You'll also see --dangerously-skip-permissions, which turns off the prompts entirely. It exists, it's occasionally useful in a throwaway sandbox, and you should treat the name as the warning it is. Set the perimeter deliberately; it pays you back forever.
The rest, grouped by what you're doing
The top ten are the daily drivers. Below is the deeper reference, organized by the thing you're trying to get done.
Sessions and history
claude --continue/-creopens your most recent session;claude --resume/-rpicks from the list./clearresets the conversation when you switch tasks so stale context stops leaking into new work./compactsummarizes a long session in place to reclaim room without losing the thread./costshows spend for the current session; useful when you're calibrating how much a workflow costs to run.Ctrl+Dor/exitcloses cleanly. Your session is saved, soclaude -cbrings it right back.- The up arrow walks back through your previous inputs, like any shell.
Prompting and input
@filenameattaches a file or folder by path with autocomplete. Always cheaper and cleaner than pasting.!commandruns a shell command inline and feeds the output to Claude.#at the start of a line saves what you type into your CLAUDE.md as a memory.- Multi-line input: end a line with
\then Enter, or press Option+Enter on a Mac. Run/terminal-setuponce to bind Shift+Enter for newlines if your terminal supports it. - Ask Claude to "think," "think hard," or "ultrathink" to spend more reasoning before it acts. Worth it on genuinely thorny problems; overkill for routine asks.
/modelswitches models mid-session when you want more horsepower or more speed.
CLAUDE.md and skills
- Project-level
CLAUDE.md(in the folder) and user-level~/.claude/CLAUDE.md(everywhere) both load on startup and stack together. /initscaffolds a project CLAUDE.md by having Claude read the folder first.#appends to memory on the fly so the file grows as you notice what Claude keeps missing.- Skills live in
.claude/skills/(project) and~/.claude/skills/(personal); each is a folder with aSKILL.md. The build guide walks the first one. /agentscreates and manages subagents for parallel and read-only work./mcpmanages connectors, the bridges that let Claude reach outside tools and systems.
Files, output, and pipes
- Claude edits files in place. You describe the change; it makes the edit and tells you what it touched. You review the result, not a wall of suggested text to copy back.
claude -p "your prompt"runs one shot without opening an interactive session, prints the answer, and exits. This is the headless mode that lets Claude run inside scripts and scheduled jobs.- Pipe data straight in:
cat report.csv | claude -p "summarize the three biggest changes". Anything you can print to a terminal, Claude can read. - Add
--output-format jsonwhen you're feeding Claude's answer into another script and want structured output instead of prose. - Redirect like any command:
claude -p "draft the changelog" > CHANGELOG.mdwrites the answer to a file.
Power moves
A few patterns from running this every day across real companies. None are documented anywhere; they're the operator layer.
- Clean commits from a messy tree. When your working folder has a dozen half-finished changes but you only want to commit a few, stash the rest first:
git stash --keep-index --include-untracked, commit and push the staged work, thengit stash popto bring everything back. You ship a clean, reviewable commit without losing your in-progress work. - A
learnloop that improves your AI's writing. I keep a skill wired tonpm run learnthat, after I edit something Claude drafted, reads my edits and extracts the principle behind each one into a voice profile. The corrections compound: every edit makes the next draft need fewer. You can build the same loop for any kind of work where you keep correcting the same things (here's the skill-building walk). - Multi-account tooling with one env var. I run several companies, each with its own Google Workspace login. Rather than logging in and out, I keep a profile per account and point at the right one inline:
GOOGLE_WORKSPACE_CLI_CONFIG_DIR=~/.config/gws-headphones gws gmail +triage. The same pattern (one environment variable selecting which credentials to use) generalizes to any tool where you juggle multiple accounts.
Safety and guardrails
/permissionsis the control panel for what runs automatically versus what stops for your approval. Set it once per project.- Hooks in
.claude/settings.jsonrun a shell command on events likePreToolUseandPostToolUse. This is how you log every action Claude takes, or auto-run a check before a commit. - The permission prompt is your friend, not friction. When Claude asks before doing something destructive, that pause is the system working. Resist the urge to blanket-approve everything.
--dangerously-skip-permissionsremoves the prompts entirely. The name is the warning. Reserve it for disposable sandboxes, never your real company folder.- Never put secrets in CLAUDE.md. It gets committed to git, which means API keys, passwords, and anything you wouldn't put in a public deck do not belong there. (More on this in the CLAUDE.md explainer.)
When something goes wrong
- A run going off the rails: press Esc to stop it, then Esc twice to rewind to before the bad instruction and rephrase.
- A session that's gotten confused or is dragging old context around:
/clearand start the task fresh. Half of "Claude is acting strange" is just stale context. - Something wrong with the install itself: run
claude doctor(or/doctorin a session) to check your setup and flag what's broken. - A genuine bug worth reporting goes to github.com/anthropics/claude-code/issues. The team reads it.
Print the cheat sheet
I made a one-page printable card with the top ten tricks and the keyboard shortcuts you'll reach for most. Tape it to your monitor for a week and most of these become muscle memory; by the end of the week you won't need the card anymore.
Download the Claude Code shortcut card (PDF)
No email required. Print it, tape it up, and email me back when one of these tricks has saved you an hour. Those are my favorite messages to get.
Where this fits
These tricks are the multiplier on the foundations. A CLAUDE.md gives Claude your business context; skills turn one-time workflows into capabilities you call by name; and the tricks above are how you move through all of it fast enough that the leverage actually feels like leverage instead of overhead.
If you're earlier in the arc, the pillar on why CEOs belong in the terminal is the case for the whole shift, and the CLAUDE.md setup walk-through is where a real install begins. If you're already fluent and wondering what compounds on top of all this, the autonomous, self-improving company is the frame for where this goes.
Print the card. Run with the top ten for a week. Then tell me which trick stuck.
Andrew
Get three workflows like this every Thursday
The Thursday 3 is a free weekly email. Three workflows that put you in the top 1% of CEOs. 90-second read. Every card links back to a step-by-step guide like this one.
Get the newsletter →The architecture behind this workflow.
Two operator's manuals for the same job, run two different ways. OpenCLAW for the always-on agent harness; Claude Code for the focused-work CLI. Pick one, or get the bundle for $149.
Browse the books · $99 each