Every Claude Code command, sorted by category
The complete reference for Claude Code slash commands, keyboard shortcuts, CLI flags and settings, verified command by command against version 2.1.220.
July 25, 2026 · 11 min read
Claude Code has a huge command surface, and almost nobody uses it. Most people type a prompt, approve the diffs, and never touch the 60 slash commands, 20 keyboard shortcuts and 50 flags that separate a nice tool from a tool that saves you hours every week.
Every entry on this page was verified against the CLI actually installed on my machine, version 2.1.220.So what follows is not a theoretical list: these are the commands your build genuinely accepts, sorted by what you use them for, with the exact values the CLI expects. Run claude --version to confirm yours.
The Claude AI Lab is my Skool community where I share my Claude systems and the more advanced modules. Access is $67/month.
Join the Lab →/help lists what your build actually knows. That is your source of truth, including over this page.Run your session
The first habit worth building is managing your context instead of letting it manage you. These commands are worth more than any magic prompt.
Conversation
/clear: wipes the conversation and starts fresh/compact [instructions]: compresses the context and keeps what matters, with optional instructions to steer what survives/resume: picks up a previous session or switches to another one/rename: names the current session so you can find it again/branch: branches the conversation from the current point/fork: duplicates the session so you can explore two directions without polluting the original/rewind: rolls back to an earlier state, both code and conversation/export: exports the conversation/copy: copies the last response to your clipboard/exit: closes the session
Context and spend
/context: shows how full your context window is, and what is filling it/cost: token usage with the cache breakdown/usage: your plan limits and rate limit status/insights: analyses your session history/btw: asks a side question without loading it into the current task's context
Run /context before /compact. Look at what is eating your window first, often a large file read once and never used again, instead of compacting blind.
Configure Claude
Model and effort
/model: switches model mid-session/effort: sets reasoning effort, across five levels :low,medium,high,xhigh,max/fast: turns fast mode on or off, which speeds up output without dropping to a smaller model
Interface and permissions
/config: opens settings/permissions: views and edits permission rules/fewer-permission-prompts: scans your sessions and proposes an allowlist so you stop approving the same commands over and over/keybindings: customises keyboard shortcuts/terminal-setup: configures your terminal/theme: changes the colour theme/color: changes the prompt bar colour/status: current session status/loginand/logout: handle authentication
The five effort levels
low: simple mechanical tasks, fast and cheapmedium: the balanced defaulthigh: complex multi-step workxhigh: one step abovehigh, for genuinely heavy tasksmax: the hardest problems, at the cost of time and tokens
These five values are the only ones accepted. There is no auto level : passing anything outside the list makes the command fail.
Automate
This is the part 90% of users never open, and it is where the real leverage sits.
Agents and skills
/agents: creates and manages your agents/skills: lists available skills/tasks: tracks running tasks/hooks: manages hooks, the scripts that fire automatically around Claude's actions/mcp: manages your MCP servers
Scheduling and remote work
/loop [interval]: reruns a prompt on an interval, or lets Claude pace itself/schedule: creates scheduled tasks that run in the cloud, without your laptop/goal: sets a finish condition, and Claude will not stop before meeting it/plan: switches to plan mode, where Claude designs before touching code/batch: applies a change in parallel across several isolated worktrees/remote-controland its alias/rc: open a bridge to claude.ai/code/teleport: pulls a session you started on the web into your terminal
Inputs and integrations
/voice: push-to-talk dictation/chrome: browser integration/ide: connects to your IDE/add-dir: adds a directory to the session's scope/install-github-app: installs the GitHub app/claude-api: loads the API and SDK reference before you build against the API/deep-research: deeper research passes/dataviz: frames how charts and dashboards get built/powerup: interactive lessons on features
/goal then /loop. The first defines the exit condition, the second keeps rerunning until it is met. That is the foundation of a task that finishes on its own.
Work on code
/init: generates aCLAUDE.mdfrom your codebase/memory: edits yourCLAUDE.mdfiles/diff: interactive diff viewer/review: code review/security-review: security analysis of your changes/simplify: passes over changed code for reuse, simplification and efficiency/doctor: diagnoses your installation and offers fixes/debug: investigates from the debug log/release-notes: interactive changelog for your version/feedback, alias/bug: reports an issue
/simplify is about quality, not bug hunting. It does not look for defects, it cleans up. To chase a bug, use /review.
Shortcuts
General controls
Ctrl+C: cancels the current input or generationCtrl+D: exits the session, on an empty promptCtrl+L: redraws the screenCtrl+O: toggles verbose mode and shows the transcriptCtrl+R: reverse search through historyCtrl+G: opens the prompt in your editorCtrl+B: sends the running task to the backgroundCtrl+T: shows or hides the task listCtrl+V: pastes an image or a large block of contentCtrl+E: in transcript mode, expands everythingCtrl+X: chord prefix, followed by a second key
Modes and toggles
Shift+Tab: cycles permission modes, from normal to auto-accept to plan modeAlt+P: switches modelAlt+O: toggles fast mode
Line editing
Ctrl+AandCtrl+E: start and end of lineCtrl+U: deletes the lineCtrl+K: deletes to end of lineCtrl+JorShift+Enter: inserts a newline without sending
Input prefixes
/: opens a slash command!: runs a bash command directly, without leaving the chat@: mentions a file, with path autocomplete
Shift+Tab. Switching to plan mode before a risky refactor, or to auto-accept on a repetitive low-risk task, is the single gesture that saves the most time across a day.
The command line
Starting and resuming
claude: starts an interactive sessionclaude "your question": starts with an initial promptclaude -p "your question": non-interactive mode, ideal in scriptsclaude -c: continues the most recent conversation in this directoryclaude -r "name": resumes a session by name, or opens the pickercat file | claude -p: pipes a file in as input
Subcommands
claude update: updates Claude Codeclaude doctor: checks installation healthclaude agents: manages background agentsclaude mcp: configures MCP serversclaude plugin: manages pluginsclaude project: manages project stateclaude auth: manages authenticationclaude setup-token: creates a long-lived tokenclaude ultrareview: runs a cloud-hosted multi-agent code review
Useful flags
--model: picks the model, by alias (fable,opus,sonnet) or full name--effort:low,medium,high,xhigh,max--permission-mode:manual,auto,acceptEdits,plan,dontAsk,bypassPermissions-w,--worktree [name]: creates a dedicated git worktree for the session--tmux: opens the worktree in a tmux session-n,--name: names the session--add-dir: adds accessible directories--agentand--agents: selects an agent, or defines agents inline as JSON--allowed-toolsand--disallowed-tools: pre-approves or blocks tools--tools: restricts the available tool set--output-format:text,jsonorstream-json--json-schema: enforces a structured output schema--max-budget-usd: caps spend, in print mode--bg,--background: starts the session as a background agent--fork-session: creates a new session ID when resuming--from-pr: resumes a session linked to a pull request--safe-mode: starts with all your customisations disabled, to isolate a broken config--bare: minimal mode, no hooks, LSP, plugins or auto-memory--verbose: detailed output--remote-control [name]: starts a session with the remote control bridge--dangerously-skip-permissions: bypasses every permission check
--max-budget-usd so a long autonomous task never surprises you, and --safe-mode for the day nothing works and you cannot tell which hook or plugin is to blame.
Configuration
Settings files
~/.claude/settings.json: your personal settings, across all projects.claude/settings.json: project settings, shared with your team.claude/settings.local.json: local settings, not committed~/.claude.json: authentication, MCP and state.mcp.json: project MCP servers, committed to the repo
Instructions and rules
./CLAUDE.md: project instructions, shared~/.claude/CLAUDE.md: your personal instructions, across all projects.claude/rules/*.mdand~/.claude/rules/*.md: rules loaded by contextpaths:in frontmatter : scopes a rule to specific paths@path/to/file: imports another file into yourCLAUDE.md
Automatic memory
~/.claude/projects/<project>/memory/: aMEMORY.mdindex plus topic files, loaded every session- The project
CLAUDE.mdsurvives compaction, unlike the rest of the conversation
Skills and agents
.claude/skills/<name>/: project skills~/.claude/skills/<name>/: your personal skills- Skill frontmatter :
descriptionfor automatic triggering,allowed-tools,model,effort,paths,argument-hint,disable-model-invocation, and$ARGUMENTSas the input placeholder - Agent frontmatter :
permissionMode,isolation: worktree,maxTurns,initialPrompt,background - Built-in agents :
Explorefor read-only searching,Planfor design work,general-purposefor everything else
MCP
- Three scopes when adding a server, via
--scope:local,projectoruser - Three transports, via
--transport:http,sseorstdio - Example :
claude mcp add --transport http my-server https://example.com/mcp
Environment variables
ANTHROPIC_API_KEY: your API keyANTHROPIC_MODEL: forces the default modelANTHROPIC_BASE_URL: routes through a proxy or gatewayCLAUDE_CODE_EFFORT_LEVEL: default effort levelMAX_THINKING_TOKENS: caps reasoning,0turns it offCLAUDE_CODE_MAX_OUTPUT_TOKENS: caps output lengthBASH_MAX_OUTPUT_LENGTH: truncates oversized bash outputAPI_TIMEOUT_MSandCLAUDE_STREAM_IDLE_TIMEOUT_MS: timeouts and the streaming watchdogCLAUDE_CODE_DISABLE_CRON: disables scheduled tasksMCP_CONNECTION_NONBLOCKING: does not wait on MCP servers at startupCLAUDE_CODE_SUBPROCESS_ENV_SCRUB: strips credentials from subprocessesCLAUDECODE: set to1inside a shell launched by Claude Code, handy for detecting it in a script
If ANTHROPIC_API_KEY is sitting in your environment, Claude Code can switch to usage-based billing instead of your subscription. Worth checking before you kick off long sessions.
Where to start if you only keep five
If you only build five habits this week, make it these.
/initto create yourCLAUDE.md, because everything else builds on itShift+Tabto switch to plan mode before risky changes/contextto see what is filling your window before you compact/costat the end of a long session, to understand where your tokens went--max-budget-usdon autonomous tasks, so you can sleep on it
The rest you pick up as you go. But those five, you will use every single day.
Want to go further?
In the Lab, I share the Claude resources I actually use and how I wire them into my systems.
A dedicated session or program, tailored to your tools and use cases.
And day-to-day, I post one reel a day on Instagram: @quentin_iamarketing