Claude Code commands: slash commands, CLI commands and flags

In brief

Claude Code commands are the slash commands you type inside a session, such as /init, /model, /compact and /usage, plus the claude commands and flags you type in a shell, such as claude -p and --resume. By our count of Anthropic's docs on 15 November 2026, that is 121 slash commands, 36 CLI commands and 85 flags.

Whizi doesn’t connect to Claude Code.

What are the Claude Code commands?

Claude Code has three kinds of commands, and the docs keep them on separate pages. Slash commands run inside a session. CLI commands and flags run in your shell before a session starts. Skills are the third kind, and they let you write your own. Anthropic's commands page opens with one line: "Commands control Claude Code from inside a session."

A terracotta Claude starburst resting on a black plinth beside a row of chrome keyboard keys, each carrying a glowing rainbow glass slash, in a dark charcoal studio.

Nobody needs all of them, and you won't. The tables below keep the ones that change what you do day to day, each with its syntax copied from the docs. In that syntax, <arg> is a required argument and [arg] is an optional one. Type / in a session to see what is available to you, because not every command shows for every user. Anthropic's example: /desktop only shows on macOS and x64 Windows when you are signed in with a Claude subscription.

Our count: 121 slash commands, 36 CLI commands, 85 flags
Slash commandstyped inside a session121CLI commandstyped in a shell36CLI flagsadded to claude85each square is about 10 entries, counted by us from Anthropic'scommands and CLI reference pages on 15 November 2026

A command only counts at the start of your message. Text after the name becomes its arguments. If you send one while Claude is answering, Claude Code queues it for after the turn. A few, such as /status, /tasks and /usage, run at once instead.

Which slash commands set up a project, a model and the context?

Start with /init, then /memory, /model and /context. Those four cover a first session: they write the project guide, edit it, pick the model and show what is filling the window. Anthropic's own first-session advice starts with /init and /memory too. Every row below is from the commands page, read on 15 November 2026.

Slash commandWhat it does
/initWrites a starter CLAUDE.md guide for the project
/memoryEdits CLAUDE.md files and turns auto memory on or off
/model [model]Switches the model and saves it as your default for new sessions
`/effort [level\auto\status\ultracode [on\off]]`Sets how much reasoning the model applies: low to xhigh, max or auto, with status to print it
/plan [description]Enters plan mode from the prompt, optionally with a task to start on
/context [all]Shows context usage as a colored grid with suggestions for what to trim
/compact [instructions]Summarizes the conversation to free space, with optional focus instructions
/clear [name]Starts a new conversation with empty context
/add-dir <path>Adds a working directory Claude can read and edit
/permissionsManages allow, ask and deny rules for tools
/config [key=value ...]Opens settings, or sets one directly such as /config theme=dark
`/mcp [reconnect (<server>\all)\enable\disable [<server>\all]]`Manages MCP server connections and their sign-in
/hooksShows your hook configurations
/skillsLists available skills, which is where your own commands live
/plugin [subcommand]Opens the plugin menu, or runs list, install, enable or disable
/statuslineConfigures the status line at the bottom of the screen

Two of these are easy to mix up. /clear throws the conversation away and keeps project memory, so it is the cheap reset between unrelated tasks. /compact keeps the thread but summarizes it. Anthropic's page says to use /compact when you want to free space and continue the same conversation. Plan mode has its own guide, Claude Code plan mode, and MCP servers have Claude Code MCP and what MCP is.

Which slash commands manage sessions, reviews and background work?

Use /resume to go back, /rewind to undo, and /diff plus /code-review before you ship. These are the commands for the moments when something has gone wrong or a change is finished. The table keeps one scope, commands that act on work you already did or are still running.

Slash commandWhat it does
/resume [session]Resumes a conversation by ID or name, or opens the session picker
/branch [name]Branches the conversation here so you can try another direction
/rewindRolls the conversation, the code or both back to an earlier point
/diffShows the changes in your working tree, including Claude's edits
`/code-review [low\medium\high\xhigh\max\ultra] [--fix] [--comment] [--max-findings n\all\default] [pr#\branch\path]`Reviews the current diff or a pull request for correctness bugs
/security-reviewChecks the changes on your branch for security problems such as injection
/btw [question]Asks a side question without adding it to the conversation
/tasksLists background work in the session, including finished subagents
/background [prompt]Detaches the session to run as a background agent and frees the terminal
/loop [interval] [prompt]Runs a prompt again and again while the session stays open
/schedule [description]Creates, updates, lists or runs cloud scheduled tasks
/export [filename]Exports the conversation as plain text
/copy [N]Copies the last response, or the Nth latest, to the clipboard
/exitQuits the CLI, and its alias is /quit

/review is an alias of /code-review, and it takes the same effort levels. Anthropic says /code-review ultra runs a multi-agent review in the cloud. /rewind has the aliases /checkpoint and /undo, so a teammate telling you to run /undo means the same thing.

Which commands show your usage and fix a broken install?

/usage shows session cost, plan limits and activity, and /status shows your version, model, account and connection. Those two answer most "why am I blocked" questions. /cost and /stats are aliases of /usage, so you don't need to learn three commands for one screen.

Slash commandWhat it does
/usageShows session cost, plan usage limits and activity stats
/statusOpens settings on the Status tab with version, model, account and connectivity
/usage-creditsOpens usage-credits billing, or requests credits from your admin, when you hit a limit
/rate-limit-optionsLists ways to keep working when a claude.ai usage limit blocks a request
/doctor [prompt-audit [path]]Runs a setup checkup and proposes fixes that Claude applies after you confirm
/debug [description]Turns on debug logging and troubleshoots from the log
/loginSigns in to your Anthropic account
/logoutSigns out of your Anthropic account
/helpShows help and available commands
/release-notesOpens the changelog in a version picker
/terminal-setupInstalls a Shift+Enter keybinding for newlines in terminals such as VS Code, Cursor and Zed

The limit commands have their own guide. Claude Code usage limit by plan covers the five-hour window, the weekly cap and the messages Claude Code prints at each wall. This page stays on the command list.

Claude Code is a subscription or API product, and Whizi doesn't run it. What Whizi can do is catch the overflow. When /usage shows the window is gone and you only need an answer, a plain chat can answer it while you wait. Whizi Pro carries Claude, GPT and Gemini in one app, and its first week is $1.99. The free plan gives 10 messages a day on Whizi AI, Auto and Claude Haiku 5.5, with no card.

Which Claude Code commands have been removed or renamed?

Three slash commands are listed as removed, and several others only exist as aliases now. Third-party cheat sheets still teach the old names. The table below is compiled from the entries on Anthropic's commands page on 15 November 2026.

CommandStatus on the commands pageWhat to use
/pr-comments [PR]Removed in v2.1.91Ask Claude directly to view pull request comments
/vimRemoved in v2.1.92/config, then Editor mode
/ultraplan <prompt>RemovedPlan mode, with /plan
/agentsPrints a reminder on v2.1.198 and later; v2.1.197 and earlier open an interfaceAsk Claude to create or manage subagents, or edit .claude/agents/
/costAlias for /usage/usage
/statsAlias for /usage, opens on the Stats tab/usage
/reviewAlias of /code-review/code-review
/bashesAlias of /tasks/tasks
/updateAlias of /restart, which needs v2.1.288 or later, a Pro, Max or Ultra plan and a native install on macOS or Linux/restart

If you type a name that does not match, Claude Code reports it. Anthropic's error reference shows the exact line: "Unknown command: /hepl. Did you mean /help?" A typo is the usual cause. In -p runs, the Desktop app and the VS Code panel, an unmatched name is instead sent to Claude as a normal message. The other two causes are a command your platform, plan or sign-in method does not get, and a plugin or MCP server command that is not installed or connected in this session. A command that is missing for you is usually a plan or platform issue, and it isn't a bug.

Which claude commands do you run in the terminal?

The command you will run most is plain claude in a project folder, and the second is claude -p for a single answer with no session. Everything else in the table below is for updates, sign-in and running sessions in the background. The rows come from the CLI reference, read on 15 November 2026.

CommandWhat it does
claudeStarts an interactive session
claude "query"Starts an interactive session with an opening prompt
claude -p "query"Asks once through the SDK, prints the answer and exits
`cat file \claude -p "query"`Pipes content in and answers about it
claude -cContinues the most recent conversation in this directory
claude -r "<session>" "query"Resumes a session by ID or name
claude updateUpdates to the latest version
claude install [version]Installs or reinstalls the native binary, accepting a version, stable or latest
claude auth loginSigns in, and --console bills your API usage instead of a subscription
claude auth statusShows sign-in status as JSON, or as text with --text
claude doctorPrints read-only install and settings diagnostics without starting a session
claude mcpConfigures MCP servers
claude agentsOpens agent view to watch and dispatch parallel background sessions
claude setup-tokenMakes a long-lived OAuth token for CI and scripts, and needs a Claude subscription

The reference adds one tip worth knowing: if you mistype a subcommand, Claude Code suggests the closest match and exits without starting a session. Its example is that claude udpate prints Did you mean claude update?.

Which CLI flags change how Claude Code starts?

The flags worth knowing pick a model, a permission mode, a saved session or a script-friendly output. The CLI reference says claude --help does not list every flag, so a flag missing from --help is not necessarily unavailable. Here are the ones that matter, copied from that page.

FlagWhat it does
--modelSets the model for this session with an alias such as sonnet, opus, haiku or fable, or a full name
--effortSets the effort level for this session, from low to max, or ultracode
--permission-modeStarts in default, acceptEdits, plan, auto, dontAsk or bypassPermissions
--print, -pPrints the response without interactive mode
--output-formatSets print mode output to text, json or stream-json
--max-turnsLimits agentic turns in print mode
--max-budget-usdStops a print mode run once estimated spend reaches the amount
--continue, -cLoads the most recent conversation in this directory
--resume, -rResumes a session by ID or name, or shows a picker
--fork-sessionWhen resuming, creates a new session ID instead of reusing the old one
--name, -nGives the session a display name for the /resume picker
--worktree, -wStarts Claude in an isolated git worktree
--add-dirAdds more working directories for Claude to read and edit
--append-system-promptAdds your text to the end of the default system prompt
--system-promptReplaces the entire system prompt
--allowedTools, --allowed-toolsLists tools that run without a permission prompt
--disallowedTools, --disallowed-toolsSets deny rules for tools
--dangerously-skip-permissionsSkips permission prompts, the same as --permission-mode bypassPermissions
--bareSkips auto-discovery of hooks, skills, plugins, MCP servers and CLAUDE.md so scripted calls start faster
--mcp-configLoads MCP servers from JSON files or strings
--fallback-modelFalls back to another model when the main one is overloaded
--debugTurns on debug mode, with optional filters such as --debug='mcp,startup'
--verboseShows full turn-by-turn output
--version, -vPrints the version number

Two flags carry real risk. --dangerously-skip-permissions is named for it: it removes the prompts that stop Claude running commands you did not read. --max-budget-usd is the opposite, a brake. Anthropic says spend can pass the cap and calls the number a client-side estimate that can differ from your bill, so treat it as a guardrail and not a promise.

For scripts, combine three of them: claude -p "query" --output-format json gives machine-readable output, --max-turns stops a loop, and --bare removes startup work. These are copied from the example column of the reference.

Which keyboard shortcuts go with the commands?

Five keys do most of the work: Esc to stop, Esc twice to rewind, Shift+Tab to change mode, Ctrl+R to search history and Ctrl+O to see tool detail. Two prefixes matter too. A ! at the start of a message runs a shell command, and @ completes a file path. The rows below come from Anthropic's interactive mode page, read on 15 November 2026.

KeyWhat it does
EscInterrupts Claude mid-turn and keeps the work done so far, or closes a dialog
Esc + EscClears a typed draft, or opens the rewind menu when the prompt is empty
Shift+TabCycles permission modes, from default through acceptEdits and plan
Ctrl+CInterrupts a running operation, or clears the prompt, and a second press exits
Ctrl+DExits the session after a second press within 800ms
Ctrl+RSearches your previous commands
Ctrl+OToggles the transcript viewer, with detailed tool usage
Ctrl+BBackgrounds running Bash commands and agents
Ctrl+GOpens your prompt in your default text editor
Option+P (macOS) or Alt+P (Windows, Linux)Switches model without clearing your prompt
! at the startShell mode: runs a command and adds its output to the session
@Triggers file path autocomplete

Esc and /rewind are the same safety net from two sides. Esc stops a run you can see going wrong, and /rewind undoes what already landed.

How do you install Claude Code and which plan do you need?

You need a paid Claude plan or an API account, and one install command. Anthropic's setup page says "Claude Code requires a Pro, Max, Ultra, Team, Enterprise, or Console account. The free claude.ai plan does not include Claude Code access." It also lists Amazon Bedrock, Google Cloud's Agent Platform and Microsoft Foundry as third-party ways in. The steps above are from the setup page, read on 15 November 2026.

PlatformInstall command
macOS, Linux`curl -fsSL https://claude.ai/install.sh \bash`
Windows PowerShell`irm https://claude.ai/install.ps1 \iex`
Windows CMDcurl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Homebrewbrew install --cask claude-code
WinGetwinget install Anthropic.ClaudeCode
npm (needs Node.js 22 or later)npm install -g @anthropic-ai/claude-code@latest

Updates differ by method. Native installs update in the background. Homebrew and WinGet installs do not auto-update, so run brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode yourself. The system requirements are macOS 13.0 or later, Windows 10 1809 or later, Ubuntu 20.04 or later, Debian 10 or later, or Alpine Linux 3.19 or later, with 4 GB of RAM or more. How to use Claude Code walks through a first task once it runs.

What do you do when a Claude Code command fails?

Match the error to its cause before you reinstall anything. The two you'll meet first are command not found for the claude program and "Unknown command" for a slash command. They sound alike and have nothing in common.

What you seeWhat it meansFix
zsh: command not found: claudeThe install folder is not on your PATHFollow Verify your PATH on Anthropic's install troubleshooting page
'claude' is not recognized as an internal or external commandThe same PATH problem on Windows CMDSame page, Windows section
Unknown command: /hepl. Did you mean /help?A typo, or a command your plan or platform does not getPick the close match with Tab, or run /help to see what you have
A slash command you expected is missing from the menuClaude Code leaves out commands that are not available to youCheck the plan and platform note beside that command in the docs
claude --version works but Claude Code crashesThe binary runs but something later failsRun claude doctor and read its warnings

Anthropic puts the install fix on a separate page, Troubleshoot installation and login, and runtime errors on its error reference. One detail saves time. After a typo, Claude Code highlights nothing, and pressing Enter submits your text as typed. Use Tab or the arrow keys to take the suggestion first.

How do you add your own commands?

You add your own commands as skills. Anthropic's commands page sends you to skills for your own commands, and a bundled skill works like one you write yourself: it is a prompt handed to Claude. /skills lists them, /reload-skills re-scans the folders so a new one shows up without a restart, and /skill-doctor reports what each skill costs in context.

MCP servers can add commands too. Anthropic says servers can expose prompts that appear as commands, and that's the likeliest reason a menu entry shows for one teammate and not another. Old command files still work. The skills docs say custom commands have been merged into skills, so a file in .claude/commands/ keeps working, and moving .claude/commands/deploy.md to .claude/skills/deploy/SKILL.md still gives you /deploy. The skills docs hold the format, and what is MCP explains the server side.

Workflow checklist
  • Run /help in your own session: the menu lists only the commands your plan and platform get
  • Start a project with /init, then trim the file it writes with /memory
  • Use /clear between unrelated tasks and /compact when you want to keep the thread
  • Check /usage and /status before assuming a limit or an account problem
  • Treat /cost and /stats as aliases, and stop using /pr-comments, /vim and /ultraplan
  • Use claude -p with --output-format json, --max-turns and --max-budget-usd for scripts
  • Keep --dangerously-skip-permissions for throwaway sandboxes
  • Run claude doctor before reinstalling when an install misbehaves
Common questions

Frequently asked questions

What are the most useful Claude Code slash commands?

The most useful ones are /init, /model, /context, /compact, /clear, /resume, /rewind, /diff and /usage. They cover setup, choosing a model, managing context, undoing mistakes and checking your plan limits. By our count, Anthropic's commands page lists 121 entries as of 15 November 2026, but a daily workflow rarely needs more than these.

Which Claude Code commands are deprecated?

Three are marked removed on Anthropic's commands page as of November 2026: /pr-comments in v2.1.91, /vim in v2.1.92 and /ultraplan. Plan mode replaced /ultraplan, /config handles Vim mode, and Claude can read pull request comments when you ask. /cost, /stats and /review still work, but only as aliases.

What is the difference between slash commands and skills in Claude Code?

Slash commands are typed at the start of a message and run in the session. Built-in ones are coded into the CLI, while a skill is a prompt handed to Claude. Anthropic's docs treat skills as the way you add your own commands, and the bundled ones such as /code-review and /simplify show up in the same list. Old files in .claude/commands/ still work, because custom commands were merged into skills.

What are the Claude Code keyboard shortcuts?

The main ones are Esc to interrupt, Esc twice to rewind or clear a draft, Shift+Tab to cycle permission modes, Ctrl+R to search history and Ctrl+C to stop or clear. Typing ! at the start of a message runs a shell command, and @ completes a file path, per Anthropic's interactive mode page as of November 2026.

Does Claude Code work on the free Claude plan?

No. Anthropic's setup page says the free claude.ai plan does not include Claude Code access, and lists Pro, Max, Ultra, Team, Enterprise or a Console account as the requirement. You can also pay through Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry, as of November 2026.