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
/help | Lists the commands available to you. |
/init | Writes a starter CLAUDE.md for the project. |
/clear | Starts a new conversation with empty context. |
/compact | Summarises the conversation so far to free space. |
/context | Shows what is filling the context window. |
/model | Switches the model. |
/resume | Returns to an earlier conversation. |
/rewind | Rolls code and conversation back to a checkpoint. |
/permissions | Sets which tools run without asking. |
Esc | Stops Claude mid-turn and keeps the work done so far. |
How commands behave
- A command is only recognised at the start of a message. Anything typed after its name is passed to it as arguments, for example
/plan fix the auth bug.
- Typing
/ then a few letters filters the menu. A command typed in full runs; after a typo, Enter sends the text as typed and Claude Code reports Unknown command.
- A command sent while Claude is still answering is queued until the turn ends. Some, such as
/status, /usage, /tasks, /model, /effort and /fast, act straight away instead.
- Not every command shows for every account. Anthropic says availability depends on platform, plan and environment.
/desktop, for example, only appears on macOS and x64 Windows with a Claude subscription.
- A few commands, such as
/heapdump, are hidden from the menu and run only when typed in full.
- Some entries are bundled skills rather than built-in commands. Your own commands are skills too: see Claude Code skills.
Setting up a project
Anthropic's commands page walks a first session in a repository through /init, /memory, /mcp and /permissions, in that order.
/init | Creates 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. |
/memory | Edits CLAUDE.md files, turns auto memory on or off, and shows what auto memory has saved. |
/mcp | Manages MCP server connections and their sign-ins. /mcp reconnect all retries every server that failed. See Claude Code MCP servers. |
/permissions | Opens the allow, ask and deny rules for tools, by scope. Alias /allowed-tools. |
/hooks | Shows the hooks that are configured. See Claude Code hooks. |
/skills | Lists available skills. Press t to sort by token count. |
/agents | On 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. |
/config | Opens 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. |
/import | Brings 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. |
/context | Shows 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. |
/rewind | Goes 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. |
/recap | Writes 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. |
/diff | Shows the changes in the working tree, including Claude's edits, with a view of each turn's edits. |
/code-review | Reviews the current diff, or a pull request number, branch or path, for correctness bugs. --fix applies the findings. Alias /review. |
/security-review | Checks the changes on the current branch for security problems such as injection and data exposure. Needs an origin remote. |
/simplify | Reviews changed code for clean-up rather than bugs, and applies the fixes. |
/verify | Builds 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
/tasks | Lists 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. |
/schedule | Creates and manages routines that run in the cloud. |
Account, usage and limits
/login and /logout | Sign in to or out of your Anthropic account. Sign-in problems are covered in Claude Code API key and login. |
/status | Shows version, model, account and connectivity. Works while Claude is answering. |
/usage | Shows session cost, plan usage limits and activity. /cost and /stats are aliases. |
/usage-credits | Sets up usage credits, or asks your admin for them, when you hit a limit. It replaced /extra-usage. |
/rate-limit-options | Shows ways to keep working when a claude.ai usage limit blocks a request. |
/privacy-settings | Privacy settings, for Pro and Max subscribers only. |
When something goes wrong
/doctor | Checks 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 /feedback | Report a bug or send feedback, after a consent screen showing how much of the session goes with it. |
/release-notes | Shows the changelog for a chosen version. |
/heapdump | Writes 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.
/agents | No longer opens a manager after v2.1.197. Ask Claude to create the subagent instead. |
/review | Before v2.1.223 it was a separate pull request review. It is now an alias of /code-review. |
/pr-comments | Removed in v2.1.91. Ask Claude to read the pull request comments. |
/vim | Removed in v2.1.92. Vim editing is under /config, Editor mode. |
/ultraplan | Removed. Use plan mode. |
/extra-usage | Now /usage-credits. |
Keyboard shortcuts
Stopping, undoing and leaving
Esc | Interrupts 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 twice | With text in the prompt, clears it (Up brings it back). With an empty prompt, opens the rewind menu. |
Ctrl+C | Interrupts what is running. With nothing running, the first press clears the prompt and a second exits. |
Ctrl+D | On an empty prompt, press twice within 800ms to exit. With text in the prompt it deletes the character after the cursor. |
Ctrl+X Ctrl+K | Stops every running background subagent. Press twice within 3 seconds to confirm. |
Modes and models
Shift+Tab | Cycles 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+G | Opens the prompt in your default text editor. |
Ctrl+R | Searches earlier prompts. |
Up and Down | Move through earlier prompts. History is kept per working folder. |
Ctrl+S | Stashes 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+V | Pastes an image from the clipboard. Cmd+V in iTerm2, Alt+V on Windows and WSL. |
Ctrl+Enter | Sends 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+O | Opens the transcript view, with each tool call in full. |
Ctrl+T | Shows or hides Claude's to-do checklist. This is not the background task list, which is /tasks. |
Ctrl+B | Moves a running command or agent to the background. In tmux, press it twice. |
Ctrl+L | Redraws 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 start | A command or skill. |
! at the start | Runs 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 prompt | Shows the shortcut help. |
\ then Enter | A new line, in any terminal. Ctrl+J also works everywhere. |
Shift+Enter | A 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