Claude Code commands — frontmatter fields and official built-in slash commands.


Frontmatter Fields (20)

Field Type Required Description
name string No Command name shown in the / menu. Defaults to the directory name
description string Recommended What the command does. Shown in autocomplete and used by Claude for auto-discovery. If omitted, uses the first non-empty line of the markdown content. Put the key use case first: the combined description and when_to_use text is truncated at 1,536 characters in the listing
when_to_use string No Additional context for when Claude should invoke the skill — trigger phrases or example requests. Appended to description in the listing and counts toward the 1,536-character cap
argument-hint string No Hint shown during autocomplete to indicate expected arguments (e.g., [issue-number], [filename] [format])
arguments string/list No Named positional arguments for $name substitution in command content. Accepts a space-separated string or YAML list — names map to argument positions in order
disable-model-invocation boolean No Set true to prevent Claude from automatically invoking this command. Also prevents preloading into subagents and from running when a session-scoped scheduled task fires with the skill as its prompt. Default: false
user-invocable boolean No Set false to hide from the / menu — command becomes background knowledge only. Claude Code also won't run it when you type /name. Default: true
paths string/list No Glob patterns that limit when this skill is activated. Accepts a comma-separated string or a YAML list. When set, Claude loads the skill automatically only when working with files matching the patterns. Patterns are relative to Claude's current working directory, and files outside that directory don't match
allowed-tools string/list No Tools Claude can use without asking permission during the turn that invokes this skill. The grant clears when you send your next message. Accepts a space- or comma-separated string, or a YAML list
disallowed-tools string/list No Tools removed from Claude's available pool while this command is active. Use for autonomous skills that should never call certain tools. Accepts a space- or comma-separated string, or a YAML list. The restriction clears when you send your next message. Can't remove EndConversation while any other tool remains
model string No Model to use when this command runs (e.g., haiku, sonnet, opus). Applies for the current turn only; the session model resumes on your next message. Accepts the same values as /model, or inherit to keep the active model. A value excluded by your organization's availableModels allowlist, or unsupported in auto mode, is ignored and the session keeps its current model
effort string No Effort level when this skill is active. Overrides the session effort level. Options: low, medium, high, xhigh, max; available levels depend on the model
context string No Set to fork to run in a forked subagent context
agent string No Which subagent type to use when context: fork is set (default: general-purpose)
background boolean No Only applies with context: fork. Set to false to wait for the forked subagent's result in the turn that invoked the skill, instead of running it in the background. Default: true. Requires Claude Code v2.1.218 or later
shell string No Shell for !`command` blocks — accepts bash (default) or powershell. The PowerShell tool is on by default on Windows without Git Bash, and on Windows with Git Bash for claude.ai and Console accounts; CLAUDE_CODE_USE_POWERSHELL_TOOL=1 is needed on Bedrock, Agent Platform, Foundry, and on macOS, Linux, and WSL
metadata object No Free-form YAML map for your own key-value data read from SKILL.md by your own tooling. Claude Code doesn't act on its contents and drops a value that isn't a map. Do not reuse reserved field names such as paths as keys
license string No License covering the skill per the Agent Skills spec. Claude Code accepts the field but does not act on it
compatibility string No Environment requirements for the skill per the Agent Skills spec, such as intended products or system prerequisites. Accepts up to 500 characters. Claude Code accepts the field but does not act on it
hooks object No Hooks that Claude Code registers when the skill is invoked and keeps running for the rest of the session

(96)

# Command Tag Description
1 /design consent, /design revoke Grant Claude access to Claude Design (claude.ai/design), or withdraw it. When a reply from Claude asks you to run /design consent, type it at the Claude Code prompt yourself
2 /design-login Authorize design-system access for /design-sync with your claude.ai account. Sign in with /design-login whenever /design-sync or /design consent tells you to. This sign-in is for the standalone Claude Design site at claude.ai/design, which closes by December 14, 2026; see Migrate from standalone Claude Design to Claude
3 /login Sign in to your Anthropic account
4 /logout Sign out from your Anthropic account
5 /setup-bedrock Configure Amazon Bedrock authentication, region, and model pins through an interactive wizard. Hidden from the command menu until CLAUDE_CODE_USE_BEDROCK=1 is set; type it in full. First-time Bedrock users can also access this wizard from the login screen
6 /setup-vertex Configure Google Cloud's Agent Platform authentication, project, region, and model pins through an interactive wizard. Hidden from the command menu until CLAUDE_CODE_USE_VERTEX=1 is set; type it in full. First-time users can also access this wizard from the login screen
7 /upgrade Open the upgrade page to switch to a higher plan tier. When the browser fails to open, shows a sign-in prompt without printing the URL
8 /auto-mode-setup Draft autoMode.environment entries from your project and recent sessions, then review the draft and save it to your user settings. On a Pro, Max, Ultra, or Team plan, requires Claude Code v2.1.228 or later, or v2.1.233 or later on native Windows. On an Enterprise plan or with a Claude Console API key, requires v2.1.283 or later. If the command is missing, see the /auto-mode-setup returns 'Unknown command' troubleshooting page
9 /color [color|default] Set the prompt bar color for the current session. Available colors: red, blue, green, yellow, purple, orange, pink, cyan. Use default to reset. Run without an argument to pick a random color. When Remote Control is connected, the color syncs to claude.ai/code. Also available in non-interactive mode (-p)
10 /config [key=value ...] Open the Settings interface to adjust theme, model, output style, and other preferences. Pass one or more key=value pairs to set a setting directly without opening the interface, for example /config theme=dark, /config model=sonnet, or /config thinking=false. The key=value form can't turn on a setting that needs your confirmation in the panel, such as autoContinueAtUsageLimit, though it can turn one off. Also works in non-interactive (-p) mode and from the Claude mobile app via Remote Control. Run /config --help to list the keys you can set. Alias: /settings
11 /focus Toggle the focus view, which shows only your last prompt, a one-line tool-call summary with edit diffstats, and the final response. The tool-call summary also counts the subagents launched in the turn and collapses completed background-task notifications into a single count. The selection persists across sessions; set viewMode in settings to override it. Only available in fullscreen rendering. From a Remote Control client, run /focus [on|off] to turn the focus view on or off for the current session only, without changing your saved selection; this requires Claude Code v2.1.281 or later. The VS Code extension has its own Focus view toggle, independent of viewMode
12 /import [codex|gemini|cursor] [--dry-run] [--yes] Bring configuration from other coding agents on your machine (currently OpenAI Codex, Google Gemini CLI, or Cursor) into Claude Code, including instruction files, MCP servers, commands, subagents, and skills. In non-interactive mode (-p), lists what it found and gives you the command that confirms the import. --dry-run previews without writing; --yes skips the interactive picker. Importing from Cursor requires v2.1.265 or later. Not available on Bedrock, Agent Platform (Vertex), Foundry, Claude Platform on AWS, a Claude apps gateway, or with feature-flag fetching turned off
13 /keybindings Open your keyboard shortcuts file
14 /output-style [style] List output styles or switch to one, for example /output-style concise. Requires Claude Code v2.1.269 or later
15 /permissions Manage allow, ask, and deny rules for tool permissions. Opens an interactive dialog where you can view rules by scope, add or remove rules, manage working directories, and review recent auto mode denials. You can also view and edit auto mode classifier rules from the dialog's Auto mode tab. Alias: /allowed-tools
16 /powerup Discover Claude Code features through quick interactive lessons with animated demos
17 /privacy-settings View and update your privacy settings. Only available for Pro, Max, and Ultra plan subscribers
18 /radio Open Claude FM lo-fi radio in your browser. Prints the stream URL when no browser is available
19 /sandbox Toggle sandbox mode. Available on supported platforms only
20 /scroll-speed Adjust mouse wheel scroll speed interactively. Only available in fullscreen rendering. Not available in JetBrains terminals
21 /statusline Configure Claude Code's status line. Describe what you want, or run without arguments to auto-configure from your shell prompt
22 /stickers Order Claude Code stickers
23 /terminal-setup Install a Shift+Enter keybinding for newlines in VS Code, Cursor, Devin Desktop, Alacritty, or Zed. In Apple Terminal, enable Option+Enter for newlines and turn off the audible bell instead. In iTerm2, turn on clipboard access so /copy works
24 /theme Change the color theme. Includes light and dark variants, colorblind-accessible (daltonized) themes, ANSI themes that use your terminal's color palette, an "Auto (match terminal)" option that follows your terminal's light/dark mode, and custom themes loaded from ~/.claude/themes/ or plugins. Select "New custom theme…" to create your own
25 /tui [default|fullscreen] Set the terminal UI renderer and relaunch into it with your conversation intact. fullscreen enables the flicker-free alt-screen renderer. With no argument, prints the active renderer
26 /voice [hold|tap|off] Toggle voice dictation, or enable it in a specific mode. Requires a Claude.ai account
27 /autocompact [auto|] Set the auto-compact window: how full the context window gets before Claude Code compacts automatically. Pass a size such as 500k, or auto to return to the default tuned for your model. Claude Code saves the value to user settings and applies it to the current session. Without an argument, opens a dialog that shows the current window. Requires Claude Code v2.1.221 or later
28 /context [all] Visualize current context usage as a colored grid. Shows optimization suggestions for context-heavy tools, memory bloat, and capacity warnings. When the conversation exceeds the context window, the output includes a warning showing how far over the limit you are and which command frees space. In fullscreen mode, /context collapses the per-item breakdown to keep the grid visible. Pass all to expand it
29 /cost Alias for /usage
30 /insights Generate an HTML report analyzing Claude Code sessions on this machine, including which projects you work in, how you use Claude Code, where things go wrong, and features to try. Not available in cloud sessions
31 /rate-limit-options Show ways to keep working when a claude.ai usage limit blocks a request: wait and continue automatically when the limit resets, add usage credits, or upgrade your plan. Claude Code can also open this menu on its own when you hit a limit at your own terminal. Requires a claude.ai subscription. The wait-and-continue rows require Claude Code v2.1.234 or later
32 /stats Alias for /usage. Opens on the Stats tab
33 /status Open the Settings interface on the Status tab, showing version, model, account, and connectivity. A Session kind row reads background job · attached or background job · unattended in a background session, depending on whether a terminal is attached, and interactive in any other session. Before v2.1.221, /status didn't show this row. Works while Claude is responding
34 /usage Show session cost, plan usage limits, and activity stats. On a Pro, Max, Ultra, Team, or Enterprise plan, includes a breakdown of what counts against your plan limits. /cost and /stats are aliases
35 /usage-credits Configure usage credits, or request them from your admin, when you hit a limit. Opens your usage-credits billing settings in the browser, except that Team and Enterprise members without billing access instead send a usage-credits request to their admin from the CLI, after confirming in a dialog that the request notifies their admins. Prints the URL when no browser can open, for example over SSH (requires Claude Code v2.1.205 or later). Previously /extra-usage
36 /bug [report] Report a bug or share your conversation. You choose how much session history to include and confirm on a consent screen before anything is sent. When you are signed in on a first-party connection, the report goes to Anthropic. On a third-party provider or without Anthropic credentials, Claude Code writes the report to a local archive under ~/.claude/feedback-bundles/ that you forward yourself instead. In the VS Code extension, opens the extension's own feedback dialog (requires Claude Code v2.1.229 or later). When you run it while Claude is responding, Claude Code opens the dialog immediately. Before v2.1.232, Claude Code queued the command until the turn finished. Before v2.1.212, /bug and /share were aliases of /feedback. Alias: /share
37 /feedback [report] Send product feedback about Claude Code. Opens the same dialog as /bug, with the same consent step, sending rules, and mid-turn behavior. Without an argument, in sessions with Claude-drafted feedback, opens the drafts queue where you review, edit, send, or discard them; the queue includes an option to write a new report in the dialog. With an argument, the dialog opens directly
38 /heapdump Write a JavaScript heap snapshot and memory breakdown to ~/Desktop for diagnosing high memory usage. Writes to the home directory on Linux when there is no Desktop folder. Hidden from the command menu; type it in full. Share only the -diagnostics.json file, as the .heapsnapshot contains your conversation and credentials. Useful when filing bug reports about memory growth
39 /help Show help and available commands
40 /release-notes View the changelog in an interactive version picker. Select a specific version to see its release notes, or choose to show all versions. The notes appear in your transcript without entering the conversation Claude sees
41 /tasks View and manage background work in the current session, including subagents that have finished. Also available as /bashes
42 /copy [N] Copy the last assistant response to clipboard. Pass a number N to copy the Nth-latest response: /copy 2 copies the second-to-last. When code blocks or blockquotes are present, shows an interactive picker to select individual blocks or the full response. Press w in the picker to write the selection to a file instead of the clipboard, which is useful over SSH
43 /export [filename] Export the current conversation as plain text. With a filename, writes directly to that file. Without, opens a dialog to copy to clipboard or save to a file
44 /agents Print a reminder to ask Claude to create or manage subagents, or to edit .claude/agents/ or ~/.claude/agents/ directly. On v2.1.197 and earlier, opens an interactive interface for creating and managing subagent configurations
45 /chrome Configure Claude in Chrome settings
46 /hooks View hook configurations
47 /ide Manage IDE integrations and show status
48 /mcp [reconnect (|all)|enable|disable [|all]] Manage MCP server connections and OAuth authentication. Run with no argument to open the interactive list, pass reconnect to reconnect one disconnected server, reconnect all to retry every server that failed or needs authentication, or pass enable/disable with a server name or all to change connection state without opening the dialog. In non-interactive (-p) mode, running it with no argument prints a text summary of server status
49 /plugin [subcommand] Manage Claude Code plugins. Run with no argument to open the plugin menu, or pass a subcommand such as list, install, enable, or disable to act directly. Claude Code can activate a plugin during the install; the install summary tells you whether it did or whether to run /reload-plugins.
50 /reload-plugins [--force] Reload all active plugins to apply pending changes without restarting. Reports counts for each reloaded component and flags any load errors. When the reload would change which MCP tools are loaded and invalidate the prompt cache, the command warns and skips unless you pass --force. Also available in non-interactive mode (-p), the Agent SDK, and the desktop app, where it runs only on input typed directly into the session and doesn't apply plugin MCP server changes; requires Claude Code v2.1.260 or later
51 /reload-skills Re-scan skill and command directories so skills added or changed on disk during the session become available without restarting. Reports how many skills are available and how many were added or removed
52 /skill-doctor Show what each of your skills costs in context and how often it gets used, so you can find skills to turn off. Requires Claude Code v2.1.252 or later and feature-flag fetching
53 /skills List available skills. Type to filter by name, description, or source. Press t to sort by token count. Press Space or Enter to cycle a skill's visibility to Claude and the / menu; Esc saves and closes. Plugin skills, skills with disable-model-invocation: true, and skills with a managed skillOverrides entry or the --settings flag cannot be cycled
54 /memory Edit CLAUDE.md files, enable or disable auto memory, and view auto memory entries
55 /advisor [model|off] Enable or disable the advisor tool, which consults a second model for guidance at key moments during a task. Accepts a model name (fable, opus, sonnet) or a full model ID (fable requires Fable access); without an argument opens a picker. In a session without an interactive terminal, or over Remote Control, with no argument it prints the current advisor as text instead of opening the picker; requires v2.1.260. Use off to disable
56 /effort [level|auto|status|ultracode [on|off]] Set the effort level: low to xhigh, max, or auto; status prints it. ultracode or ultracode on turns ultracode on for the session, and ultracode off turns it off; the ultracode key persists. max is session-only. The on and off arguments require Claude Code v2.1.284 or later. If you run /effort while Claude is working, see when the new level starts. Works in -p on v2.1.205 or later
57 /fast [on|off] Toggle fast mode on or off. Run it while Claude is responding and Claude Code toggles fast mode without waiting for the turn to end, though the running turn finishes at its original speed. Before v2.1.242, Claude Code decided from a feature flag whether to run the command mid-turn or queue it until the turn finished, and always queued it in a session that doesn't fetch feature flags. Availability in non-interactive mode with -p is limited.
58 /model [model] Switch the AI model and save it as your default for new sessions. For models that support it, use left/right arrows to adjust effort level. With no argument, opens a picker; press s on a row to switch for the current session only. Once you confirm the switch, Claude Code applies the change without waiting for the current response to finish. Before v2.1.242, it could wait. Also available in non-interactive mode (-p) with a model argument, where it applies to the current session only and isn't saved as your default; requires Claude Code v2.1.205 or later
59 /passes Share a free week of Claude Code with friends. Only visible if your account is eligible
60 /plan [description] Enter plan mode directly from the prompt. Pass an optional description to enter plan mode and immediately start with that task, for example /plan fix the auth bug
61 /add-dir Add a working directory for file access during the current session. Type a partial path to see matching directory suggestions; press Tab to accept one. Most .claude/ configuration isn't discovered from the added directory. You can't add most network paths, such as \\server\share. After a successful add, your DirectoryAdded hooks run. When you run it while Claude is responding, Claude Code asks you to confirm the directory right away; once you confirm, Claude's next tool call in the same turn can access it. Before v2.1.234, Claude Code queued the command until the turn finished
62 /diff Review the changes in your working tree, including the edits Claude has made so far
63 /init Initialize project with a CLAUDE.md guide. Set CLAUDE_CODE_NEW_INIT=1 for an interactive flow that also walks through skills, hooks, and personal memory files. If /init finds OpenAI Codex or Google Gemini CLI configuration, it offers to carry it over with /import
64 /review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [--max-findings n|all|default] [pr#|branch|path] Alias of /code-review: reviews the current diff, or a PR number, branch, or path you pass, such as /review 1234, and takes the same effort levels and flags. With no level given, the review reuses the last low through max level you typed; see Review locally with /code-review for the exact rules. For a deep cloud review, use /code-review ultra. Before v2.1.223, /review was a separate command that ran a single-pass, read-only review of a GitHub pull request by number, listing open PRs to pick from when run with no argument; from v2.1.186 through v2.1.201, it ran the same multi-agent engine as /code-review medium
65 /security-review Analyze pending changes on the current branch for security vulnerabilities. Reviews the diff between your branch and origin's default branch and identifies risks like injection, auth issues, and data exposure. Needs an origin remote
66 /team-onboarding Generate a team onboarding guide from your Claude Code usage history. Claude analyzes your sessions, commands, and MCP server usage from the past 30 days. It produces a markdown guide a teammate can paste as a first message to get set up quickly. For claude.ai subscribers on Team and Enterprise plans, also returns a share link teammates can open directly in Claude Code
67 /ultrareview [PR or branch] Run a deep, multi-agent code review in a cloud sandbox. Pass a PR reference to review that pull request, or a base branch or commit to change the comparison base. The preferred invocation is /code-review ultra, and /ultrareview is an alias. Includes 3 free runs on Pro, Max, and Ultra, then requires usage credits
68 /autofix-pr [prompt] Spawn a cloud session that watches the current branch's PR and pushes fixes when CI fails or reviewers leave comments. Detects the open PR from your checked-out branch with gh pr view; to watch a different PR, check out its branch first. By default the cloud session is told to fix every CI failure and review comment; pass a prompt to give it different instructions, for example /autofix-pr only fix lint and type errors. Requires the gh CLI and access to cloud sessions
69 /desktop Continue the current session in the Claude Code Desktop app. Requires macOS or x64 Windows and a Claude subscription. Alias: /app
70 /install-github-app Install the Claude GitHub App for a repository, with an optional step to set up GitHub Actions workflows and secrets. Walks you through selecting a repo and configuring the integration. Works only with github.com repositories. When your repository's git remote is on gitlab.com or bitbucket.org, the command prints a notice and exits instead of starting setup. To run Claude Code from GitLab pipelines, see GitLab CI/CD
71 /install-slack-app Install the Claude Slack app. Opens a browser to complete the OAuth flow
72 /mobile Show QR code to download the Claude mobile app. Aliases: /ios, /android
73 /remote-control Make this session available for Remote Control from claude.ai. Running it while signed out prints that Remote Control requires a claude.ai subscription and tells you how to sign in. Alias: /rc
74 /remote-env Choose the default cloud environment for cloud sessions you start from the CLI
75 /schedule [description] Create, update, list, or run cloud scheduled tasks, formerly routines. Claude walks you through the setup conversationally. Ask about a scheduled task's recent runs. Alias: /routines
76 /teleport Pull a cloud session into this terminal. Opens a picker, then fetches the branch and conversation. Also available as /tp. Requires a claude.ai subscription
77 /web-setup Connect your GitHub account for cloud sessions using your local gh CLI credentials
78 /artifacts List the artifacts you own or that are shared with you, then attach one to the session, open it in your browser, or copy its link. Available where artifacts are
79 /background [prompt] Detach the current session to run as a background agent and free this terminal. Pass a prompt to send one more instruction before detaching. Monitor the session with claude agents. To copy the conversation into a new background session while this one keeps running, use /fork. Alias: /bg
80 /branch [name] Create a branch of the current conversation at this point, so you can try a different direction without losing the conversation as it stands. Switches you into the branch and preserves the original, which you can return to with /resume. To run a copy as a separate background session instead of switching into it, use /fork; to hand a side task to a subagent that reports back into this conversation, use /subtask
81 /btw [question] Ask a side question about the current session without adding to the conversation. Without a question, Claude Code shows your most recent side question so you can browse earlier answers; if you haven't asked one yet, Claude Code prints a usage line
82 /cd Move this session to a new working directory, keeping the conversation. Type a partial path to see matching directory suggestions; press Tab to accept one. For what Claude Code applies from the new directory and how /cd differs from /add-dir, see the permissions guide
83 /clear [name] Start a new conversation with empty context. Pass a name to label the previous conversation in the /resume picker. To free up context while continuing the same conversation, use /compact instead. Resume the previous conversation with /resume, or, in the same Claude Code process, restore it from the rewind menu's previous-session entry. Aliases: /reset, /new
84 /compact [instructions] Free up context by summarizing the conversation so far. Optionally pass focus instructions for the summary
85 /exit Exit the CLI. In an attached background session, this detaches and the session keeps running. Alias: /quit
86 /fork [prompt] Copy the current conversation into a new background session and keep working here. Pass a prompt and the copy starts working on it immediately; without one it waits in agent view for its first prompt. Except when the copy edits in place, Claude Code instructs it to create a worktree of its own before making code changes; the isolation instruction requires Claude Code v2.1.221 or later. To hand a side task to a subagent whose result comes back into this conversation, use /subtask; to switch into a copy yourself, use /branch. When agent view is turned off, /fork starts a forked subagent instead
87 /goal [condition|clear] Set a goal — Claude keeps working across turns until the condition is met. With no argument, shows the current or most recently achieved goal. clear, stop, off, reset, none, or cancel removes an active goal early
88 /list-agents List the subagents, agent team teammates, and other Claude Code sessions Claude can message, with the name to use for each. Also available as /peers. Requires Claude Code v2.1.224 or later; earlier versions report Unknown command: /list-agents. Teammate rows and the first line showing this session's own name require v2.1.239 or later. Only available where cross-session messaging is enabled
89 /recap Generate a one-line summary of the current session on demand
90 /rename [name] Rename the current session and show the name on the prompt bar. Without a name, auto-generates one from conversation history. Also available in non-interactive mode (-p). Claude Code replaces control and invisible characters in the new name with spaces and caps the name at 200 characters (requires Claude Code v2.1.221 or later). If the name is empty once invisible characters are removed, Claude Code rejects it with That name is empty once invisible characters are removed. Usage: /rename
91 /restart Restart Claude Code and resume this session, which applies an installed update. Run it when the footer offers it after an update installs. Requires a Pro, Max, or Ultra plan and a native install on macOS or Linux, not WSL. Requires Claude Code v2.1.288 or later. Alias: /update
92 /resume [session] Resume a conversation by ID or name, or open the session picker. Background sessions appear in the picker marked with bg. Resuming one that is still running, from the picker or by ID or name, opens that session: your current conversation moves to the background and this terminal attaches to the running one. Press ← on an empty prompt to return to agent view, which also lists the conversation you left. Before v2.1.285, Claude Code refused and told you to open the session with claude attach or stop it first. Alias: /continue
93 /rewind Rewind the conversation and/or code to a previous point, or summarize from a selected message. See checkpointing. Alias: /checkpoint, /undo
94 /stop Stop the background session you're attached to, or the one you send it to as a peek reply; the transcript and any worktree are kept. To detach without stopping, use /exit or press ←
95 /subtask Spawn a forked subagent: a background subagent that inherits the full conversation and works on the task while you keep working. Its result returns to this conversation when it finishes. To copy the conversation into a separate background session instead, use /fork. When agent view is turned off, /subtask isn't available and /fork spawns the forked subagent instead
96 /workflows Open the workflow progress view to watch, pause, resume, or save running and completed workflows

Bundled skills such as /debug can also appear in the slash-command menu, but they are not built-in commands.


Sources