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. 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. It also makes
/mcp__<server>__<prompt>commands from MCP prompts.
Session and Conversation Commands
| Command | Status | What it does | Notes |
|---|---|---|---|
/ <path> | Documented: An official docs page names this item. | 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: An official docs page names this item. | Moves this session to a new working folder. | Panel. The new folder adds its project skills (2.1.246 or later). |
/ (aliases /, /) [name] | Documented: An official docs page names this item. | Starts a new session with empty context. | The old session stays on disk. / opens it. Works non-interactive too. |
/ <optional custom summarization instructions> | Documented: An official docs page names this item. | Summarizes the conversation to free context. | Off when env var DISABLE_ is truthy. See Context and Compaction. |
/ [auto|<tokens>] | Documented: An official docs page names this item. | 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: An official docs page names this item. | Shows current context use. | Found only as a text command, enabled in non-interactive mode. |
/ (alias /) [conversation id or search term] | Documented: An official docs page names this item. | Resumes a past conversation. | Panel. Hidden for a remote viewer. See Sessions and Storage. |
/ (alias /) [name] | Documented: An official docs page names this item. | Renames the conversation. | Panel and text form. |
/ [name] | Documented: An official docs page names this item. | Branches the conversation at this point. | Panel. |
/ <directive> or [prompt] | Documented: An official docs page names this item. | Starts a background agent that inherits the full conversation. | Panel. Off in coordinator mode. |
/ <task> | Documented: An official docs page names this item. | Sends a subagent to work with your full context. Its result returns here. | Panel. Off in coordinator mode. |
/ (alias /) [prompt] | Documented: An official docs page names this item. | Sends this session to the background. Frees the terminal. | Panel. Runs at once with no prompt. Matches the -- flag. |
/ | Gated: Works only behind a flag or a server gate. The session must be a background session. | Stops this background session. | It keeps the transcript and worktree. |
/ [<condition> | clear] | Documented: An official docs page names this item. | 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: An official docs page names this item. | Enables plan mode, or shows the session plan. | Panel. |
/ | Documented: An official docs page names this item. | Writes a one-line session recap now. | Text command. |
/ [question] | Documented: An official docs page names this item. | Asks a quick side question without interrupting the main conversation. | Panel. |
/ [filename] | Documented: An official docs page names this item. | Exports the conversation to a file or the clipboard. | Panel. |
/ [N] | Documented: An official docs page names this item. | Copies the last reply to the clipboard. / copies the Nth latest. | Panel. |
/ (alias /) | Documented: An official docs page names this item. | Exits the CLI. In a background session, it detaches. The session keeps running. | Panel and text form. |
/ (alias /) | Gated: Works only behind a flag or a server gate. Interactive terminal on macOS or Linux, native install only, and a server-side feature flag. | Restarts Claude Code on the newly installed version. Resumes this session. | Interactive only. See How / Works. |
/ (aliases /, /) | Documented: An official docs page names this item. | Restores the code, the conversation, or both to an earlier point. | Interactive only. |
/ (alias /) | Documented: An official docs page names this item. | Shows and manages everything that runs in the background. | Panel. |
/ (alias /) | Documented: An official docs page names this item. | Lists subagents, teammates, and other sessions you can message. | Off when the org setting messaging is set. |
/ [on|off] | Documented: An official docs page names this item. | Toggles focus view: only your prompt, a summary, and the reply. | Needs the fullscreen renderer (/ or CLAUDE_). The setting view does the same. |
/ | Documented: An official docs page names this item. | Shows uncommitted changes and per-turn diffs. | Panel. Off when a mod provides its own diff view. |
/ <model> or [model] | Documented: An official docs page names this item. | Sets the model. | Panel and text form. See Models. |
/ [levels] or <levels> | Documented: An official docs page names this item. | 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: Works only behind a flag or a server gate. First-party provider, and env var CLAUDE_CODE_DISABLE_FAST_MODE not set. | Toggles fast mode. | Panel and text form. |
/ [model|off] | Gated: Works only behind a flag or a server gate. On when env CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL is set, otherwise server flag tengu_sage_compass2 Experimental: The program or the official docs call this experimental or beta. | 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: An official docs page names this item. | Sets a setting by key. | The text form works in non-interactive mode only. |
/ | Documented: An official docs page names this item. | Edits CLAUDE. files and memory settings. | Panel. |
/ (alias /) | Documented: An official docs page names this item. | Manages allow and deny rules. | Panel. |
/ | Documented: An official docs page names this item. | Shows your hook configuration. | Panel. Needs no workspace. See Hooks. |
/ [reconnect|enable|disable [<server>|all]] | Documented: An official docs page names this item. | Manages MCP servers. | Panel and text form. |
/ (aliases /, /) [subcommand] | Documented: An official docs page names this item. | Manages plugins. | Panel with argument completion. |
/ [-- | Documented: An official docs page names this item. | Activates pending plugin changes in the current session. | Runs non-interactive too (2.1.260 or later). |
/ | Documented: An official docs page names this item. | Loads skills added or changed on disk during this session. | Works in both modes. |
/ | Documented: An official docs page names this item. | Lists available skills. Space cycles the skill state and Esc saves it. | Panel. |
/ | Documented: An official docs page names this item. | Shows which loaded skills are unused and cost context. | Panel (opens the / Stats tab) and a text form. Needs feature-flag fetching. |
/ [style] | Documented: An official docs page names this item. | Lists output styles or switches to one. | Text command. |
/ | Documented: An official docs page names this item. | Changes the theme. | Panel. |
/ [default|fullscreen] | Documented: An official docs page names this item. | Sets the terminal UI renderer. | A change restarts and resumes the session. |
/ [color|default] | Documented: An official docs page names this item. | Sets the prompt bar color for this session. | Panel and text form. |
/ | Gated: Works only behind a flag or a server gate. Remote config flag enable_slash_command, and the account needs the Brief tool. | Toggles brief-only mode. | Panel. |
/ | Documented: An official docs page names this item. | Adjusts mouse wheel scroll speed. | Needs the fullscreen renderer. Off in some terminals, including JetBrains. |
/ | Documented: An official docs page names this item. | Installs the Shift+Enter key binding. | The text changes with the terminal. |
/ | Documented: An official docs page names this item. | Opens your keyboard shortcuts file. | Interactive only. Needs keybinding customization on. |
/ [open] | Documented: An official docs page names this item. | Manages IDE integrations and shows status. | Panel. |
/ | Documented: An official docs page names this item. | Creates a CLAUDE. file with codebase notes. | A prompt command. With env var CLAUDE_ it also configures skills and hooks. Claude can call it through the Skill tool. |
/ [-- | Gated: Works only behind a flag or a server gate. An environment-onboarding policy flag. | 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: Works only behind a flag or a server gate. Server flag tengu_import, off by default. You cannot enable it | Imports config from another AI coding agent. | Panel and text form. |
/ | Documented: An official docs page names this item. | Shows help and the command list. | Panel. Terminal only. |
/ | Documented: An official docs page names this item. | Shows version, model, account, API connectivity, and tool status. | Panel. Lists skills whose allowed- were ignored. |
/ (aliases /, /) | Documented: An official docs page names this item. | Shows session cost, plan use, and activity stats. | Panel and text form. Since 2. it says when a rate limit ends. CLAUDE_ shows the limit rows too. Since 2. each warning is a one-line fix that names its source, and f applies the fixes. The same fixes appear in VS Code and / (v2.1.305 release). See How / and / Work. |
/ | Documented: An official docs page names this item. | Shows release notes. | Panel. |
/ | Documented: An official docs page names this item. | Configures the status line. | A prompt command. Not in safe mode. Interactive only. |
/ exclude "command pattern" (Windows also install) | Gated: Works only behind a flag or a server gate. Hidden when the platform is not supported or not in the enabled list. | Shows sandbox state and opens its settings. | Panel. |
/ | Gated: Works only behind a flag or a server gate. Availability claude-ai, policy allow_claude_browser_extension, interactive only. | Opens Claude in Chrome settings. | Panel. |
/ | Gated: Works only behind a flag or a server gate. Policy allow_insights, and needs a workspace. | Makes a report that analyzes your sessions. | A prompt command. |
/ | Gated: Works only behind a flag or a server gate. A signed-in subscriber with an eligible plan. | Views and updates privacy settings. | Panel. |
/ | Documented: An official docs page names this item. | Signs in, or switches accounts. | Off when env var DISABLE_ is set. |
/ | Documented: An official docs page names this item. | Signs out. | Off when env var DISABLE_ is set. |
/ [options] | Documented: An official docs page names this item. | Installs the native build. | Takes -- and a target. Interactive only. |
Account, Cloud, and Other Commands
| Command | Status | What it does | Notes |
|---|---|---|---|
/ | Gated: Works only behind a flag or a server gate. Env var DISABLE_EXTRA_USAGE_COMMAND not set, and the account can use credits. | Configures usage credits, or asks your admin for them at a limit. | Panel and text form. |
/ | Gated: Works only behind a flag or a server gate. Availability claude-ai, env var DISABLE_UPGRADE_COMMAND not set, plan is not enterprise. | Upgrades to Max for higher rate limits. | Panel. |
/ | Undocumented: Only the program shows this item. It can change without notice. | Options shown when the Pro plan trial ends. | Hidden. The UI shows it. You do not type it. |
/ | Gated: Works only behind a flag or a server gate. claude.ai sign-in. | Manages usage limits and upgrade options. | Panel. |
/ | Gated: Works only behind a flag or a server gate. Hidden unless the account is eligible. | Shares a free week of Claude Code with friends. | Panel. |
/ [report] | Gated: Works only behind a flag or a server gate. Off when env var DISABLE_FEEDBACK_COMMAND is set. | Sends feedback or reports a bug. | Panel. |
/ (alias /) [report] | Gated: Works only behind a flag or a server gate. Env var DISABLE_BUG_COMMAND exists. | Reports a bug or shares your conversation. | Panel. |
/ | Gated: Works only behind a flag or a server gate. Availability claude-ai and console. Off when env var DISABLE_INSTALL_GITHUB_APP_COMMAND is set. | Configures GitHub Actions for a repository. | Panel. |
/ | Gated: Works only behind a flag or a server gate. Availability claude-ai. | Installs the Slack app. | Text command. |
/ | Gated: Works only behind a flag or a server gate. Hidden unless CLAUDE_CODE_USE_BEDROCK is set. | Reconfigures Amazon Bedrock sign-in, region, or model pins. | Panel. See Models and Providers. |
/ | Gated: Works only behind a flag or a server gate. Hidden unless CLAUDE_CODE_USE_VERTEX is set. | Reconfigures Google Vertex AI sign-in, project, region, or model pins. | Panel. |
/ | Gated: Works only behind a flag or a server gate. Availability claude-ai. Policies allow_remote_sessions and allow_quick_web_setup. | Configures cloud sessions with your GitHub account. | Panel. |
/ | Gated: Works only behind a flag or a server gate. Off when env var CLAUDE_CODE_DISABLE_PLUGIN_FORWARDING is set. | Chooses whether cloud sessions use the plugins enabled on this machine. | Panel. |
/ | Gated: Works only behind a flag or a server gate. Availability claude-ai and console-profile. Policy allow_remote_sessions. | Chooses the default environment for cloud agents. | Panel. |
/ (alias /) | Gated: Works only behind a flag or a server gate. Availability claude-ai and console-profile. Policy allow_remote_sessions. | Sends this session to the cloud, or resumes one from claude.ai. | Panel. |
/ (alias /) | Gated: Works only behind a flag or a server gate. Needs a remote workspace. | Shows the cloud session URL and a QR code. | Panel. |
/ (alias /) | Gated: Works only behind a flag or a server gate. Availability claude-ai. | Continues the session in Claude Desktop. | Panel. |
/ (aliases /, /) | Documented: An official docs page names this item. | Shows a QR code to download the mobile app. | Panel. |
/ (alias /) [name] | Gated: Works only behind a flag or a server gate. Off when the setting disableRemoteControl is true. | Controls this session from your phone or claude.ai/code. | Panel. Since 2., pressing w in the spawn-mode screen says the new mode is saved for the folder, and a later claude remote- start that uses the saved mode says where it came from (v2.1.305 release). A ! command sent over Remote Control is not run: Not run: (the program). |
/ <prompt> | Gated: Works only behind a flag or a server gate. Availability claude-ai. | Drafts an editable plan in a cloud session. | Panel. |
/ | Gated: Works only behind a flag or a server gate. Paid feature. | Runs a cloud code review. | Panel and text form. |
/ | Gated: Works only behind a flag or a server gate. Availability claude-ai and console-profile. Policy allow_remote_sessions. | Watches the current pull request and fixes issues. | Panel. |
/ | Undocumented: Only the program shows this item. It can change without notice. | Manages background services and routines. | Panel. |
/ | Gated: Works only behind a flag or a server gate. Setting disableWorkflows and env var CLAUDE_CODE_DISABLE_WORKFLOWS. | Browses running and finished workflows. | Panel. |
/ | Gated: Works only behind a flag or a server gate. claude.ai login on a Pro, Max, Team, or Enterprise plan (or no plan set), and an org policy. | Browses your published and shared artifacts. | Panel. d deletes your own artifact after a confirmation. Since 2. the confirmation is numbered: 1 or Enter keeps, 2 deletes, and y, n, and Esc still worked. Since 2. y and n no longer answer. See How / and / Work. |
/, / | Gated: Works only behind a flag or a server gate. Policy allow_design_sync. | Grants or revokes agent access to your Design projects. | Hidden text commands. |
/ | Gated: Works only behind a flag or a server gate. Policy allow_design_sync. | Authorizes design-system access for /. | Panel. |
/ [hold|tap|off] | Gated: Works only behind a flag or a server gate. Availability claude-ai. | Toggles voice mode. | Text command. |
/ | Documented: An official docs page names this item. | Teaches features through short interactive lessons. | Panel. |
/ | Documented: An official docs page names this item. | Orders stickers. | Text command. |
/ | Documented: An official docs page names this item. | Plays a lo-fi radio station. | Text command. |
/ | Gated: Works only behind a flag or a server gate. Policy allow_team_onboarding, and needs a workspace. | Builds a guide that helps teammates learn Claude Code from your usage. | A prompt command. |
/ | Undocumented: Only the program shows this item. It can change without notice. Gated: Works only behind a flag or a server gate. Hidden. An isEnabled check decides. | Opens the page of the offer shown at start-up. | Hidden text command. |
/ | Undocumented: Only the program shows this item. It can change without notice. Gated: Works only behind a flag or a server gate. Hidden. An isEnabled check decides. | Continues now at lower priority after you reach your 5-hour limit. Run it again to stop. | Hidden text command. |
/ | Undocumented: Only the program shows this item. It can change without notice. Gated: Works only behind a flag or a server gate. Hidden. | Runs a workflow handoff that the server started. | Hidden text command. Only for sessions that a workflow_ event starts. |
/ | Gated: Works only behind a flag or a server gate. Policy allow_heap_dump. | Writes the JavaScript heap to your Desktop (home folder on Linux without a Desktop). | Hidden text command. |
/ prompt arguments | Documented: An official docs page names this item. | MCP prompts become commands. Missing required arguments give "Missing required argument". | Made at run time 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 program picks the second one 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).
When a Command Name Is Not Valid
The program loads custom commands from .claude/commands/ and skills together. A command that fails a check does not stop the others from loading.
- Name rule. A name must not hold hidden, direction-changing, or blank-like characters,
<or>. It must not be over 256 characters (chunk-r5cyd28m.js:54682). When a name fails, the program does not offer the command. It writes a warning to the debug log:[names] <name> is not offered: a name may not hold hidden, direction-changing or blank-like characters, < or >, or be over 256 characters(chunk-r5cyd28m.js:54686,:155024). Rename the file to fix it. - Name type. Since
2.1.312, the program skips a command whose name or display name is not a string. It reports an error that starts "Command not listed: its name or display name is not a string" and keeps the other commands (chunk-r5cyd28m.js:53519). In2.1.311the same loop made no such check (chunk-2ht8z368.js:53427). - File errors. If one file in
.claude/commands/cannot load, the program logs[skills] failed to load command from <path>: <error>at the error level. It loads the other files (chunk-r5cyd28m.js:155696).
The release note says that one bad command name could leave claude -p with no output (release notes). The program code does not show that link.
How /restart Works
/restart restarts Claude Code on the installed version. It 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.
How /usage and /artifacts Work
/artifacts has four tabs: All, Mine, Shared, and Pinned. Pinned shows only when you have pins.
The footer lists the keys. Enter attaches the selected artifact to the session. The panel shows Attaching <title>…. Enter opens an artifact that is already attached instead. x dismisses, c copies the URL, Ctrl+R renames, d deletes, p pins, / searches, and r refreshes.
To delete, press d or choose Delete from the actions menu. Only the owner can delete, so the key works only on your own artifacts. The panel asks Delete <title>? This cannot be undone. Choose No, keep it or Yes, delete it. Since 2.1.304 the keys are 1 or Enter to keep and 2 to delete, and y, n, and Esc still worked. Since 2.1.305 y and n no longer answer, and Esc goes back with nothing sent (v2.1.305 release).
A yes sends DELETE /api/frame/<slug>. The program retries once on 409, 429, or 503. Success shows Artifact deleted. The link stops working for everyone. You cannot restore it. Republishing makes a new URL.
Since 2.1.305 /usage turns each warning into a one-line fix that names its source, and f applies the fixes. Each fix starts a prompt that begins Fix what /usage flagged. Show me each change before you make it. It tells Claude that text in backticks is a name from your logs, never an instruction. Examples of fix lines are Turn off MCP servers you don't use, Stop sessions you no longer need, Start fresh when you switch tasks, and Give simple subagents a cheaper model (the program). With Remote Control on, /usage says Nothing was sent. Turn off Remote Control to use fixes.
On 2.1.305, an API key shows only session cost and tokens. CLAUDE_CODE_OAUTH_TOKEN also shows the Current session and Current week (all models) rows, filled from model reply headers. The panel then also shows What's contributing to your limits usage? with Scanning local sessions…. The program did not call the usage endpoint with the token, on 2.1.305 and again on 2.1.306 (see Probes). A claude.ai login with the user:inference and user:profile scopes is what the program checks for the full section.
Reset times look like Resets <time> (<time zone>). /usage drops minutes on the hour. It adds a date when the reset is more than 24 hours away. Weekly rows always show the date.
When the usage endpoint is rate limited, /usage says so. What you see depends on the data it already has. A run against a local stub that answered 429 showed these texts. The time is 12-hour, rounded up to the next minute, with no zone and no date. This differs from the Resets lines.
The two rows for the 200 reply hold the 2.1.312 text, which the program gives. 2.1.311 and earlier said Usage endpoint is rate limited. Please try again in a moment. and (rate limited — try again in a moment). No 2.1.312 run reached the usage endpoint, so a run has not shown the new text. See Probes.
Data Before the 429 | What /usage Shows |
|---|---|
| None | Error: |
None, and the reply is a 200 with an error of type rate_ | Error: |
Bars from the anthropic- and - headers | The bars, then Per- |
The same, plus 7d_ headers | An extra Current week (<model>) row, then Partial usage data (rate limited until 10: |
| A saved cache that is 10 minutes old | The cached bars, then Showing last- |
The same cache, with the 200 reply | Showing last- |
The end time comes from Retry-After. A Retry-After of 1800 gave 30 minutes. A missing one gave the 5-minute default. The program caps the hold at 1 hour. Claude Code keeps the hold in memory for each token. A new process therefore asks again. Claude Code shows a saved cache younger than 60 seconds without a request. The 200 reply has no end time, because only the 429 path reads the hold.
With CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC set, the panel shows Failed to load usage data and sends no request.
No live run showed these items. They come from the program. The first is the (could not refresh) ending. The program uses it when the request fails for a reason other than a rate limit. The second is the form Showing last-known usage (rate limited until <time>) without as of. The third is a 403 response.
Source: the program. The delete prompt, the footer keys, and Artifact deleted were also seen in a live run. The Resets lines and the rate-limit texts above were seen against a local stub with fake subscriber credentials.
Errors
Each row is a family of messages. The backticked text is the start that every message in the family shares. A row marked Various gathers the messages of one feature that do not share one start.
| Start of Message | Status | What It Means | Cases |
|---|---|---|---|
| Various | Undocumented: Only the program shows this item. It can change without notice. | Terminal setup. / could not change a terminal's settings. | A backup of the Terminal.app preferences could not be made. A profile could not be read. Option as Meta or the audio bell could not be set. No config path was found for Alacritty. The text says whether the settings were restored. |
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.