Skip to main content

Module 4 — Built-in slash commands (1/2): session, context, configuration and model

The first three modules laid the foundations. This module and the next are the reference: every command, its arguments, its aliases, its role, when to type it. Module 5 covers review, parallelism, automation and integrations; here, eight families centered on the session — help, conversation, context, appearance, model, memory, permissions, account.

Command grammar​

A command is only recognized when it starts your message. What follows becomes its arguments. Since v2.1.199, skills are an exception: /skill-a /skill-b do XYZ loads each skill up front and passes the rest to each of them, up to six chained. In the tables, <arg> marks a required argument, [arg] an optional one.

A command typed while Claude is replying is queued; some run immediately — /status, /tasks, /usage — and in full-screen rendering (v2.1.234+), dialogs like /theme or /help open without waiting. /model, /effort, /permissions and /add-dir now take effect on the current turn after confirmation.

Three kinds of entries in the / menu: built-in commands coded into the CLI, bundled skills (Skill, a prompt handed to Claude) and bundled workflows (Workflow, several subagents in the background). Module 5 covers skills and workflows; here, built-ins only. Type / followed by a few letters to filter: highlighting ignores the separators :, _, - (/adddir highlights /add-dir, /new highlights /clear via its alias).

(a) Help and state​

CommandArgumentsAliasesRoleWhen to type it
/help——Shows help and the list of available commandsOn your first session, or when a name escapes you
/status——Opens the Settings UI on the Status tab (version, model, account, connectivity, session type)Check you are on the right model and the right account
/doctor—/checkupDiagnostic: installs, PATH, settings, unused skills/MCP, slow hooks, oversized CLAUDE.mdStrange behavior, monthly hygiene
/release-notes——Changelog picker; renders in the transcript without polluting the contextAfter an update
/powerup——Interactive lessons with animated demosOnboarding
/insights——HTML report on your recent sessions: projects, usage patterns, sticking pointsPersonal quarterly retro
/team-onboarding——Markdown onboarding guide built from the last 30 days; shareable link (Pro, Max, Team, Enterprise)New hire in the team

/doctor deserves a special mention: since v2.1.206, it slims down a committed CLAUDE.md by cutting what Claude can infer from the code and proposes to migrate the rest into skills or nested CLAUDE.md files. From a terminal, claude doctor (no slash, no session) prints a read-only diagnostic.

(b) Session and conversation​

CommandArgumentsAliasesRoleWhen to type it
/clear[name]/reset, /newNew conversation with empty context; the name shows up in /resumeBetween two unrelated tasks
/resume[session]/continueResume a conversation by ID or name, or open the pickerPick up the morning's thread
/rename[name]—Renames the session; auto-named without an argumentPin a long-running session
/branch[name]—Creates a branch of the conversation here and switches to it; the original stays available via /resumeExplore a tangent without losing the thread
/fork[prompt]—Copies the conversation into a background session and stays here; v2.1.212+Delegate a long task in parallel
/subtask<task>—Forked subagent that inherits the conversation; the result flows back here; v2.1.212+Side question that needs real work
/export[filename]—Exports the conversation as plain text; file or clipboardArchive, send to a colleague
/copy[N]—Copies the Nth reply; code-block picker; w writes a filePaste a patch into an external editor
/recap——One-line summary on demandResuming after a break
/rewind—/checkpoint, /undoRewinds code and/or conversation, or summarizes from a messageAn edit broke the build
/exit—/quitQuits the CLI; detaches an attached background session without stopping itEnd of day
/stop——Stops the attached background session; transcript and worktree are keptA /fork that no longer converges

Three useful nuances: /branch switches you here, /fork copies elsewhere, /subtask delegates to a subagent that reports back. /rewind checkpoints do not cover shell commands run or files outside the repo — see module 8.

(c) Context and cost​

CommandArgumentsAliasesRoleWhen to type it
/context[all]—Context-occupation grid, saturation alerts, suggestions; all expands each itemBefore a big task, or when Claude "forgets"
/compact[instructions]—Summarizes the conversation; optional directive to target what to keepLong sessions, before a new subtask
/autocompact[auto|<tokens>]—Auto-compaction threshold (500k, auto); saved in settings; v2.1.221+Multi-hour sessions
/btw[question]—Side question that does not pollute history; without an argument, last reply (v2.1.212+)"what was that env var again?"
/usage—/cost, /statsSession cost, plan limits, statistics; /stats opens the Stats tabEnd of task, end of day
/usage-credits——Usage credits in the browser; sends a request to your admin on Team/Enterprise; formerly /extra-usageWhen the plan is saturated

/compact takes a directive: /compact keep only the payments plan and drop the explorations is infinitely more useful than a blind compact. What survives every compaction: CLAUDE.md, rules without paths: and the active skill — Claude re-reads them from disk on the next turn.

(d) Configuration and appearance​

CommandArgumentsAliasesRoleWhen to type it
/config[key=value ...]/settingsOpens Settings, or applies a key (/config theme=dark, model=sonnet) since v2.1.181; /config --help lists keysChange a preference without leaving the session
/theme——Color theme: auto, light, dark, colorblind, ANSI, themes from ~/.claude/themes/ or a pluginOn install or for a colorblind theme
/tui[default|fullscreen]—Terminal renderer; fullscreen = full-screen without flickerWide screen, long session
/focus——Focus view: prompt, one-line summary of tool calls, response; full-screen onlyScreen share, quick review
/color[color|default]—Prompt-bar color: red, blue, green, yellow, purple, orange, pink, cyan; without an argument, randomDistinguish several parallel sessions
/statusline——Configures the status line; auto-detected from the shell promptOnce per machine
/keybindings——Opens the keyboard-shortcut fileCustomize Esc, Shift+Enter, etc.
/scroll-speed——Wheel speed; full-screen only, not in the JetBrains terminalMiscalibrated mouse
/terminal-setup——Shift+Enter for VS Code, Cursor, Devin Desktop, Alacritty, Zed; Option+Enter and silenced bell on Apple Terminal; clipboard for /copy on iTerm2Once per terminal
/voice[hold|tap|off]—Voice dictation; requires a claude.ai accountLong spoken descriptions

(e) Model and reasoning​

CommandArgumentsAliasesRoleWhen to type it
/model[model]—Change model and save as default; without an argument, opens a picker; s switches for the session only; left/right arrows adjust effortMove from opusplan to sonnet before execution
/effort[level|auto|status]—Sets the effort: low, medium, high, xhigh, max, ultracode, auto; status displays it; max and ultracode are session-onlyBump to high for a tough debug
/fast[on|off]—Toggles fast mode; applies without waiting for the end of turn since v2.1.242; requires v2.1.205+Small repetitive tasks with low latency
/advisor[model|off]—Enables an advisor model consulted at key moments (fable, opus, sonnet, or a full ID); without an argument, opens a pickerArchitectural decisions, plan reviews

A model or effort change invalidates the prompt cache; Claude Code prints the warning before applying. A good habit: plan in opusplan, execute in sonnet, set the effort once for the whole session.

(f) Memory and project​

CommandArgumentsAliasesRoleWhen to type it
/init——Generates a starter CLAUDE.md; CLAUDE_CODE_NEW_INIT=1 triggers an interactive flow that also covers skills, hooks, personal memory and imports an existing config from another agentFirst session in a repo
/memory——Edits CLAUDE.md and CLAUDE.local.md at every scope, including those that do not exist yet; toggle and audit of automatic memoryEvery time you correct Claude twice
/add-dir<path>—Adds a working directory for the current session; autocomplete suggests paths; .claude/ configurations from the added folder are not loadedMonorepo, sibling repos next to each other
/cd<path>—Moves the session into another working directory without losing the conversation; autocomplete since v2.1.206Switch subproject without restarting

/add-dir and /cd do not serve the same purpose: /add-dir extends the accessible surface without changing the root; /cd moves the root and reloads the new folder's CLAUDE.md.

(g) Permissions​

CommandArgumentsAliasesRoleWhen to type it
/permissions—/allowed-toolsInteractive dialog to manage allow/ask/deny rules per scope, working directories, recent refusals in auto mode, and auto-mode classifier rulesAfter a refusal that gets in the way, before a headless run
/sandbox——Toggles sandbox mode (supported platforms only)Run untrusted code, brand-new project
/fewer-permission-prompts——Bundled skill: scans your transcripts for common read-only Bash and MCP calls, then adds a prioritized allowlist to the project's .claude/settings.jsonAfter a week of repeated "ask" prompts

Module 7 walks through rule patterns (Bash(...), Edit(...), WebFetch(domain:...), mcp__server__tool), the default, acceptEdits, plan, auto, dontAsk, bypassPermissions modes, and the precedence of settings files.

(h) Account​

CommandArgumentsAliasesRoleWhen to type it
/login——Sign in to your Anthropic accountFirst time, or after a /logout
/logout——Sign out of your Anthropic accountShared machine
/privacy-settings——View and change your privacy settings; reserved for Pro and Max plansRetention, telemetry
/upgrade——Opens the upgrade page in the browser; hidden for Enterprise plansEnd of Free plan, need Max
/passes——Share a free week of Claude Code; visible only for eligible accountsRecommend to a colleague
/mobile—/ios, /androidQR code to install the Claude mobile appWant to drive from a phone
/desktop—/appContinue the current session in the Desktop app; macOS and Windows x64 with a Claude subscriptionMove from terminal to desktop window

The ten commands to know by heart​

Over hundreds of hours of Claude Code, ten commands come back on loop. Knowing them by heart saves half a day per week:

  1. /init — on the first launch in a repo.
  2. /memory — as soon as you correct Claude twice in a row.
  3. /model and /effort — plan in opusplan, execute in sonnet, set effort by difficulty.
  4. /context — before every big task, to see the room you have left.
  5. /compact <directive> — the directive makes all the difference.
  6. /clear — new unrelated task, clean context.
  7. /permissions — after a refusal, before a non-interactive run.
  8. /status and /doctor — one checks state, the other fixes it.
  9. /rewind — the insurance policy that lets you dare a refactor.
  10. /usage — end of session; you learn fast what costs what.

Running example: a Kiosque day told through commands​

A typical day of the learner on Kiosque, written only in commands typed:

  • 09:02 — claude in the repo, /status (right account, Sonnet active).
  • 09:03 — /resume kiosque-paiements to pick up yesterday's work; /recap shows the auto summary.
  • 09:05 — /context: 47% used, mostly by paiements.py. /compact keep the plan and the error analysis, drop the code snippets read.
  • 09:20 — new lead: refactor notifications.py in TDD. /branch notifications-tdd.
  • 09:22 — /model opusplan, /effort high; Claude proposes a plan.
  • 09:45 — approved, switch to execution: /model sonnet, /effort medium. Refuse .env, approve Edit(tests/**).
  • 10:30 — a test fails for lack of allowlist. /permissions adds Bash(pytest -k *) as project allow.
  • 11:15 — Lea drops in for review. /focus for the screen share.
  • 12:40 — /btw how do I regenerate the test Stripe key? — the answer stays out of history.
  • 14:10 — wrong lead. Esc Esc then /rewind restores three messages earlier.
  • 16:30 — /subtask run make lint on app/ and bring back the top 20 warnings — a subagent runs while notes are being written.
  • 17:20 — overnight run: /fork chain the Alembic migrations and restart the API.
  • 17:45 — /usage (37,000 cache-read tokens, 4,200 write, cost under threshold), /rename kiosque-notifications-tdd, /export notes/2026-09-09.md, /exit.

Summary​

  • Grammar: command at the start of the message, arguments after; up to six chainable skills; some commands run immediately, others wait for the end of turn.
  • Three kinds of entries in the / menu: built-ins, bundled skills (Skill), bundled workflows (Workflow).
  • Context: /context to see, /compact (with a directive) to free up, /autocompact to automate the threshold.
  • Session: /branch switches here, /fork copies elsewhere, /subtask delegates to a subagent that reports back.
  • Cost: /model, /effort, /fast are your three levers; /usage measures; changing model or effort invalidates the cache.
  • Memory: /init then /memory are your two everyday commands; /add-dir extends, /cd moves.
  • Permissions: /permissions, /sandbox and /fewer-permission-prompts; patterns and modes are covered in module 7.
  • Ten commands to know by heart cover 90% of sessions.

Next module: Built-in slash commands (2/2): quality, parallelism, automation and integrations — /diff, /code-review, /security-review, /tasks, /batch, /loop, /schedule, /mcp, /plugin and the IDE, web, Chrome integrations.