AI agents

Claude Code

Claude Code — Slash Commands

Slash commands are typed inside an interactive Claude Code session (they are not shell commands — see Claude Code — CLI Commands for those). Typing / shows all available commands with autocomplete.

Three things to know:

  • Custom slash commands have been merged into Skills. .claude/commands/review.md and .claude/skills/review/SKILL.md both create /review and behave the same; on a name conflict the skill wins. See Claude Code — Agent Skills.
  • MCP prompts appear as /mcp__<server>__<prompt>.
  • Since v2.1.199, multiple skills can be chained at the start of a message (/skill-a /skill-b do XYZ, up to six).

Full command table

[Skill] = bundled skill, [Workflow] = bundled dynamic workflow. Commands the docs list without a description are marked ? Unable to verify.

CommandWhat it doesWhen to use it
/add-dir <path>Add a working directory for the sessionWorking across multiple directories or repos at once
/advisor [model|off]Enable/disable the advisor tool — a second model consulted at key moments (v2.1.98+)You want a second opinion on key decisions
/agentsv2.1.198+: prints a reminder to ask Claude to manage subagents or edit .claude/agents/; earlier versions open an interactive subagent UIManaging subagents
/autofix-pr [prompt]? Unable to verify—
/background [prompt]Detach the whole session as a background agentLong-running work you want running while you do something else
/batch <instruction> [Workflow]Decompose a large change into units run in worktreesLarge, sweeping changes across a codebase
/branch [name]Fork an earlier conversationTrying an alternate direction from a previous point
/btw <question>Quick aside that doesn’t enter conversation historyA throwaway question you don’t want polluting context
/cd <path>Move the session to a new directory (v2.1.246+ connects new plugins’ MCP servers automatically)Switching project mid-session
/chromeChrome browser integrationSessions that need browser control
/claude-api [migrate|managed-agents-onboard]? Unable to verify—
/clear [name]Clear conversation historyStarting a new, unrelated task
/code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [target]Multi-agent diff review; ultra runs in the cloudDeep review of your changes before merging
/color [color|default]? Unable to verify—
/compact [instructions]Compact conversation with optional focus instructionsContext window filling up but work continues
/config [key=value ...]Settings interface; can also set any setting straight from the promptViewing or changing settings in-session
/context [all]Visualize context window usageChecking what is consuming your context
/copy [N]? Unable to verify—
/costToken usage and cost (shows prompt-cache-miss causes since 2.1.260)Tracking spend for the session
/dataviz [request]Bundled skill — data visualizationTurning data into charts/visuals
/debug [description]Diagnose runtime issuesSomething in Claude Code itself is misbehaving
/deep-research <question>Bundled skill — in-depth research on a questionOpen-ended research questions
/design-loginBundled skill; details ? Unable to verify—
/design-sync [hint]Bundled skill; details ? Unable to verify—
/desktopHand off the terminal session to the Desktop appMoving from terminal to the desktop app
/diffShow uncommitted changes (opens a diff panel in fullscreen mode, 2.1.260+)Reviewing what changed before committing
/doctorSetup checkup; diagnoses and can fix installation/config issuesA broken or misbehaving installation
/effort [level|auto]Adjust reasoning effortTrading speed vs. depth of reasoning
/exitExit the sessionDone working
/export [filename]Export the conversationSaving or sharing a transcript
/fast [on|off]Fast mode for Opus responsesQuicker Opus replies
/feedback [report]Report a bug with session context attachedFiling a bug report (replaces the legacy /bug)
/fewer-permission-prompts? Unable to verify—
/focus? Unable to verify—
/fork <directive>? Unable to verify—
/goal [condition|clear]Keep Claude working until a condition holdsLong autonomous runs with a clear finish line
/heapdump? Unable to verify—
/helpShow helpQuick reference in-session
/hooksManage hooksConfiguring event hooks
/ideIDE integrationConnecting the session to your editor
/initGenerate a starter CLAUDE.mdFirst session in a new project
/insights? Unable to verify—
/install-github-appInstall the GitHub app integrationEnabling GitHub integration features
/install-slack-appInstall the Slack app integrationEnabling Slack integration features
/keybindingsManage keybindingsCustomizing keyboard shortcuts
/loginSign inAuthenticating
/logoutSign outSwitching accounts
/loop [interval] [prompt]Repeat a prompt on an intervalPolling or recurring checks
/mcp [reconnect <server>|enable|disable [<server>|all]]MCP server management panelAuthenticating, reconnecting, enabling/disabling MCP servers
/memoryOpen memory files in the system editorEditing CLAUDE.md files directly
/mobile? Unable to verify—
/model [model]Select the modelSwitching models mid-session
/passes? Unable to verify—
/permissionsManage allow/ask/deny rulesReviewing or changing tool permissions
/plan [description]Switch into plan modePlanning before any edits happen
/plugin [subcommand]Plugin manager (/plugin list, /plugin install x@marketplace, /plugin marketplace add org/repo, …)Installing and managing plugins
/powerupFun / easter-egg command—
/pr-comments [PR]Fetch pull-request commentsWorking through review feedback on a PR
/privacy-settingsManage privacy settingsReviewing data/privacy options
/radioFun / easter-egg command—
/recap? Unable to verify—
/release-notesShow release notesCatching up on what changed
/reload-plugins [--force]Reload plugins after changesPicking up plugin changes without restarting
/reload-skillsReload skillsPicking up skill changes without restarting
/remote-controlContinue this local session from another deviceDriving the session from Claude.ai / the app
/remote-env? Unable to verify—
/rename [name]Rename the sessionMaking sessions findable for /resume
/resume [session]Resume an earlier conversation (pasting a PR URL finds the session that created it)Picking up previous work
/review [PR]Fast single-pass read-only review of a GitHub PRQuick PR review
/rewindRoll code and conversation back to a checkpoint (Esc+Esc also rewinds; can resume from before a /clear)Undoing a bad change
/run? Unable to verify—
/run-skill-generator? Unable to verify—
/sandboxConfigure sandboxingAdjusting sandbox behavior
/schedule [description]Create scheduled routinesRecurring automated work
/scroll-speedSet scroll speedTUI preference
/security-reviewCheck the diff for security vulnerabilitiesSecurity pass before merging
/setup-bedrockSet up Amazon BedrockRunning via Bedrock
/setup-vertexSet up Google Vertex AIRunning via Vertex
/simplify [target]? Unable to verify—
/skillsList and manage skillsBrowsing available skills
/stats? Unable to verify—
/statusStatus info: account, model, org policy line (since 2.1.261)Checking account/model state
/statuslineConfigure a custom status lineCustomizing the TUI status line
/stickersFun / easter-egg command—
/stopStop the current responseCancelling generation
/tasksList background tasks of the sessionChecking on background work
/team-onboarding? Unable to verify—
/teleportPull a web session into this terminalMoving a claude.ai session to the terminal
/terminal-setupInstall the Shift+Enter newline binding (iTerm2, VS Code)Multi-line input in the terminal
/themeChange the UI themeAppearance preference
/tui [default|fullscreen]Switch TUI display modeToggling fullscreen UI
/ultraplan <prompt>? Unable to verify—
/ultrareview [PR]Research-preview review (What’s new W17)Heavier review of a PR
/upgradeUpgrade Claude CodeGetting the latest version
/usageShow usage informationChecking plan usage
/usage-creditsShow credit usageTracking credits
/verify? Unable to verify—
/vimVim input modeVim-style editing
/voice [hold|tap|off]Voice input modeTalking instead of typing
/web-setup? Unable to verify—
/workflowsWorkflow progress viewTracking dynamic workflow runs

Note: /bug no longer appears in the current command table — use /feedback instead. The old /approved-tools and /allowed-tools commands are now /permissions.

Deep-dives

/init

What it does

Generates a starter CLAUDE.md for the current project — the memory file Claude Code loads automatically at launch.

When to use it

On your first session in a new project, and again when the project structure changes significantly.

Example

> /init

Notes

Review and edit the generated file; it becomes shared team context when committed to git. See Claude Code — Project Instructions (CLAUDE.md).

Official source

https://docs.claude.com/en/docs/claude-code/memory

/clear

What it does

Clears the conversation history, optionally naming the cleared session (/clear [name]).

When to use it

When switching to a new, unrelated task. Old context costs tokens and can bias answers.

Example

> /clear billing-refactor

Notes

/rewind can resume from before a /clear, so clearing is not destructive.

Official source

https://code.claude.com/docs/en/commands

/compact

What it does

Compacts the conversation, summarizing earlier turns to free context space. Optional instructions tell it what to preserve.

When to use it

When the context window is filling up but the task isn’t done. Auto-compact also fires automatically at ~95% of context (tunable via CLAUDE_AUTOCOMPACT_PCT_OVERRIDE).

Example

> /compact keep the failing test output and the refactor plan

Notes

PreCompact hooks fire with matcher manual or auto. Subagent transcripts are not affected by main-conversation compaction.

Official source

https://code.claude.com/docs/en/commands

/model

What it does

Shows and changes the model used for the session.

When to use it

When you want a stronger model for hard reasoning or a faster/cheaper one for routine work.

Example

> /model opus

Notes

The same can be set at launch with claude --model <model> (alias or full model name) or the model setting in settings.json.

Official source

https://code.claude.com/docs/en/commands

/memory

What it does

Opens your memory files (CLAUDE.md hierarchy) in the system editor and shows which memory is loaded.

When to use it

When you want to see or edit everything Claude Code knows about your project.

Example

> /memory

Notes

Quick alternative: start any input with # to add a one-line memory — you’ll be prompted to choose which memory file it goes into. See Claude Code — Project Instructions (CLAUDE.md).

Official source

https://docs.claude.com/en/docs/claude-code/memory

/agents

What it does

Entry point for managing subagents. Since v2.1.198 it prints a reminder to ask Claude to manage subagents or to edit .claude/agents/ directly; on v2.1.197 and earlier it opens an interactive subagent UI.

When to use it

Creating, inspecting, or adjusting subagents.

Example

> /agents

Notes

claude agents on the shell lists all configured subagents grouped by source, without starting a session. See Claude Code — Subagents.

Official source

https://docs.claude.com/en/docs/claude-code/sub-agents

/permissions

What it does

Opens the interface for managing allow / ask / deny permission rules.

When to use it

When Claude Code prompts too often for safe operations — add an allow rule instead of disabling protections.

Example

> /permissions

Notes

Rules are stored in settings.json under permissions; see Claude Code — Permissions for rule syntax and the six permission modes.

Official source

https://docs.claude.com/en/docs/claude-code/permissions

/mcp

What it does

Opens the MCP server management panel: authenticate, reconnect, or enable/disable servers (/mcp reconnect <server>, /mcp enable|disable [<server>|all]).

When to use it

When a connected MCP server needs re-authentication or is misbehaving.

Example

> /mcp reconnect notion

Notes

Servers are added from the shell with claude mcp add; see Claude Code — MCP.

Official source

https://docs.claude.com/en/docs/claude-code/mcp

/resume

What it does

Resumes an earlier conversation, by name/ID or from an interactive picker. Pasting a GitHub PR URL finds the session that created it.

When to use it

Picking up where you left off — yesterday’s task, or the session behind a PR.

Example

> /resume

Notes

Shell equivalents: claude --resume <id-or-name>, claude --continue (most recent in the current directory), claude --from-pr <n|url>. See Claude Code — CLI Commands.

Official source

https://code.claude.com/docs/en/commands

/review

What it does

Fast, single-pass, read-only review of a GitHub PR.

When to use it

A quick sanity check on a PR, yours or a teammate’s.

Example

> /review 123

Notes

Read-only — it won’t change code. For deeper multi-pass review with optional fixes, use /code-review; for a security pass, /security-review.

Official source

https://code.claude.com/docs/en/commands

/code-review

What it does

Multi-agent review of a diff, with tunable depth: low | medium | high | xhigh | max | ultra (ultra runs in the cloud). --fix applies suggested fixes; --comment posts review comments; an optional target selects what to review.

When to use it

Before merging a non-trivial change, when /review is too shallow.

Example

> /code-review high --fix

Notes

/code-review, /review, and /security-review coexist with different semantics — they are not aliases. See Claude Code — Workflows.

Official source

https://code.claude.com/docs/en/commands

/plan

What it does

Switches the session into plan mode: read-only exploration ending in a plan presented for approval. Accepts an optional description of what to plan.

When to use it

Before any task where you want to approve an approach before edits happen.

Example

> /plan add pagination to the /users endpoint

Notes

Plan mode is one of the six permission modes. You can also toggle it with Shift+Tab or start in it with claude --permission-mode plan. Plans are stored in ~/.claude/plans by default (plansDirectory setting).

Official source

https://code.claude.com/docs/en/commands


Last verified: 2026-09-07

Official sources:

AI coding tools evolve quickly. If you find outdated information, please open an issue or pull request.