Claude Code: commands and shortcuts for daily work

A guide to Claude Code commands and shortcuts: session startup, mentions, permission modes, slash commands, context, and review.

Jonathan Canales

Claude Code is driven by conversation, but underneath the conversation sits a layer of commands and shortcuts that multiply working speed. They are the ones that cover the needs that show up every day while working with the tool: slash commands to control the session, keyboard shortcuts to keep the rhythm, and a couple of terminal gestures that change the whole experience.

This guide gathers that essential set, organized by moment of use: startup, work inside the session, context control, and change review. Each command includes when it pays off, because the value lives in the habit as much as in the shortcut itself. The information reflects mid-July 2026 and the tool evolves quickly; the /help command inside a session always shows the current list.

Doodle of a hand pressing a button with an orange ring

Startup: terminal commands that save sessions

Before talking to the model, the terminal already offers valuable shortcuts. The claude command opens a fresh session in the current directory. claude -c continues the most recent conversation of the project, ideal for picking up yesterday's work with all context intact. claude -r opens a picker of past conversations to resume any of them, useful when you work on several fronts of the same repository.

claude -p runs in single-pass mode: you pass the instruction, it prints the answer, and it exits, which makes it perfect for scripts, aliases, and pipelines. Combined with Unix pipes it enables things like analyzing a whole log with a single line. And the --add-dir flag adds extra directories to the session's reach when the work touches several sibling projects at once.

Another terminal shortcut with immediate effect is --model, which fixes the model from startup when you already know the speed and depth profile you want for that session, and --permission-mode, which sets the initial permission mode and saves the first manual Shift+Tab changes.

Another gesture that saves daily friction is remembering that sessions live per project: each repository keeps its own history, its own memories, and its own configuration, so resuming work in the right directory brings back all the accumulated context of that front.

A habit that pays from day one: always start from the project root, even when the task seems small. Claude Code discovers the CLAUDE.md file there, the team configuration, and the project skills, and the whole session starts with the right context.

Inside the session: mentions and modes

Three gestures change how you ask for work. The @ sign followed by a path mentions concrete files or folders and brings them into the conversation immediately, autocomplete included. The # sign saves an instruction straight into project memory: type # followed by the rule and Claude records it in CLAUDE.md for every future session. The ! sign at the start of a line runs a shell command directly and adds its output to the context, perfect for pasting a test result or a git status.

Permission modes toggle with Shift+Tab. Normal mode asks confirmation on every edit; auto-accept mode lets file edits through while you supervise; and plan mode stops execution until you approve a written plan. Switching modes at the right moment is among the habits that return the most time: planning for ambiguous tasks, auto-accept for mechanical changes already understood.

To interrupt, Esc stops the current action and hands control back instantly, conversation intact. That single key changes the psychology of the tool: delegating a long command feels safe when you know you can pull the brake at any moment and steer again with a sentence. Two Esc presses in a row open the message history to edit what you asked and resend it corrected. It is the fast way to adjust an instruction mid-flight rather than waiting for a drifting run to finish, and it quickly becomes second nature after a few sessions.

Editing shortcuts: polishing the instruction in time

A large part of the speed comes from correcting early. The up arrow retrieves previous session messages to resend them adjusted, and the history persists across sessions of the same project. When a response heads the wrong way, interrupting with Esc and clarifying in one short sentence works better than letting it finish and fixing later: the model incorporates the clarification instantly and resumes from the exact point.

Instructions can also be stacked. Rather than one long paragraph with five requests, sending the first, letting it work, and chaining the next keeps every step verifiable. This short-conversation rhythm, combined with timely Esc, is the most reliable way to reach the expected result with minimal rework.

Doodle of an open toolbox with stairs and an orange-handled screwdriver

Slash commands: the control panel

Commands starting with / manage the session. These are the daily essentials:

  • /clear: wipes the conversation context. Use it when switching tasks so the model starts fresh with its full capacity available.
  • /compact: summarizes the current conversation keeping the essentials. It is the standard answer when a long session starts filling the context and work remains ahead.
  • /init: generates the project's initial CLAUDE.md file by analyzing the code. It is the first command worth running in a new project.
  • /model: switches the session model on the fly, to balance speed and depth per task.
  • /cost: shows the current session's consumption, key to understanding which kind of work weighs most on the plan.
  • /review: asks for a code review with quality criteria, excellent before committing.
  • /permissions: opens tool permission management, where you authorize or limit what the agent can run.
  • /memory: directly edits memory files, including the project CLAUDE.md and the personal one.
  • /agents: manages specialized subagents with their own context for delegated tasks inside the session.
  • /help: lists every command available in the installed version, the always-current reference.

The full list grows with each version, and reviewing /help occasionally pays off: recent commands often answer frictions that used to be solved by hand.

Context control: the most trained muscle

The difference between a productive session and a frustrating one is usually context management. The context window is finite, and every file read, every command output, and every exchange occupies a part. The commands above are the tools; the strategy follows.

First, one task per context. When the conversation changes objective, /clear plus a fresh instruction outperforms dragging a long chat with leftovers from three tasks. Second, long sessions with timely /compact: as soon as answers start losing detail, compact before continuing. Third, persistent memory for what is permanent: everything that applies to every session belongs in CLAUDE.md, written once with # or with /memory, and kept out of prompts from then on.

Fourth, precise mentions instead of broad exploration. Asking for work on @src/payments focuses the model's attention where it matters and leaves the rest of the context free for reasoning. Fifth, planning for the complex: plan mode spends context on understanding before touching anything, and that order prevents redoing work.

A sixth habit ties everything together: watch the consumption curve with /cost across a few sessions. Patterns appear quickly. Long exploratory sessions cost far more than focused ones with good mentions, and that visibility turns context management from a vague worry into a concrete, measurable practice that improves week after week.

Review shortcuts: where trust is earned

Working fast with Claude Code demands reviewing well, and the tool provides specific shortcuts for that. When it proposes changes, each diff is reviewed in the terminal before acceptance; reading it fully is worth it in the first weeks, and as confidence grows, the fine reading can be reserved for sensitive files.

git diff and git status inside the session, invoked with !, give the complete view of what changed so far and leave the output available for the model to use in its next answer. /review adds a quality pass with readability and convention criteria. And if an applied change goes sideways, asking to revert it in natural language works because the model knows the previous state of its own edit.

The last shortcut is the most underrated: frequent commits. Asking Claude Code to commit after each complete unit of work turns git history into a safety net, and returning to any point stops depending on session memory.

How to turn this into habit

The typical curve has three stages, and it is shorter than it looks from outside. The first week runs on the basics: @ for files, Esc to interrupt, Shift+Tab for modes. Then come the context commands: /clear, /compact, /init, /memory. After a month, the advanced layer turns natural: claude -p in scripts, subagents with /agents, systematic review with /review.

The closing advice is to install one habit at a time. Every command in this guide solves a concrete friction, and the fastest way to adopt them is noticing the friction when it happens and looking up its shortcut here. After two or three weeks, the hands find the keys on their own, and the conversation with the model gains a fluency that feels closer to pair work than to operating a tool. For the next level, the guide on how to install Claude Code and finish your first project covers the foundation, and Claude Skills: what they are and how to create one from scratch shows how to package the procedures you repeat most.

Sources

Was this article helpful?

Technology and tools