Claude · Resources

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.

QQuentin Megevand
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.

Claude AI Lab

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 →
⚠️How to read this reference
1
Everything here was verified on version 2.1.220. On an older build, some of the newer commands may be missing.
2
CLI flags go in your terminal, before you start the session. Slash commands go inside the session.
3
When in doubt, /help lists what your build actually knows. That is your source of truth, including over this page.
1

Run your session

⌨️ inside the 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
The habit that changes everything

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.

2

Configure Claude

⚙️ inside the session

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
  • /login and /logout : handle authentication

The five effort levels

  • low : simple mechanical tasks, fast and cheap
  • medium : the balanced default
  • high : complex multi-step work
  • xhigh : one step above high, for genuinely heavy tasks
  • max : the hardest problems, at the cost of time and tokens
Worth knowing

These five values are the only ones accepted. There is no auto level : passing anything outside the list makes the command fail.

3

Automate

🤖 inside the session

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-control and 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
The underrated combo

/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.

4

Work on code

🔍 inside the session
  • /init : generates a CLAUDE.md from your codebase
  • /memory : edits your CLAUDE.md files
  • /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
Do not mix these two up

/simplify is about quality, not bug hunting. It does not look for defects, it cleans up. To chase a bug, use /review.

5

Shortcuts

⌨️ keyboard

General controls

  • Ctrl+C : cancels the current input or generation
  • Ctrl+D : exits the session, on an empty prompt
  • Ctrl+L : redraws the screen
  • Ctrl+O : toggles verbose mode and shows the transcript
  • Ctrl+R : reverse search through history
  • Ctrl+G : opens the prompt in your editor
  • Ctrl+B : sends the running task to the background
  • Ctrl+T : shows or hides the task list
  • Ctrl+V : pastes an image or a large block of content
  • Ctrl+E : in transcript mode, expands everything
  • Ctrl+X : chord prefix, followed by a second key

Modes and toggles

  • Shift+Tab : cycles permission modes, from normal to auto-accept to plan mode
  • Alt+P : switches model
  • Alt+O : toggles fast mode

Line editing

  • Ctrl+A and Ctrl+E : start and end of line
  • Ctrl+U : deletes the line
  • Ctrl+K : deletes to end of line
  • Ctrl+J or Shift+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
The highest-return shortcut

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.

6

The command line

💻 terminal

Starting and resuming

  • claude : starts an interactive session
  • claude "your question" : starts with an initial prompt
  • claude -p "your question" : non-interactive mode, ideal in scripts
  • claude -c : continues the most recent conversation in this directory
  • claude -r "name" : resumes a session by name, or opens the picker
  • cat file | claude -p : pipes a file in as input

Subcommands

  • claude update : updates Claude Code
  • claude doctor : checks installation health
  • claude agents : manages background agents
  • claude mcp : configures MCP servers
  • claude plugin : manages plugins
  • claude project : manages project state
  • claude auth : manages authentication
  • claude setup-token : creates a long-lived token
  • claude 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
  • --agent and --agents : selects an agent, or defines agents inline as JSON
  • --allowed-tools and --disallowed-tools : pre-approves or blocks tools
  • --tools : restricts the available tool set
  • --output-format : text, json or stream-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
The pair worth remembering

--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.

7

Configuration

📁 files and variables

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/*.md and ~/.claude/rules/*.md : rules loaded by context
  • paths: in frontmatter : scopes a rule to specific paths
  • @path/to/file : imports another file into your CLAUDE.md

Automatic memory

  • ~/.claude/projects/<project>/memory/ : a MEMORY.md index plus topic files, loaded every session
  • The project CLAUDE.md survives compaction, unlike the rest of the conversation

Skills and agents

  • .claude/skills/<name>/ : project skills
  • ~/.claude/skills/<name>/ : your personal skills
  • Skill frontmatter : description for automatic triggering, allowed-tools, model, effort, paths, argument-hint, disable-model-invocation, and $ARGUMENTS as the input placeholder
  • Agent frontmatter : permissionMode, isolation: worktree, maxTurns, initialPrompt, background
  • Built-in agents : Explore for read-only searching, Plan for design work, general-purpose for everything else

MCP

  • Three scopes when adding a server, via --scope : local, project or user
  • Three transports, via --transport : http, sse or stdio
  • Example : claude mcp add --transport http my-server https://example.com/mcp

Environment variables

  • ANTHROPIC_API_KEY : your API key
  • ANTHROPIC_MODEL : forces the default model
  • ANTHROPIC_BASE_URL : routes through a proxy or gateway
  • CLAUDE_CODE_EFFORT_LEVEL : default effort level
  • MAX_THINKING_TOKENS : caps reasoning, 0 turns it off
  • CLAUDE_CODE_MAX_OUTPUT_TOKENS : caps output length
  • BASH_MAX_OUTPUT_LENGTH : truncates oversized bash output
  • API_TIMEOUT_MS and CLAUDE_STREAM_IDLE_TIMEOUT_MS : timeouts and the streaming watchdog
  • CLAUDE_CODE_DISABLE_CRON : disables scheduled tasks
  • MCP_CONNECTION_NONBLOCKING : does not wait on MCP servers at startup
  • CLAUDE_CODE_SUBPROCESS_ENV_SCRUB : strips credentials from subprocesses
  • CLAUDECODE : set to 1 inside a shell launched by Claude Code, handy for detecting it in a script
The billing trap

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.

  1. /init to create your CLAUDE.md, because everything else builds on it
  2. Shift+Tab to switch to plan mode before risky changes
  3. /context to see what is filling your window before you compact
  4. /cost at the end of a long session, to understand where your tokens went
  5. --max-budget-usd on 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?

And day-to-day, I post one reel a day on Instagram: @quentin_iamarketing