claudeBenutzer09
4

Commands Deep Dive

The commands, shortcuts, and switches you reach for once the first weeks are over — from steering context to the bundled skills to a goal Claude pursues on its own.

Beginner 30 min

You know the basic commands. This module collects what comes after: the tools that keep a session workable for hours, the skills Claude Code already ships with, the switches for speed and thinking depth — and a handful of shortcuts that make the difference between typing and working.

Keeping context and managing sessions

Every session shares one context window. /context shows it as a colored grid and points out context-heavy tools, bloated memory files, and how close you are to the ceiling. When space runs short, /compact summarizes the conversation so far and frees it up; an addition like /compact focus on the database migration plan steers what the summary must keep.

Two commands reach into the history itself. /branch forks a second conversation at the current point so you can try another direction without losing the first — you land in the branch, the original survives, and /resume takes you back to it. /rewind goes the other way: it restores the conversation, the code, or both to an earlier point, making it the undo for a session that went the wrong way (aliases: /checkpoint and /undo).

For work that spans days, a session gets a name: /rename my-feature sets it and shows it on the prompt bar, and without an argument Claude Code derives one from the conversation so far. Later, /resume my-feature brings the session back with its context intact. /export writes the conversation as plain text to a file or the clipboard — the route for an archive, or for a colleague who only needs the outcome:

/context
/compact focus on the auth refactor
/branch
/rename auth-refactor-v2
/export auth-refactor-v2.md

The skills that ship with Claude Code

Some of what looks like a command is really a bundled skill: a set of instructions Claude Code loads when you invoke it. Nothing to install, and they sit next to the built-in commands in the / menu.

/code-review (the name /simplify took in v2.1.147) goes through your uncommitted diff hunting for correctness bugs and tells you what turned up. The effort level sets the gait: at low and medium it reports only what it is confident about, high through max cast a wider net, and /code-review ultra starts a deeper review in the cloud. --fix applies the findings straight away, --comment attaches them to the open GitHub PR. Since v2.1.154 /simplify is a skill of its own again with a different brief: it hunts no bugs but tidies up — four review agents check reuse, simplification, efficiency, and level of abstraction in parallel. /batch <instruction> is meant for rebuilds across the codebase: it splits the work into 5 to 30 independent units, presents a plan, and after your approval spawns one subagent per unit in its own worktree. /loop runs a prompt repeatedly, with an interval (/loop 5m check if the deploy finished) or without — then Claude paces itself; /proactive is the same skill under a name that often fits "watch and react" better. The word ultracode in your prompt triggers a dynamic workflow; until v2.1.160 that keyword was workflow.

/debug turns on the debug log for the running session and reads it back — useful when Claude behaves unexpectedly; without claude --debug at launch, recording only starts at that call. /claude-api loads the SDK reference for your project’s language and speaks up by itself as soon as your code imports from the anthropic package:

/code-review
/code-review high --comment
/batch add JSDoc comments to all public functions in src/
/loop 2m check if the build finished
/debug

Faster answers: fast mode

Fast mode is not a different model choice but the same model quality on an API configuration tuned for speed: up to 2.5 times faster responses at a higher price per token. It is supported on Opus 5 and Opus 4.8 — Opus 4.7 dropped out in July 2026, Opus 4.6 before that, and on Sonnet or Haiku it does not exist. Turn it on with /fast, or permanently through "fastMode": true in your user settings; while it runs, a sits next to the prompt bar. The feature is explicitly a research preview, so pricing and availability may change:

/fast          # toggle on/off
/fast on       # explicitly enable
/fast off      # explicitly disable

If you are on another model, turning it on switches you to Opus automatically. Turning it off leaves you there: Claude Code does not return to your previous model, that is what /model is for. Switch to a model without fast mode support and it turns off, then turns back on when you switch back, provided your saved preference has it on.

If your access runs through your own LLM gateway, the /model picker can fill itself from that gateway’s /v1/models endpoint. That is deliberately not the default — a gateway backed by a shared API key would otherwise offer every reachable model to every user. Turn it on with CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1 in your shell or in the env block of your settings.

Fast mode and effort level are two different levers that both act on response time. /fast lowers latency without touching quality; a lower effort level shortens thinking time and can cost quality on tricky work. For straightforward tasks the two combine:

/fast
/effort low

Fast mode has rate limits of its own, and all supported Opus models draw from the same pool. When it runs out, or your usage credits do, the session falls back to standard speed and pricing automatically, the turns gray, and once the cooldown expires fast mode re-enables itself. It requires usage credits to be turned on — manage them with /usage-credits, which was called /extra-usage until v2.1.144 and still answers to the old name. Fast mode is unavailable on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and Claude Platform on AWS, as well as in the VS Code extension; in Team and Enterprise organizations an Owner has to enable it first.

Shortcuts that speed up the day

Shift+Tab is the single most used shortcut: it cycles through the permission modes — default (labeled "Manual" in the indicator), acceptEdits, plan, and then whatever else your environment enables, such as auto or bypassPermissions. Into plan mode for a bigger task and back out again is two keystrokes.

Option+T or Alt+T toggles extended thinking; it has no effect on Fable 5, which always thinks at length anyway. How deeply Claude thinks is set by /effort: low, medium, high, xhigh, max, and ultracode, as far as the model supports them — with max and ultracode applying to the running session only. auto is not a level of its own; it resets to the model’s default. Ctrl+O opens the transcript viewer, which shows every tool call with a timestamp and the model used, and Option+O toggles fast mode without leaving the prompt.

/btw asks a side question that never enters the conversation history — good for a quick look at some syntax without loading up the context; called without a question, it reopens your most recent one. Ctrl+B pushes a running Bash command or agent into the background so you can carry on while it works (press twice under tmux). To stop every background subagent in the session, the shortcut is Ctrl+X Ctrl+K — twice within three seconds, as a safeguard.

For typing itself, the readline shortcuts carry over: Ctrl+U deletes from the cursor to the start of the line, Ctrl+W the word before it, Ctrl+K through to the end of the line — and Ctrl+Y brings back whatever disappeared that way last. Ctrl+L redraws the screen while keeping your input and history; that helps when terminal output ends up garbled. In fullscreen rendering it has a second meaning: pressed again, it runs /clear. There the transcript viewer also offers two useful keys — [ writes the conversation into your terminal’s scrollback so native tools can search it, and v puts it in a temporary file and opens it in $VISUAL or $EDITOR.

/diff opens an interactive viewer for uncommitted changes and, with the arrow keys, walks through the diffs of individual turns too — nicer than reading raw git output before you commit. /insights goes a level up and analyzes your past sessions: which project areas you work in, which patterns repeat, and where things snag. Together with the shortcuts above, that is a handful of grips you practice once and never look up again:

# Toggle to plan mode, then back
Shift+Tab
Shift+Tab

/effort high
/btw what's the difference between async and defer on script tags?

Selecting text in vim mode

Set the editor mode to vim and the input field gains a visual selection as well. v starts it character-wise, V line-wise, and the familiar motions extend it: h, j, k, l for direction, w, e, b for word jumps, f, F, t, and T to jump to a character. An operator then acts on the selection:

d and x delete, y yanks, c and s change, p replaces the selection with the register contents, and r{char} overwrites the whole selection with a single character of your choice. ~, u, and U toggle or force case, > and < indent and dedent, J joins lines, and o jumps to the other end of the selection. Text objects such as iw, aw, i", or a( work too. Only one thing is missing: block-wise selection with Ctrl+V is not supported.

When a file is too large

Until a file gets too large, you never notice the Read tool. If reading all of it would blow the token limit, it now returns the first page plus a PARTIAL view notice telling Claude how much it got and how to read on — previously the call simply failed at that point. With offset and limit Claude then pages through the rest; pass those yourself and still exceed the limit, and you get an error as before. How much a single read may cost is governed by CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS.

There is nothing to turn on for this. The notice works more like a signpost: Claude sees there is more, and either narrows down with grep first or pages on deliberately. You feel it during migrations, in long log files, and whenever a tool like /init reads many files in sequence.

What a session cost

/usage answers in one window what two commands used to show separately: estimated cost, usage against your plan’s limits, and activity statistics. On Pro, Max, Team, and Enterprise plans a breakdown has been added since v2.1.149 showing what actually drives that usage — skills, subagents, plugins, and cost per MCP server. /cost and /stats still exist; they are aliases and open the same window. The dollar figures are locally estimated; the binding bill is in the Claude Console.

Set a goal and let it work

/goal records the condition that counts as done; Claude then pursues it on its own, turn after turn, without you prompting each step. After every turn a small evaluator of its own checks whether the condition holds and returns a short reason; once it does, the goal clears itself. While it runs, a ◎ /goal active indicator shows the elapsed time — turns, token spend, and the latest reason appear when you run /goal with no argument. Word the condition so that Claude’s own output can demonstrate it: a test run, an exit code, an empty queue:

/goal migrate all API endpoints from REST to GraphQL
/goal all tests pass and coverage is above 80%

A goal changes nothing about permissions: in the default mode Claude still asks before any tool call your settings do not already allow — to let it truly run unattended, pair /goal with auto mode. There are two ways to bound the run: as a clause inside the condition itself ("or stop after 20 turns"), or hard through the CLAUDE_CODE_MAX_TURNS environment variable, which does the same as --max-turns at launch:

export CLAUDE_CODE_MAX_TURNS=50

Coming back after a break

Come back to the terminal after a break and a one-line recap of what happened in the meantime is waiting. It triggers only when the last completed turn lies three minutes or more in the past and the window is not currently in the foreground; the writing then happens in the background, so the line is ready by the time you switch over. Before a session reaches its third turn there is none at all, and two recaps never follow directly on one another.

On demand, /recap produces the same summary. The automatic one can be switched off in /config under Session recap; by default it is on for every plan and provider. In non-interactive mode it is always skipped.

Every working directory carries an input history of its own. Repeats collapse inside it: send the same prompt again right away and it stays at a single entry, and Up brings you to the next prompt that actually differs. /clear starts a fresh history — the previous session’s conversation survives and stays reachable through /resume.

Ctrl+R searches that history backwards. In the inline version you type a query, jump to older matches with further Ctrl+R presses, and accept with Tab or Esc to keep editing, or Enter to run it right away; Ctrl+C cancels and restores your original input. This inline search always spans all projects. In fullscreen rendering Ctrl+R opens a dialog instead, where you pick with the arrow keys and cycle the scope between this session, this project, and all projects with Ctrl+S:

Ctrl+R → type "migration" → Ctrl+R (older matches) → Tab (accept)

Colors to your own taste

/theme switches the color scheme and brings a fair amount with it: an auto variant that follows your terminal’s background, light and dark editions, themes adapted for color vision deficiency, and ones that simply use your terminal’s own palette. Your own themes live as files in ~/.claude/themes/ and can be edited by hand; plugins may ship them in a themes/ directory.

Changing the role: output styles

An output style acts on the system prompt: it fixes the role, the tone, and the shape of the answer while leaving the knowledge behind it untouched. Besides Default there are three built in. Proactive executes immediately and makes its own assumptions on routine decisions instead of asking — stronger autonomy guidance than auto mode, but it does not change your permission mode, so you still see the prompts before tools run. Explanatory scatters explanations between the working steps. Learning has you write along: Claude marks spots with TODO(human) for you to fill in.

You switch in /config under Output style; the choice lands in .claude/settings.local.json, and if you prefer, you can set the outputStyle field directly in a settings file. Because the style is part of the system prompt, which is read once at session start, a change takes effect after /clear or in the next session. The former standalone /output-style command was removed in v2.1.91.

A custom style is a Markdown file with frontmatter, stored under ~/.claude/output-styles/ for you, .claude/output-styles/ for the project, or in the managed settings directory for a whole organization. What it is called comes from the frontmatter field name; leave that out and Claude Code takes the name from the file name instead. One more field decides the rest: keep-coding-instructions: true keeps Claude Code’s built-in engineering guidance in place next to yours — leave it out when Claude is not writing software at all, as a writing assistant or for data analysis:

---
name: Diagrams first
description: Lead every explanation with a diagram
keep-coding-instructions: true
---

When explaining code, architecture, or data flow, start with a Mermaid diagram showing the structure, then explain in prose.

Output styles travel, too: a plugin ships them in an output-styles/ directory, and a plugin style with force-for-plugin: true applies automatically whenever the plugin is enabled — overriding your own setting. If several such styles are active, the first one loaded wins.