Skip to content

Commands Best Practice

Last Updated: Apr 04, 2026 | Claude Code v2.1.92

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

Frontmatter Fields (13)

FieldTypeRequiredDescription
namestringNoDisplay name and /slash-command identifier. Defaults to the directory name if omitted
descriptionstringRecommendedWhat the command does. Shown in autocomplete and used by Claude for auto-discovery
argument-hintstringNoHint shown during autocomplete (e.g., [issue-number], [filename])
disable-model-invocationbooleanNoSet true to prevent Claude from automatically invoking this command
user-invocablebooleanNoSet false to hide from the / menu -- command becomes background knowledge only
pathsstring/listNoGlob 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
allowed-toolsstringNoTools allowed without permission prompts when this command is active
modelstringNoModel to use when this command runs (e.g., haiku, sonnet, opus)
effortstringNoOverride the model effort level when invoked (low, medium, high, max)
contextstringNoSet to fork to run the command in an isolated subagent context
agentstringNoSubagent type when context: fork is set (default: general-purpose)
shellstringNoShell for !`command` blocks -- accepts bash (default) or powershell. Requires CLAUDE_CODE_USE_POWERSHELL_TOOL=1
hooksobjectNoLifecycle hooks scoped to this command

Official Built-in Commands (65)

Auth

#CommandDescription
1/loginSign in to your Anthropic account
2/logoutSign out from your Anthropic account
3/setup-bedrockConfigure Amazon Bedrock authentication, region, and model pins through an interactive wizard. Only visible when CLAUDE_CODE_USE_BEDROCK=1 is set. First-time Bedrock users can also access this wizard from the login screen
4/upgradeOpen the upgrade page to switch to a higher plan tier

Config

#CommandDescription
5/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
6/configOpen the Settings interface to adjust theme, model, output style, and other preferences. Alias: /settings
7/keybindingsOpen or create your keybindings configuration file
8/permissionsManage 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. Alias: /allowed-tools
9/privacy-settingsView and update your privacy settings. Only available for Pro and Max plan subscribers
10/sandboxToggle sandbox mode. Available on supported platforms only
11/statuslineConfigure Claude Code's status line. Describe what you want, or run without arguments to auto-configure from your shell prompt
12/stickersOrder Claude Code stickers
13/terminal-setupConfigure terminal keybindings for Shift+Enter and other shortcuts. Only visible in terminals that need it, like VS Code, Alacritty, or Warp
14/themeChange the color theme. Includes light and dark variants, colorblind-accessible (daltonized) themes, and ANSI themes that use your terminal's color palette
15/voiceToggle push-to-talk voice dictation. Requires a Claude.ai account

Context

#CommandDescription
16/contextVisualize current context usage as a colored grid. Shows optimization suggestions for context-heavy tools, memory bloat, and capacity warnings
17/costShow token usage statistics. See cost tracking guide for subscription-specific details
18/extra-usageConfigure extra usage to keep working when rate limits are hit
19/insightsGenerate a report analyzing your Claude Code sessions, including project areas, interaction patterns, and friction points
20/statsVisualize daily usage, session history, streaks, and model preferences
21/statusOpen the Settings interface (Status tab) showing version, model, account, and connectivity. Works while Claude is responding, without waiting for the current response to finish
22/usageShow plan usage limits and rate limit status

Debug

#CommandDescription
23/doctorDiagnose and verify your Claude Code installation and settings
24/feedback [report]Submit feedback about Claude Code. Alias: /bug
25/helpShow help and available commands
26/powerupDiscover Claude Code features through quick interactive lessons with animated demos
27/release-notesView the changelog in an interactive version picker. Select a specific version to see its release notes, or choose to show all versions
28/tasksList and manage background tasks. Alias: /bashes

Export

#CommandDescription
29/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 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
30/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

Extensions

#CommandDescription
31/agentsManage agent configurations
32/chromeConfigure Claude in Chrome settings
33/hooksView hook configurations for tool events
34/ideManage IDE integrations and show status
35/mcpManage MCP server connections and OAuth authentication
36/pluginManage Claude Code plugins
37/reload-pluginsReload all active plugins to apply pending changes without restarting. Reports counts for each reloaded component and flags any load errors
38/skillsList available skills

Memory

#CommandDescription
39/memoryEdit CLAUDE.md memory files, enable or disable auto-memory, and view auto-memory entries

Model

#CommandDescription
40/effort [low|medium|high|max|auto]Set the model effort level. low, medium, and high persist across sessions. max applies to the current session only and requires Opus 4.6. auto resets to the model default. Without an argument, shows the current level. Takes effect immediately without waiting for the current response to finish
41/fast [on|off]Toggle fast mode on or off
42/model [model]Select or change the AI model. For models that support it, use left/right arrows to adjust effort level. The change takes effect immediately without waiting for the current response to finish
43/passesShare a free week of Claude Code with friends. Only visible if your account is eligible
44/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
45/ultraplan <prompt>Draft a plan in an ultraplan session, review it in your browser, then execute remotely or send it back to your terminal

Project

#CommandDescription
46/add-dir <path>Add a new working directory to the current session
47/diffOpen an interactive diff viewer showing uncommitted changes and per-turn diffs. Use left/right arrows to switch between the current git diff and individual Claude turns, and up/down to browse files
48/initInitialize 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
49/reviewDeprecated. Install the code-review plugin instead: claude plugin install code-review@claude-plugins-official
50/security-reviewAnalyze pending changes on the current branch for security vulnerabilities. Reviews the git diff and identifies risks like injection, auth issues, and data exposure

Remote

#CommandDescription
51/desktopContinue the current session in the Claude Code Desktop app. macOS and Windows only. Alias: /app
52/install-github-appSet up the Claude GitHub Actions app for a repository. Walks you through selecting a repo and configuring the integration
53/install-slack-appInstall the Claude Slack app. Opens a browser to complete the OAuth flow
54/mobileShow QR code to download the Claude mobile app. Aliases: /ios, /android
55/remote-controlMake this session available for remote control from claude.ai. Alias: /rc
56/remote-envConfigure the default remote environment for web sessions started with --remote
57/schedule [description]Create, update, list, or run Cloud scheduled tasks. Claude walks you through the setup conversationally

Session

#CommandDescription
58/branch [name]Create a branch of the current conversation at this point. Alias: /fork
59/btw <question>Ask a quick side question without adding to the conversation
60/clearClear conversation history and free up context. Aliases: /reset, /new
61/compact [instructions]Compact conversation with optional focus instructions
62/exitExit the CLI. Alias: /quit
63/rename [name]Rename the current session and show the name on the prompt bar. Without a name, auto-generates one from conversation history
64/resume [session]Resume a conversation by ID or name, or open the session picker. Alias: /continue
65/rewindRewind the conversation and/or code to a previous point, or summarize from a selected message. See checkpointing. Alias: /checkpoint

INFO

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

Sources