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
| Command | Arguments | Aliases | Role | When to type it |
|---|---|---|---|---|
/help | — | — | Shows help and the list of available commands | On 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 | — | /checkup | Diagnostic: installs, PATH, settings, unused skills/MCP, slow hooks, oversized CLAUDE.md | Strange behavior, monthly hygiene |
/release-notes | — | — | Changelog picker; renders in the transcript without polluting the context | After an update |
/powerup | — | — | Interactive lessons with animated demos | Onboarding |
/insights | — | — | HTML report on your recent sessions: projects, usage patterns, sticking points | Personal 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
| Command | Arguments | Aliases | Role | When to type it |
|---|---|---|---|---|
/clear | [name] | /reset, /new | New conversation with empty context; the name shows up in /resume | Between two unrelated tasks |
/resume | [session] | /continue | Resume a conversation by ID or name, or open the picker | Pick up the morning's thread |
/rename | [name] | — | Renames the session; auto-named without an argument | Pin a long-running session |
/branch | [name] | — | Creates a branch of the conversation here and switches to it; the original stays available via /resume | Explore 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 clipboard | Archive, send to a colleague |
/copy | [N] | — | Copies the Nth reply; code-block picker; w writes a file | Paste a patch into an external editor |
/recap | — | — | One-line summary on demand | Resuming after a break |
/rewind | — | /checkpoint, /undo | Rewinds code and/or conversation, or summarizes from a message | An edit broke the build |
/exit | — | /quit | Quits the CLI; detaches an attached background session without stopping it | End of day |
/stop | — | — | Stops the attached background session; transcript and worktree are kept | A /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
| Command | Arguments | Aliases | Role | When to type it |
|---|---|---|---|---|
/context | [all] | — | Context-occupation grid, saturation alerts, suggestions; all expands each item | Before a big task, or when Claude "forgets" |
/compact | [instructions] | — | Summarizes the conversation; optional directive to target what to keep | Long 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, /stats | Session cost, plan limits, statistics; /stats opens the Stats tab | End of task, end of day |
/usage-credits | — | — | Usage credits in the browser; sends a request to your admin on Team/Enterprise; formerly /extra-usage | When 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
| Command | Arguments | Aliases | Role | When to type it |
|---|---|---|---|---|
/config | [key=value ...] | /settings | Opens Settings, or applies a key (/config theme=dark, model=sonnet) since v2.1.181; /config --help lists keys | Change a preference without leaving the session |
/theme | — | — | Color theme: auto, light, dark, colorblind, ANSI, themes from ~/.claude/themes/ or a plugin | On install or for a colorblind theme |
/tui | [default|fullscreen] | — | Terminal renderer; fullscreen = full-screen without flicker | Wide screen, long session |
/focus | — | — | Focus view: prompt, one-line summary of tool calls, response; full-screen only | Screen share, quick review |
/color | [color|default] | — | Prompt-bar color: red, blue, green, yellow, purple, orange, pink, cyan; without an argument, random | Distinguish several parallel sessions |
/statusline | — | — | Configures the status line; auto-detected from the shell prompt | Once per machine |
/keybindings | — | — | Opens the keyboard-shortcut file | Customize Esc, Shift+Enter, etc. |
/scroll-speed | — | — | Wheel speed; full-screen only, not in the JetBrains terminal | Miscalibrated 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 iTerm2 | Once per terminal |
/voice | [hold|tap|off] | — | Voice dictation; requires a claude.ai account | Long spoken descriptions |
(e) Model and reasoning
| Command | Arguments | Aliases | Role | When 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 effort | Move 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-only | Bump 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 picker | Architectural 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
| Command | Arguments | Aliases | Role | When 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 agent | First 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 memory | Every 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 loaded | Monorepo, sibling repos next to each other |
/cd | <path> | — | Moves the session into another working directory without losing the conversation; autocomplete since v2.1.206 | Switch 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
| Command | Arguments | Aliases | Role | When to type it |
|---|---|---|---|---|
/permissions | — | /allowed-tools | Interactive dialog to manage allow/ask/deny rules per scope, working directories, recent refusals in auto mode, and auto-mode classifier rules | After 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.json | After 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
| Command | Arguments | Aliases | Role | When to type it |
|---|---|---|---|---|
/login | — | — | Sign in to your Anthropic account | First time, or after a /logout |
/logout | — | — | Sign out of your Anthropic account | Shared machine |
/privacy-settings | — | — | View and change your privacy settings; reserved for Pro and Max plans | Retention, telemetry |
/upgrade | — | — | Opens the upgrade page in the browser; hidden for Enterprise plans | End of Free plan, need Max |
/passes | — | — | Share a free week of Claude Code; visible only for eligible accounts | Recommend to a colleague |
/mobile | — | /ios, /android | QR code to install the Claude mobile app | Want to drive from a phone |
/desktop | — | /app | Continue the current session in the Desktop app; macOS and Windows x64 with a Claude subscription | Move 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:
/init— on the first launch in a repo./memory— as soon as you correct Claude twice in a row./modeland/effort— plan inopusplan, execute insonnet, set effort by difficulty./context— before every big task, to see the room you have left./compact <directive>— the directive makes all the difference./clear— new unrelated task, clean context./permissions— after a refusal, before a non-interactive run./statusand/doctor— one checks state, the other fixes it./rewind— the insurance policy that lets you dare a refactor./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 —
claudein the repo,/status(right account, Sonnet active). - 09:03 —
/resume kiosque-paiementsto pick up yesterday's work;/recapshows the auto summary. - 09:05 —
/context: 47% used, mostly bypaiements.py./compact keep the plan and the error analysis, drop the code snippets read. - 09:20 — new lead: refactor
notifications.pyin 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, approveEdit(tests/**). - 10:30 — a test fails for lack of allowlist.
/permissionsaddsBash(pytest -k *)as projectallow. - 11:15 — Lea drops in for review.
/focusfor 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 Escthen/rewindrestores 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:
/contextto see,/compact(with a directive) to free up,/autocompactto automate the threshold. - Session:
/branchswitches here,/forkcopies elsewhere,/subtaskdelegates to a subagent that reports back. - Cost:
/model,/effort,/fastare your three levers;/usagemeasures; changing model or effort invalidates the cache. - Memory:
/initthen/memoryare your two everyday commands;/add-dirextends,/cdmoves. - Permissions:
/permissions,/sandboxand/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.