48  48. Essential Slash Commands

Inside a Claude Code session, a message that starts with / is a command: it controls Claude Code itself (switch models, check your usage, clear the conversation…) instead of being sent to Claude as a request. This page covers the commands you will use most, grouped by job.

48.1 What commands are

As of Oct 6, 2026 · Official docs: Commands · Interactive mode

  • Type / at the start of the prompt and a menu of commands opens. Keep typing to filter it (/us finds /usage), then press Enter.
  • A command is only recognized at the start of your message. Text after the command name is passed to it as arguments, as in /compact focus on the CSS changes.
  • Most commands are built in: their behavior is coded into Claude Code. Some are bundled skills: ready-made instructions handed to Claude, which then does the work with its tools (for example /code-review and /loop). Skills you write or install also appear in the menu, as /skill-name (see Skills).
  • If you send a command while Claude is working, it usually waits until Claude finishes. A few, such as /status, /usage, /model, and /effort, take effect right away.
  • Not every command appears for everyone: some depend on your operating system, plan, or setup.

The official docs now simply say “commands”; older tutorials call them “slash commands” or “custom commands”.

48.2 Help and status

As of Oct 6, 2026 · Official docs: Commands · Manage costs effectively

Command What it does
/help Shows help and the available commands
/powerup Short interactive lessons with animated demos; a good place to start
/status Shows your Claude Code version, model, account, and connection
/usage Shows session cost, plan usage limits, and activity statistics (/cost and /stats are other names for it)
/context Draws a colored grid of what is filling the context window
/doctor Runs a setup checkup that finds installation and configuration problems; it asks before changing anything
/release-notes Shows the changelog, version by version
/feedback Sends a bug report or idea to Anthropic

/usage deserves a closer look, because Claude Code can use up a plan’s limits quickly:

  • On a Pro, Max, Team, or Enterprise plan it shows usage bars (how close you are to your plan’s limits) and a breakdown of what counted against them, such as skills, subagents, plugins, and MCP servers. Press d or w to switch the breakdown between the last day and the last week. The breakdown is approximate and only covers this computer.
  • Its Session block shows a dollar “Total cost”. That is an estimate at list prices, meant for people paying per use through a Console (API) account. On a subscription, that usage is included in your plan.

How limits work is explained in Claude Models, Plans, and Usage Limits; ways to use fewer tokens are in Context, Models, Effort, and Usage.

48.3 Model and effort

As of Oct 16, 2026 · Official docs: Commands · Model configuration

Command What it does
/model Opens a list of models to pick from; /model sonnet switches directly
/effort Sets how much the model reasons: low, medium, high, xhigh, max, or auto
/fast Turns fast mode on or off
  • /model accepts short names (aliases) such as opus, sonnet, haiku, and fable, which point to the recommended current version of that model family and are updated over time. Your choice is saved as the default for new sessions. To switch for this session only, open the list with /model and press s on a model’s row. In the list, the left and right arrow keys also adjust the effort.
  • /effort with no argument opens a slider; /effort high sets a level directly; /effort status prints the current level; /effort auto goes back to the model’s default. Higher effort means deeper reasoning, but more tokens and slower answers. Which levels exist depends on the model (the current default on Opus 5.5, Sonnet 5.5, and Haiku 5.5 is medium). max lasts only for the current session.

The session header shows the current model and, for models that support effort (some older models, such as Haiku 4.5, don’t), its effort level. Choosing well is covered in Context, Models, Effort, and Usage.

48.4 Managing the conversation

As of Oct 6, 2026 · Official docs: Commands · Manage sessions

Command What it does
/clear Starts a new, empty conversation; the old one can still be resumed (also /new, /reset)
/compact Summarizes the conversation so far to free up space; add instructions to say what to keep
/rewind Rolls code and/or conversation back to an earlier point (same as Esc Esc)
/resume Switches to an earlier session
/rename Names the current session
/btw Asks a quick side question; the question and answer don’t enter the conversation
! (not a slash command) Typed at the start of a message, e.g. ! git status: runs the command yourself in your shell (shell mode), and its output is added to the conversation (Your First Claude Code Session)
/plan Switches to plan mode: Claude investigates and proposes a plan without editing
/diff Shows the changes in your working tree, file by file
/copy Copies Claude’s last response to the clipboard
/export Saves the conversation as a plain-text file
/exit Leaves Claude Code

A good habit: /clear when you switch to an unrelated task, /compact when a long task has filled the context.

48.5 Setup and settings

As of Oct 6, 2026 · Official docs: Commands

Command What it does
/init Writes a starter CLAUDE.md for the project (CLAUDE.md and Memory)
/memory Edits your CLAUDE.md files and manages auto memory
/config Opens the settings screen (theme, model, and more); also /settings
/permissions Shows and edits your allow, ask, and deny rules (Permissions, Modes, and Safety)
/add-dir Lets Claude work with files in one more folder during this session
/login, /logout Signs in or out
/theme Changes the color theme
/terminal-setup Sets up a new-line key in some terminals (for example Option+Enter in Apple’s Terminal)
/statusline Sets up the status line at the bottom of the screen: describe in plain words what to show, e.g. /statusline show the model and the percentage of context used, and Claude Code writes the script for you
/sandbox Turns the command sandbox on or off (macOS, Linux, and WSL2 only)

48.6 Extending Claude Code

As of Oct 6, 2026 · Official docs: Commands · Extend Claude with skills · Connect Claude Code to tools via MCP

Command What it does
/skills Lists the available skills
/mcp Manages MCP server connections and logins
/hooks Shows your hook settings
/plugin Browses, installs, enables, and disables plugins
/agents Reminds you that you create subagents by asking Claude (or by editing .claude/agents/)
  • /skills lists the bundled skills, your own skills, and skills from plugins. Type to filter the list, press t to sort it by token cost (how much context each skill uses), and press Space or Enter on a skill to change whether Claude and the / menu can see it; Esc saves and closes.
  • /mcp lists your MCP servers and whether each one is connected. Select a server to log in to it when it needs authentication (a browser window opens). /mcp reconnect all retries servers that failed or still need a login.

What skills, MCP servers, hooks, subagents, and plugins are was introduced in How Claude Code Works; each has its own page in the Extending part, starting with Extending Claude Code: The Big Picture.

48.7 Review and automation

As of Oct 6, 2026 · Official docs: Commands

Command What it does
/code-review Bundled skill: reviews your current changes (or a pull request) for bugs; --fix applies the fixes (also /review)
/security-review Checks the changes on your branch for security vulnerabilities
/simplify Bundled skill: finds and applies cleanups, such as duplicated code; it does not hunt for bugs
/loop Bundled skill: repeats a prompt while the session is open, for example /loop 5m check if the deploy finished
/goal Keeps Claude working, turn after turn, until a condition you set is met
/schedule Creates routines: tasks that run in the cloud on a schedule
/tasks Lists background work in this session, such as running commands and subagents
/subtask <task> Starts a fork: a subagent that inherits your whole conversation instead of starting fresh (Subagents)
/fork Copies the whole session into a new background session (Subagents)

These are introduced in Working Effectively with Claude Code, Claude Code Beyond the Terminal, and Pull Requests and Code Review.

48.8 Finding more (and keeping up)

As of Oct 6, 2026 · Official docs: Commands

There are over a hundred commands, and the list changes often. To find one, type / plus a word (“/mod”, “/perm”), run /help, or read the Commands page in the docs. Some recent changes show why a 2025 tutorial may mislead you:

  • /review used to be its own command; it is now another name for /code-review.
  • /agents used to open an editor for subagents; now it only reminds you to ask Claude to create them.
  • /vim was removed; Vim-style editing is now under /config.

If a command from a tutorial gives Unknown command, it may have been removed or renamed, it may not be available on your operating system or plan, or it may come from a skill or plugin you haven’t installed. Check the docs and /release-notes, as described in Navigating the Claude Documentation.

Practice Questions

Easy

Question 1 · Short answer

What happens when you type / at the start of the Claude Code prompt?

A menu of the available commands and skills opens. Typing more letters filters the menu (for example /us shows /usage), and Enter runs the highlighted command.

Question 2 · Matching

Match each command with what it does.

Command What it does
1. /help A. Manage MCP server connections and logins
2. /usage B. Leave Claude Code
3. /model C. Show help and the available commands
4. /effort D. Start a new, empty conversation
5. /skills E. Show plan usage limits, cost, and activity
6. /mcp F. Set how much the model reasons
7. /clear G. List the available skills
8. /exit H. Switch the AI model

1 → C, 2 → E, 3 → H, 4 → F, 5 → G, 6 → A, 7 → D, 8 → B.

Question 3 · True or false

Typing please show me /usage runs the /usage command.

False. A command is only recognized at the start of a message. This message would be sent to Claude as an ordinary request. Type /usage by itself.

Question 4 · Multiple choice

What does /cost do?

  1. Shows the price list for all Claude models
  2. It is another name (alias) for /usage
  3. Buys extra usage credits
  4. Shows only the cost of the last message

b. /cost and /stats are aliases for /usage, which shows session cost, plan usage limits, and activity statistics. It is not a price list (a), does not buy anything (c), and covers more than one message (d).

Question 5 · Short answer

What is the difference between a built-in command and a bundled skill? Give one example of each.

A built-in command’s behavior is coded into Claude Code and runs directly, for example /clear or /model. A bundled skill is a ready-made set of instructions handed to Claude, which then does the work with its tools, for example /code-review, /simplify, or /loop.

Question 6 · Write the command

You want the bottom of Claude Code’s screen to always show how much of the context window you have used. What do you type?

/statusline show the percentage of context used (any plain description works). Claude Code writes a status line script and updates your settings. To remove it later: /statusline remove it.

Medium

Question 7 · Scenario

Maria wants to use Sonnet for the rest of this session only, without changing the model her future sessions start with. What should she do?

Type /model to open the list, move to the Sonnet row, and press s, which switches for this session only. Typing /model sonnet (or pressing Enter in the list) would also save Sonnet as her default for new sessions.

Question 8 · Write the command

Write the commands to (a) set the effort level to high, and (b) check which effort level is active.

  1. /effort high
  2. /effort status (the session header also shows the current effort next to the model name).

Question 9 · Scenario

Sam is on a Pro plan. Claude has been busy all afternoon and he wants to know how close he is to his usage limit, and what used the most. Which command should he run, and what should he look at?

/usage. He should look at the usage bars (how close he is to his plan’s limits) and the breakdown of what counted against them (skills, subagents, plugins, MCP servers), using d or w to switch between the last day and the last week.

Question 10 · Scenario

You added an MCP server, and Claude says the server needs authentication. Which command do you use to log in?

/mcp. It lists your servers and their status; select the server and follow the login steps (a browser window opens). /mcp reconnect all retries servers that failed or still need a login.

Question 11 · Write the command

Your conversation is long, and you want to free up space while making sure the summary keeps the details of the CSS changes. Write the command.

/compact focus on the CSS changes

The text after /compact tells Claude Code what the summary should concentrate on.

Question 12 · Scenario

In the middle of a long task you want to ask “what was the name of that config file again?” without adding the question to the conversation. Which command fits?

/btw what was the name of that config file again?

/btw answers from what is already in the conversation, and neither the question nor the answer is added to the history. (It can’t read files or run commands to answer.)

Question 13 · Scenario

You suspect some skills are using a lot of context. How can you find the most expensive ones and hide one from Claude?

Run /skills, press t to sort the list by token cost, then press Space or Enter on a skill to change whether Claude and the / menu can see it, and press Esc to save.

Question 14 · Ordering

You finished a feature and want to (1) check for bugs, (2) look at exactly what changed, (3) check for security problems before you push. Which commands would you use, in a sensible order?

First /diff to see exactly what changed, then /code-review to look for bugs (add --fix to apply the findings), then /security-review to check the branch’s changes for vulnerabilities. Review and fix the findings before you commit and push.

Hard

Question 15 · Compare

Compare /clear, /compact, and /rewind. When would you use each?

  • /clear starts a new, empty conversation (the old one stays resumable). Use it when you switch to an unrelated task.
  • /compact keeps the same conversation but replaces its history with a summary, to free up context space during a long task; you can tell it what to focus on.
  • /rewind goes back to an earlier point, restoring the code, the conversation, or both (or summarizing part of it). Use it when something went wrong after a certain message.

Question 16 · Scenario

A blog post from 2025 tells you to run /agents to open an editor for subagents and /vim to turn on Vim keys. Neither works as described. Explain why, and how you would find the current way.

Claude Code changes quickly. /agents no longer opens an editor; it only reminds you to ask Claude to create subagents (or to edit the .claude/agents/ folder). /vim was removed; Vim-style editing is now under /config (Editor mode). To find the current way, check the Commands page in the official docs, type / and a few letters to search the menu, run /help, and look at /release-notes for what changed.

Question 17 · Explain why

Sam runs /effort max for a hard problem. The next day, his new session is not at max. Why not, and how do levels get saved?

max applies only to the current session; Claude Code doesn’t save it as a default. Other levels (low through xhigh) are saved as your default when you type them after /effort or confirm them with Enter in the slider, and apply to that one session if you press s instead. /effort auto clears the saved level so the model’s own default applies.

Question 18 · Scenario

A classmate’s tutorial uses a command that gives you Unknown command. List three possible reasons.

Any three of: the command was removed or renamed in a newer version; it isn’t available on your operating system, plan, or setup (for example /desktop only exists on macOS and x64 Windows with a subscription); it comes from a skill or plugin your classmate installed and you didn’t; or there is a typo. Check the official Commands page and /release-notes.

Question 19 · Explain why

Maria is on a Pro subscription. /usage shows “Total cost: $4.10” for her session. Does she owe $4.10? Explain.

No. The Session block’s dollar figure is an estimate calculated at list prices, meant for people who pay per use through a Console (API) account. On a subscription, that usage is included in her plan. What matters for her is the plan usage bars, which show how close she is to her plan’s limits.

Question 20 · Long answer

Plan a working session on a new feature, naming at least five commands and saying when you would use each one.

A model answer:

  1. /init in a new project, to create a starter CLAUDE.md (then /memory to refine it).
  2. /plan add a contact form to have Claude investigate and propose a plan before editing.
  3. /model and /effort to pick a model and reasoning level that fit the task.
  4. /context when the conversation feels long, and /compact with focus instructions if the context is filling up.
  5. /diff to review the changes, /code-review to look for bugs.
  6. /usage to check how much of the plan’s limits the work used.
  7. /clear before starting the next, unrelated task.

A good answer explains why each command fits its moment.

Challenge

Question 21 · Hands-on

In a practice project, run /powerup and complete one lesson. Then run /status, /context, and /usage, and type / followed by three different letters to explore the menu. Write down three commands you hadn’t seen before and what the docs say each one does.

A good answer records the version, model, and account from /status, what the /context grid showed was using the most space (for example the system prompt and tool definitions), and the usage bars from /usage. It then names three unfamiliar commands (for example /recap, /copy, or /export) with a one-line description of each, checked against the Commands page in the docs rather than guessed from the name.

© 2025-2026 Y. Rosenthal. All rights reserved.