Slash Commands
A slash command is a word that starts with /. You type it in the prompt to do one thing, such as clearing the session or switching the model.
Type / to see the list.
Some commands open a panel. Others print a result or expand into a prompt for Claude.
Many commands are hidden unless your account, provider, or settings allow them.
You cannot change built-in commands, but you can add your own with skills. Some commands have an env var or setting. The Notes column names it. Some also work in -p and the SDK.
Exampleโ
/model opus
/compact keep the database schema decisions
/effort high
Each line is a separate command. The text after the name is the argument.
How to Read the Tablesโ
- A panel command opens an interactive screen. The program calls it
local-jsx. - A text command returns text from fixed code. The program calls it
local. - A prompt command expands into a model prompt. The program calls it
prompt. - Many commands have two forms: a panel for interactive sessions and a text form for
-pand the SDK. - A
Gatedbadge means a flag, policy, plan, provider, or env var must allow the command. - The program holds about 101 command names, and it also makes
/mcp__<server>__<prompt>commands from MCP prompts.
Session and Conversation Commandsโ
| Command | Status | What it does | Notes |
|---|---|---|---|
/ <path> | Documented | Adds a working folder. | Panel. Runs at once when you give a path. Loads ., ., and . of that folder. A text form runs for some SDK entry points. |
/ <path> | Documented | Moves this session to a new working folder. | Panel. The new folder adds its project skills (2.1.246 or later). |
/ (aliases /, /) [name] | Documented | Starts a new session with empty context. | The old session stays on disk. / opens it. Works non-interactive too. |
/ <optional custom summarization instructions> | Documented | Summarizes the conversation to free context. | Turned off when env var DISABLE_ is truthy. See Context and Compaction. |
/ [auto|<tokens>] | Documented | Sets how full the context gets before it auto-summarizes. | Panel in interactive mode. A text form, "Configure the auto-compact window size", runs non-interactive or in a remote workspace. |
/ | Documented | Shows current context use. | Found only as a text command, enabled in non-interactive mode. |
/ (alias /) [conversation id or search term] | Documented | Resumes a past conversation. | Panel. Hidden for a remote viewer. See Sessions and Storage. |
/ (alias /) [name] | Documented | Renames the conversation. | Panel and text form. |
/ [name] | Documented | Branches the conversation at this point. | Panel. |
/ <directive> or [prompt] | Documented | Starts a background agent that inherits the full conversation. | Panel. Off in coordinator mode. |
/ <task> | Documented | Sends a subagent off with your full context. Its result comes back here. | Panel. Off in coordinator mode. |
/ (alias /) [prompt] | Documented | Sends this session to the background and frees the terminal. | Panel. Runs at once with no prompt. Matches the -- flag. |
/ | Gated | Stops this background session. | The transcript and worktree are kept. |
/ [<condition> | clear] | Documented | Sets a goal that Claude checks before it stops. | Panel. A text form ("keep working until the condition is met") runs non-interactive or in a remote workspace. |
/ [open|<description>] | Documented | Turns on plan mode, or shows the session plan. | Panel. |
/ | Documented | Writes a one-line session recap now. | Text command. |
/ [question] | Documented | Asks a quick side question without interrupting the main conversation. | Panel. |
/ [filename] | Documented | Exports the conversation to a file or the clipboard. | Panel. |
/ [N] | Documented | Copies the last reply to the clipboard. / copies the Nth latest. | Panel. |
/ (alias /) | Documented | Exits the CLI. In a background session it detaches and the session keeps running. | Panel and text form. |
/ (alias /) | Gated | Restarts Claude Code on the newly installed version and resumes this session. | Interactive only. See How / Works. |
/ (aliases /, /) | Documented | Restores the code, the conversation, or both to an earlier point. | Interactive only. |
/ (alias /) | Documented | Shows and manages everything that runs in the background. | Panel. |
/ (alias /) | Documented | Lists subagents, teammates, and other sessions you can message. | Off when the org setting messaging is set. |
/ [on|off] | Documented | Toggles focus view: only your prompt, a summary, and the reply. | Needs the fullscreen renderer (/ or CLAUDE_). The setting view does the same. |
/ | Documented | Shows uncommitted changes and per-turn diffs. | Panel. Off when a mod provides its own diff view. |
/ <model> or [model] | Documented | Sets the model. | Panel and text form. See Models. |
/ [levels] or <levels> | Documented | Sets the effort level. | Panel and text form. Since 2., / no longer shows a guessed level when CLAUDE_ is auto or unset. |
/ [on|off] | Gated | Toggles fast mode. | Panel and text form. |
๐งชย / [model|off] | Gated | Lets Claude consult a stronger model at key moments. | Panel and text form. See CLAUDE_. |
Setup, Interface, and Config Commandsโ
| Command | Status | What it does | Notes |
|---|---|---|---|
/ (alias /) key=value | Documented | Sets a setting by key. | The text form works in non-interactive mode only. |
/ | Documented | Edits CLAUDE. files and memory settings. | Panel. |
/ (alias /) | Documented | Manages allow and deny rules. | Panel. |
/ | Documented | Shows your hook configuration. | Panel. Needs no workspace. See Hooks. |
/ [reconnect|enable|disable [<server>|all]] | Documented | Manages MCP servers. | Panel and text form. |
/ (aliases /, /) [subcommand] | Documented | Manages plugins. | Panel with argument completion. |
/ [-- | Documented | Activates pending plugin changes in the current session. | Runs non-interactive too (2.1.260 or later). |
/ | Documented | Picks up skills added or changed on disk during this session. | Works in both modes. |
/ | Documented | Lists available skills. Space cycles the skill state and Esc saves it. | Panel. |
/ | Documented | Shows which loaded skills are unused and cost context. | Panel (opens the / Stats tab) and a text form. Needs feature-flag fetching. |
/ [style] | Documented | Lists output styles or switches to one. | Text command. |
/ | Documented | Changes the theme. | Panel. |
/ [default|fullscreen] | Documented | Sets the terminal UI renderer. | A change restarts and resumes the session. |
/ [color|default] | Documented | Sets the prompt bar color for this session. | Panel and text form. |
/ | Gated | Toggles brief-only mode. | Panel. |
/ | Documented | Adjusts mouse wheel scroll speed. | Needs the fullscreen renderer. Off in some terminals, including JetBrains. |
/ | Documented | Installs the Shift+Enter key binding. | The text changes with the terminal. |
/ | Documented | Opens your keyboard shortcuts file. | Interactive only. Needs keybinding customization on. |
/ [open] | Documented | Manages IDE integrations and shows status. | Panel. |
/ | Documented | Creates a CLAUDE. file with codebase notes. | A prompt command. With env var CLAUDE_ it also sets up skills and hooks. Claude can call it through the Skill tool. |
/ [-- | Gated | Teaches auto mode about your environment, with optional rule changes. It reads your project and recent sessions. | Panel. The text form is non-interactive. Since 2. it is also on Bedrock, Vertex, Foundry, a Claude apps gateway, and with telemetry off. skill turns it off (the program). |
/ [codex|gemini|cursor] [-- | Gated | Imports config from another AI coding agent. | Panel and text form. |
/ | Documented | Shows help and the command list. | Panel. Terminal only. |
/ | Documented | Shows version, model, account, API connectivity, and tool status. | Panel. Lists skills whose allowed- were ignored. |
/ (aliases /, /) | Documented | Shows session cost, plan use, and activity stats. | Panel and text form. Since 2. it says when a rate limit ends. |
/ | Documented | Shows release notes. | Panel. |
/ | Documented | Sets up the status line. | A prompt command. Not in safe mode. Interactive only. |
/ exclude "command pattern" (Windows also install) | Gated | Shows sandbox state and opens its settings. | Panel. |
/ | Gated | Opens Claude in Chrome settings. | Panel. |
/ | Gated | Makes a report that analyzes your sessions. | A prompt command. |
/ | Gated | Views and updates privacy settings. | Panel. |
/ | Documented | Signs in, or switches accounts. | Off when env var DISABLE_ is set. |
/ | Documented | Signs out. | Off when env var DISABLE_ is set. |
/ [options] | Documented | Installs the native build. | Takes -- and a target. Interactive only. |
Account, Cloud, and Other Commandsโ
| Command | Status | What it does | Notes |
|---|---|---|---|
/ | Gated | Sets up usage credits, or asks your admin for them at a limit. | Panel and text form. |
/ | Gated | Upgrades to Max for higher rate limits. | Panel. |
/ | Undocumented | Options shown when the Pro plan trial ends. | Hidden. The UI shows it. You do not type it. |
/ | Gated | Manages usage limits and upgrade options. | Panel. |
/ | Gated | Shares a free week of Claude Code with friends. | Panel. |
/ [report] | Gated | Sends feedback or reports a bug. | Panel. |
/ (alias /) [report] | Gated | Reports a bug or shares your conversation. | Panel. |
/ | Gated | Sets up GitHub Actions for a repository. | Panel. |
/ | Gated | Installs the Slack app. | Text command. |
/ | Gated | Reconfigures Amazon Bedrock sign-in, region, or model pins. | Panel. See Models and Providers. |
/ | Gated | Reconfigures Google Vertex AI sign-in, project, region, or model pins. | Panel. |
/ | Gated | Sets up cloud sessions with your GitHub account. | Panel. |
/ | Gated | Chooses whether cloud sessions use the plugins enabled on this machine. | Panel. |
/ | Gated | Chooses the default environment for cloud agents. | Panel. |
/ (alias /) | Gated | Sends this session to the cloud, or resumes one from claude.ai. | Panel. |
/ (alias /) | Gated | Shows the cloud session URL and a QR code. | Panel. |
/ (alias /) | Gated | Continues the session in Claude Desktop. | Panel. |
/ (aliases /, /) | Documented | Shows a QR code to download the mobile app. | Panel. |
/ (alias /) [name] | Gated | Controls this session from your phone or claude.ai/code. | Panel. |
/ <prompt> | Gated | Drafts an editable plan in a cloud session. | Panel. |
/ | Gated | Runs a cloud code review. | Panel and text form. |
/ | Gated | Watches the current pull request and fixes issues. | Panel. |
/ | Undocumented | Manages background services and routines. | Panel. |
/ | Gated | Browses running and finished workflows. | Panel. |
/ | Gated | Browses your published and shared artifacts. | Panel. Since 2. the delete confirmation is numbered: 1 or Enter keeps, 2 deletes. y, n, and Esc still work. |
/, / | Gated | Grants or revokes agent access to your Design projects. | Hidden text commands. |
/ | Gated | Authorizes design-system access for /. | Panel. |
/ [hold|tap|off] | Gated | Toggles voice mode. | Text command. |
/ | Documented | Teaches features through short interactive lessons. | Panel. |
/ | Documented | Orders stickers. | Text command. |
/ | Documented | Plays a lo-fi radio station. | Text command. |
/ | Gated | Builds a guide that helps teammates learn Claude Code from your usage. | A prompt command. |
/ | Gated | Writes the JavaScript heap to your Desktop (home folder on Linux without a Desktop). | Hidden text command. |
/ prompt arguments | Documented | MCP prompts become commands. Missing required arguments give "Missing required argument". | Made on the fly with source:. The alias form is <server>:. |
How It Worksโ
Each command is an object with a kind: panel, text, or prompt.
A command can have two objects, one for interactive use and a text one for non-interactive use. The second one is picked when the session is not interactive.
Aliases come from an aliases list on the object.
A skill or custom command with the same name replaces a built-in command, but not its aliases (see Skills and Commands).
How /restart Worksโ
/restart restarts Claude Code on the installed version and resumes the same session. It keeps the model, the permission mode, extra working directories, and the Remote Control state. After the restart, it adds a "Successfully updated from A to B" message.
It only shows when all of these are true:
- You are in an interactive terminal (not
-p). - You run macOS or Linux.
- You use the native install (the binary is under
~/.local/share/claude/versions/, or$XDG_DATA_HOME/claude/versions/; a package-manager global install does not count). - You are not in a teammate agent or a remote session, and slash commands are not disabled.
- A server-side feature flag is on for you. Some users never see it.
After an auto-update installs a new version, the prompt area shows a green notice: "Update installed ยท /restart to apply". When the conditions above are not met, it says "Restart to update" instead.
/restart refuses in these cases:
- Background work is running or pending. It says "Can't restart while work is running in the background โ wait for it to finish (or stop it via /tasks), then try again." Running subagents and background shell commands count. Remote agents do not.
- Remote Control is connected, or the command came in over Remote Control.
- The session is not saved to disk.
- Claude tried to run it. You must type it at the prompt.
- The installed version is missing (it suggests
/doctor), or that version is on hold.
Background sessions use claude respawn <id> instead.
Related Pagesโ
- Skills and Commands: skills, which also give you slash commands.
- Bundled Skills: commands that are really skills.
- Hooks: the
UserPromptExpansionevent fires when a command expands. - Environment Variables: the
DISABLE_*_COMMANDvariables.
Source: Commands and the program (the command objects). /keybindings, /release-notes, /rewind, /chrome, /statusline, and /sandbox are missing from the program inventory file because of the key order in their objects. The program itself has them.