Skip to main content

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 -p and the SDK.
  • A Gated badge 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โ€‹

CommandStatusWhat it doesNotes
/add-dir <path>DocumentedAdds a working folder.Panel. Runs at once when you give a path. Loads .claude/skills, .claude/commands, and .claude/agents of that folder. A text form runs for some SDK entry points.
/cd <path>DocumentedMoves this session to a new working folder.Panel. The new folder adds its project skills (2.1.246 or later).
/clear (aliases /reset, /new) [name]DocumentedStarts a new session with empty context.The old session stays on disk. /resume opens it. Works non-interactive too.
/compact <optional custom summarization instructions>DocumentedSummarizes the conversation to free context.Turned off when env var DISABLE_COMPACT is truthy. See Context and Compaction.
/autocompact [auto|<tokens>]DocumentedSets 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.
/contextDocumentedShows current context use.Found only as a text command, enabled in non-interactive mode.
/resume (alias /continue) [conversation id or search term]DocumentedResumes a past conversation.Panel. Hidden for a remote viewer. See Sessions and Storage.
/rename (alias /name) [name]DocumentedRenames the conversation.Panel and text form.
/branch [name]DocumentedBranches the conversation at this point.Panel.
/fork <directive> or [prompt]DocumentedStarts a background agent that inherits the full conversation.Panel. Off in coordinator mode.
/subtask <task>DocumentedSends a subagent off with your full context. Its result comes back here.Panel. Off in coordinator mode.
/background (alias /bg) [prompt]DocumentedSends this session to the background and frees the terminal.Panel. Runs at once with no prompt. Matches the --bg flag.
/stopGatedStops this background session.The transcript and worktree are kept.
/goal [<condition> | clear]DocumentedSets 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.
/plan [open|<description>]DocumentedTurns on plan mode, or shows the session plan.Panel.
/recapDocumentedWrites a one-line session recap now.Text command.
/btw [question]DocumentedAsks a quick side question without interrupting the main conversation.Panel.
/export [filename]DocumentedExports the conversation to a file or the clipboard.Panel.
/copy [N]DocumentedCopies the last reply to the clipboard. /copy N copies the Nth latest.Panel.
/exit (alias /quit)DocumentedExits the CLI. In a background session it detaches and the session keeps running.Panel and text form.
/restart (alias /update)GatedRestarts Claude Code on the newly installed version and resumes this session.Interactive only. See How /restart Works.
/rewind (aliases /checkpoint, /undo)DocumentedRestores the code, the conversation, or both to an earlier point.Interactive only.
/tasks (alias /bashes)DocumentedShows and manages everything that runs in the background.Panel.
/list-agents (alias /peers)DocumentedLists subagents, teammates, and other sessions you can message.Off when the org setting messagingBeyondOwnAgentsDisabled is set.
/focus [on|off]DocumentedToggles focus view: only your prompt, a summary, and the reply.Needs the fullscreen renderer (/tui fullscreen or CLAUDE_CODE_NO_FLICKER=1). The setting viewMode: "focus" does the same.
/diffDocumentedShows uncommitted changes and per-turn diffs.Panel. Off when a mod provides its own diff view.
/model <model> or [model]DocumentedSets the model.Panel and text form. See Models.
/effort [levels] or <levels>DocumentedSets the effort level.Panel and text form. Since 2.1.304, /effort status no longer shows a guessed level when CLAUDE_CODE_EFFORT_LEVEL is auto or unset.
/fast [on|off]GatedToggles fast mode.Panel and text form.
๐Ÿงชย /advisor [model|off]GatedLets Claude consult a stronger model at key moments.Panel and text form. See CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL.

Setup, Interface, and Config Commandsโ€‹

CommandStatusWhat it doesNotes
/config (alias /settings) key=valueDocumentedSets a setting by key.The text form works in non-interactive mode only.
/memoryDocumentedEdits CLAUDE.md files and memory settings.Panel.
/permissions (alias /allowed-tools)DocumentedManages allow and deny rules.Panel.
/hooksDocumentedShows your hook configuration.Panel. Needs no workspace. See Hooks.
/mcp [reconnect|enable|disable [<server>|all]]DocumentedManages MCP servers.Panel and text form.
/plugin (aliases /plugins, /marketplace) [subcommand]DocumentedManages plugins.Panel with argument completion.
/reload-plugins [--force]DocumentedActivates pending plugin changes in the current session.Runs non-interactive too (2.1.260 or later).
/reload-skillsDocumentedPicks up skills added or changed on disk during this session.Works in both modes.
/skillsDocumentedLists available skills. Space cycles the skillOverrides state and Esc saves it.Panel.
/skill-doctorDocumentedShows which loaded skills are unused and cost context.Panel (opens the /plugin Stats tab) and a text form. Needs feature-flag fetching.
/output-style [style]DocumentedLists output styles or switches to one.Text command.
/themeDocumentedChanges the theme.Panel.
/tui [default|fullscreen]DocumentedSets the terminal UI renderer.A change restarts and resumes the session.
/color [color|default]DocumentedSets the prompt bar color for this session.Panel and text form.
/briefGatedToggles brief-only mode.Panel.
/scroll-speedDocumentedAdjusts mouse wheel scroll speed.Needs the fullscreen renderer. Off in some terminals, including JetBrains.
/terminal-setupDocumentedInstalls the Shift+Enter key binding.The text changes with the terminal.
/keybindingsDocumentedOpens your keyboard shortcuts file.Interactive only. Needs keybinding customization on.
/ide [open]DocumentedManages IDE integrations and shows status.Panel.
/initDocumentedCreates a CLAUDE.md file with codebase notes.A prompt command. With env var CLAUDE_CODE_NEW_INIT it also sets up skills and hooks. Claude can call it through the Skill tool.
/auto-mode-setup [--request-id <uuid>] (--wizard ... --propose | --expect-sha256 <hex> --apply-file <path>)GatedTeaches 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.1.304 it is also on Bedrock, Vertex, Foundry, a Claude apps gateway, and with telemetry off. skillOverrides["auto-mode-setup"]: "off" turns it off (the program).
/import [codex|gemini|cursor] [--dry-run]GatedImports config from another AI coding agent.Panel and text form.
/helpDocumentedShows help and the command list.Panel. Terminal only.
/statusDocumentedShows version, model, account, API connectivity, and tool status.Panel. Lists skills whose allowed-tools were ignored.
/usage (aliases /cost, /stats)DocumentedShows session cost, plan use, and activity stats.Panel and text form. Since 2.1.304 it says when a rate limit ends.
/release-notesDocumentedShows release notes.Panel.
/statuslineDocumentedSets up the status line.A prompt command. Not in safe mode. Interactive only.
/sandbox exclude "command pattern" (Windows also install)GatedShows sandbox state and opens its settings.Panel.
/chromeGatedOpens Claude in Chrome settings.Panel.
/insightsGatedMakes a report that analyzes your sessions.A prompt command.
/privacy-settingsGatedViews and updates privacy settings.Panel.
/loginDocumentedSigns in, or switches accounts.Off when env var DISABLE_LOGIN_COMMAND is set.
/logoutDocumentedSigns out.Off when env var DISABLE_LOGOUT_COMMAND is set.
/install [options]DocumentedInstalls the native build.Takes --force and a target. Interactive only.

Account, Cloud, and Other Commandsโ€‹

CommandStatusWhat it doesNotes
/usage-creditsGatedSets up usage credits, or asks your admin for them at a limit.Panel and text form.
/upgradeGatedUpgrades to Max for higher rate limits.Panel.
/pro-trial-expiredUndocumentedOptions shown when the Pro plan trial ends.Hidden. The UI shows it. You do not type it.
/rate-limit-optionsGatedManages usage limits and upgrade options.Panel.
/passesGatedShares a free week of Claude Code with friends.Panel.
/feedback [report]GatedSends feedback or reports a bug.Panel.
/bug (alias /share) [report]GatedReports a bug or shares your conversation.Panel.
/install-github-appGatedSets up GitHub Actions for a repository.Panel.
/install-slack-appGatedInstalls the Slack app.Text command.
/setup-bedrockGatedReconfigures Amazon Bedrock sign-in, region, or model pins.Panel. See Models and Providers.
/setup-vertexGatedReconfigures Google Vertex AI sign-in, project, region, or model pins.Panel.
/web-setupGatedSets up cloud sessions with your GitHub account.Panel.
/cloud-pluginsGatedChooses whether cloud sessions use the plugins enabled on this machine.Panel.
/remote-envGatedChooses the default environment for cloud agents.Panel.
/teleport (alias /tp)GatedSends this session to the cloud, or resumes one from claude.ai.Panel.
/session (alias /remote)GatedShows the cloud session URL and a QR code.Panel.
/desktop (alias /app)GatedContinues the session in Claude Desktop.Panel.
/mobile (aliases /ios, /android)DocumentedShows a QR code to download the mobile app.Panel.
/remote-control (alias /rc) [name]GatedControls this session from your phone or claude.ai/code.Panel.
/ultraplan <prompt>GatedDrafts an editable plan in a cloud session.Panel.
/ultrareviewGatedRuns a cloud code review.Panel and text form.
/autofix-prGatedWatches the current pull request and fixes issues.Panel.
/daemonUndocumentedManages background services and routines.Panel.
/workflowsGatedBrowses running and finished workflows.Panel.
/artifactsGatedBrowses your published and shared artifacts.Panel. Since 2.1.304 the delete confirmation is numbered: 1 or Enter keeps, 2 deletes. y, n, and Esc still work.
/design-consent, /design-revokeGatedGrants or revokes agent access to your Design projects.Hidden text commands.
/design-loginGatedAuthorizes design-system access for /design-sync.Panel.
/voice [hold|tap|off]GatedToggles voice mode.Text command.
/powerupDocumentedTeaches features through short interactive lessons.Panel.
/stickersDocumentedOrders stickers.Text command.
/radioDocumentedPlays a lo-fi radio station.Text command.
/team-onboardingGatedBuilds a guide that helps teammates learn Claude Code from your usage.A prompt command.
/heapdumpGatedWrites the JavaScript heap to your Desktop (home folder on Linux without a Desktop).Hidden text command.
/mcp__<server>__<prompt> prompt argumentsDocumentedMCP prompts become commands. Missing required arguments give "Missing required argument".Made on the fly with source:"mcp". The alias form is <server>:<prompt> (MCP).

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.

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.