Guide

Claude Code commands and shortcuts

Harrowtech.ai · last checked 13 October 2026

Type / in Claude Code to see every command available to you. This page groups the ones people use most by the job they do, with the keyboard shortcuts alongside, checked against Anthropic's documentation and Claude Code 2.1.296.

Harrowtech.ai is independent of Anthropic. Everything below comes from Anthropic's commands and interactive mode pages, read on 13 October 2026. The version was checked with claude --version, which returned 2.1.296 (Claude Code). Anthropic marks many commands with the minimum version they need, and every minimum named on this page is at or below 2.1.296.

The ten most people need first

/helpLists the commands available to you.
/initWrites a starter CLAUDE.md for the project.
/clearStarts a new conversation with empty context.
/compactSummarises the conversation so far to free space.
/contextShows what is filling the context window.
/modelSwitches the model.
/resumeReturns to an earlier conversation.
/rewindRolls code and conversation back to a checkpoint.
/permissionsSets which tools run without asking.
EscStops Claude mid-turn and keeps the work done so far.

How commands behave

Setting up a project

Anthropic's commands page walks a first session in a repository through /init, /memory, /mcp and /permissions, in that order.

/initCreates a CLAUDE.md guide for the project. If it finds OpenAI Codex or Gemini CLI configuration it offers to bring it across. More on the file in Claude Code projects and CLAUDE.md.
/memoryEdits CLAUDE.md files, turns auto memory on or off, and shows what auto memory has saved.
/mcpManages MCP server connections and their sign-ins. /mcp reconnect all retries every server that failed. See Claude Code MCP servers.
/permissionsOpens the allow, ask and deny rules for tools, by scope. Alias /allowed-tools.
/hooksShows the hooks that are configured. See Claude Code hooks.
/skillsLists available skills. Press t to sort by token count.
/agentsOn current versions this only prints a reminder: ask Claude to create a subagent, or edit .claude/agents/ directly. The interactive manager it used to open was in v2.1.197 and earlier. See Claude Code agents.
/configOpens settings such as theme, model and output style. /config theme=dark sets a value without opening the panel. Alias /settings.
/add-dir <path>Gives the session access to another folder.
/cd <path>Moves the session to a different working folder and keeps the conversation.
/importBrings configuration across from OpenAI Codex, Gemini CLI or Cursor. Add --dry-run to preview.

Managing context and the conversation

/clear [name]Starts a new conversation with empty context. The old one stays available through /resume. Aliases /reset and /new.
/compact [instructions]Summarises the conversation to free space while carrying on with it. Add what to keep, for example /compact focus on the API changes.
/contextShows context use as a coloured grid, with suggestions for what is taking room.
/btw <question>Asks a side question about the session. The answer never enters the conversation history, and Claude gets no tools to answer it.
/rewindGoes back to an earlier point in the conversation, the code or both, or summarises from a chosen message. Aliases /checkpoint and /undo.
/resume [session]Resumes a conversation by ID or name, or opens a picker. Alias /continue.
/rename [name]Names the current session. Without a name, Claude Code makes one up from the conversation.
/branch [name]Splits the conversation at this point so you can try another direction. The original stays in /resume.
/export [filename]Saves the conversation as plain text.
/copy [N]Copies the last reply, or the Nth latest, to the clipboard.
/recapWrites a one-line summary of the session so far.

Model, effort and speed

/model [model]Switches model and saves it as the default for new sessions. In the picker, press s on a row to switch for this session only.
/effort [level]Sets how much reasoning Claude applies, from low to xhigh, max or auto. max lasts for the session only.
/fast [on|off]Turns fast mode on or off.

Planning, reviewing and shipping

/plan [task]Enters plan mode from the prompt, optionally starting on a task straight away.
/diffShows the changes in the working tree, including Claude's edits, with a view of each turn's edits.
/code-reviewReviews the current diff, or a pull request number, branch or path, for correctness bugs. --fix applies the findings. Alias /review.
/security-reviewChecks the changes on the current branch for security problems such as injection and data exposure. Needs an origin remote.
/simplifyReviews changed code for clean-up rather than bugs, and applies the fixes.
/verifyBuilds and runs the app to confirm a change works, rather than relying on tests alone.
/batch <instruction>Splits a large change into 5 to 30 units and runs each in its own git worktree after you approve the plan.

Background and parallel work

/tasksLists the session's background work, including subagents that have finished. Also /bashes.
/subtask <task>Hands a side task to a subagent that starts with a copy of the conversation and reports back into it.
/fork [prompt]Copies the conversation into a separate background session and keeps you where you are.
/background [prompt]Detaches the whole session to keep running in the background and frees the terminal. Alias /bg.
/loop [interval] [prompt]Repeats a prompt while the session stays open, for example /loop 5m check if the deploy finished.
/scheduleCreates and manages routines that run in the cloud.

Account, usage and limits

/login and /logoutSign in to or out of your Anthropic account. Sign-in problems are covered in Claude Code API key and login.
/statusShows version, model, account and connectivity. Works while Claude is answering.
/usageShows session cost, plan usage limits and activity. /cost and /stats are aliases.
/usage-creditsSets up usage credits, or asks your admin for them, when you hit a limit. It replaced /extra-usage.
/rate-limit-optionsShows ways to keep working when a claude.ai usage limit blocks a request.
/privacy-settingsPrivacy settings, for Pro and Max subscribers only.

When something goes wrong

/doctorChecks installation, settings, extensions and CLAUDE.md, and proposes fixes that Claude applies after you confirm. Alias /checkup.
/debug [description]Turns on debug logging from that point and reads the log to diagnose a problem.
/bug and /feedbackReport a bug or send feedback, after a consent screen showing how much of the session goes with it.
/release-notesShows the changelog for a chosen version.
/heapdumpWrites a memory snapshot for diagnosing high memory use. Anthropic warns the .heapsnapshot file contains the full conversation and credentials, so share only the -diagnostics.json file.

Older commands that have changed

Tutorials written for earlier versions still mention these. Here is what each does now.

/agentsNo longer opens a manager after v2.1.197. Ask Claude to create the subagent instead.
/reviewBefore v2.1.223 it was a separate pull request review. It is now an alias of /code-review.
/pr-commentsRemoved in v2.1.91. Ask Claude to read the pull request comments.
/vimRemoved in v2.1.92. Vim editing is under /config, Editor mode.
/ultraplanRemoved. Use plan mode.
/extra-usageNow /usage-credits.

Keyboard shortcuts

Stopping, undoing and leaving

EscInterrupts the current reply or tool call and keeps the work done so far. In a dialog it closes the dialog. On a permission prompt it declines.
Esc twiceWith text in the prompt, clears it (Up brings it back). With an empty prompt, opens the rewind menu.
Ctrl+CInterrupts what is running. With nothing running, the first press clears the prompt and a second exits.
Ctrl+DOn an empty prompt, press twice within 800ms to exit. With text in the prompt it deletes the character after the cursor.
Ctrl+X Ctrl+KStops every running background subagent. Press twice within 3 seconds to confirm.

Modes and models

Shift+TabCycles permission modes: Manual, accept edits, plan, then bypass and auto where available. On some Windows setups Anthropic lists Alt+M for this instead.
Alt+P (Option+P on a Mac)Switches model without clearing what you have typed.
Alt+T (Option+T)Turns extended thinking on or off. Anthropic notes it has no effect on the 5.5 and Fable models, which always use it.
Alt+O (Option+O)Turns fast mode on or off.

Writing the prompt

Ctrl+GOpens the prompt in your default text editor.
Ctrl+RSearches earlier prompts.
Up and DownMove through earlier prompts. History is kept per working folder.
Ctrl+SStashes the current prompt and clears the box. Press again on an empty prompt to get it back.
Ctrl+_Undoes the last edit to the prompt.
Ctrl+VPastes an image from the clipboard. Cmd+V in iTerm2, Alt+V on Windows and WSL.
Ctrl+EnterSends queued messages now instead of waiting for the turn to end. Ctrl+X Ctrl+S does the same in terminals that do not pass Ctrl+Enter through.

Views

Ctrl+OOpens the transcript view, with each tool call in full.
Ctrl+TShows or hides Claude's to-do checklist. This is not the background task list, which is /tasks.
Ctrl+BMoves a running command or agent to the background. In tmux, press it twice.
Ctrl+LRedraws the screen if the display is garbled.

On a Mac, the Alt shortcuts for model switching and word editing need Option set as Meta in the terminal's settings. Option+T works without it. To change any shortcut, /keybindings opens the shortcuts file.

Prefixes and new lines

/ at the startA command or skill.
! at the startRuns a shell command directly, adds the output to the conversation, and Claude responds to it. For example ! npm test.
@Mentions a file, with path completion.
? on an empty promptShows the shortcut help.
\ then EnterA new line, in any terminal. Ctrl+J also works everywhere.
Shift+EnterA new line in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal. /terminal-setup adds it to VS Code, Cursor, Devin Desktop, Alacritty and Zed.

What this guide does not cover

It leaves out flags you pass when starting claude from the shell, such as -p and --resume; those are in Claude Code CLI and headless mode. It also leaves out Vim editing keys, the voice and artifact commands, plugin and cloud-session commands, and other commands most people will not need early on. Anthropic's commands page lists them all, and running /help shows the list for your own version and plan.

Sources

Related: All Harrowtech.ai guides · Claude Code best practices · How to install Claude Code