CONCEPT Type / to control the session
A slash command is an instruction to the Claude Code harness, not a message to
the model. You type / at the prompt and an autocomplete menu lists what is available. Most
built-ins execute fixed logic directly — they clear context, open a settings dialog, switch a
model — rather than asking Claude to do something. A handful of newer entries are
bundled skills (marked Skill in the reference): these are prompt-based, giving Claude
detailed instructions and letting it orchestrate with its tools.
/clear can wipe context and
/model can swap models — the model itself cannot do those things mid-turn.CONCEPT The commands worth memorizing
The catalogue is large and grows every release, but the exam-relevant core clusters around context, configuration, and session management.
| Command | What it does |
|---|---|
/help | Show help and the list of available commands. |
/clear | Start a new conversation with empty context. The old one stays available in /resume. Aliases: /reset, /new. |
/compact | Free up context by summarizing the conversation so far (same thread). Optional focus instructions. |
/config | Open Settings (theme, model, output style…). Alias /settings. Can set key=value directly. |
/permissions | Manage allow / ask / deny tool rules. Alias /allowed-tools. |
/model | Switch the model and save it as the default for new sessions. |
/agents | Reminder to create/manage subagents (edit .claude/agents/). |
/mcp | Manage MCP server connections and OAuth authentication. |
/init | Initialize the project with a CLAUDE.md guide. |
/memory | Edit CLAUDE.md memory files; manage auto-memory. |
/review | Bundled skill — fast read-only review of a GitHub PR by number. |
/cost | Show usage/cost — it is an alias for /usage. |
/resume | Resume a conversation by ID or name. Alias /continue. |
/context | Visualize current context usage as a colored grid. |
/add-dir | Add a working directory for file access this session. |
/doctor | Setup checkup that diagnoses (and can fix) install issues. |
/login · /logout | Sign in / out of your Anthropic account. |
/clear vs /compact is the classic mix-up. /clear
discards context and starts fresh; /compact keeps the thread but replaces history
with a summary. Use /compact mid-task, /clear between tasks.DIAGRAM Where a slash command is handled
/clear /model /config"] K -->|"bundled skill (prompt)"| S["🔵 Claude orchestrates
/review /doctor /code-review"] K -->|"custom (your .md)"| C["🟠 Prompt template
expands → sent to model"] classDef ok fill:#d4edda,stroke:#28a745,color:#155724; classDef sk fill:#cfe2ff,stroke:#0d6efd,color:#084298; classDef cust fill:#ffe8cc,stroke:#ff9f40,color:#9a4a0a; class H ok; class S sk; class C cust;
CODE A typical control flow at the prompt
Built-ins are typed straight into the Claude Code prompt (not the shell):
# Inspect and manage the session /help # list every available command /context # see what is eating the context window /compact focus on the API # summarize, keep the thread going # Switch what Claude can do /model # open the model picker, save as default /permissions # edit allow / ask / deny rules /mcp # manage MCP servers + OAuth # Between tasks: wipe context, then resume later if needed /clear # fresh conversation, old one kept in /resume /cost # alias for /usage
TRADE-OFFS /clear vs /compact
✅ /compact — summarize in place
- Keeps the same conversation and its intent
- Recovers context budget without losing the thread
- Accepts focus instructions to bias the summary
- Best during a long task
⚠️ /clear — start over
- Empties context entirely — a clean slate
- Old conversation still reachable via
/resume - Loses in-thread continuity (nothing carried forward)
- Best between unrelated tasks
EXAM TRAPS
/clear and /compact do the same thing." → No.
/clear discards context and opens a fresh conversation; /compact summarizes the
current thread to reclaim budget while continuing it./cost is its own separate command." → It is an alias for
/usage. Aliases are common: /settings=/config,
/allowed-tools=/permissions, /continue=/resume./agents opens an agent editor." → As of recent versions it just
prints a reminder to ask Claude to manage subagents or edit .claude/agents/ directly.PRACTICE
Q1 · You are deep in a task and context is nearly full but you want to keep going. Which command?
/compact — it summarizes the conversation so far to free context while
keeping the same thread. /clear would throw the task away and start fresh.
Q2 · What is the difference between a built-in command and a bundled skill?
A built-in runs fixed logic directly in the harness (e.g. /clear,
/model). A bundled skill is prompt-based: it hands Claude instructions and lets it
orchestrate with its tools (e.g. /review, /doctor, /code-review).
Q3 · Name the command that manages tool allow/ask/deny rules, and one alias for it.
/permissions; its alias is /allowed-tools. It opens an
interactive dialog to view and edit rules by scope.