Control Claude’s behavior during an interactive session with slash commands.
Command | Purpose |
---|---|
/add-dir | Add additional working directories |
/agents | Manage custom AI subagents for specialized tasks |
/bug | Report bugs (sends conversation to Anthropic) |
/clear | Clear conversation history |
/compact [instructions] | Compact conversation with optional focus instructions |
/config | View/modify configuration |
/cost | Show token usage statistics |
/doctor | Checks the health of your Claude Code installation |
/help | Get usage help |
/init | Initialize project with CLAUDE.md guide |
/login | Switch Anthropic accounts |
/logout | Sign out from your Anthropic account |
/mcp | Manage MCP server connections and OAuth authentication |
/memory | Edit CLAUDE.md memory files |
/model | Select or change the AI model |
/permissions | View or update permissions |
/pr_comments | View pull request comments |
/review | Request code review |
/status | View account and system statuses |
/terminal-setup | Install Shift+Enter key binding for newlines (iTerm2 and VSCode only) |
/vim | Enter vim mode for alternating insert and command modes |
Parameter | Description |
---|---|
<command-name> | Name derived from the Markdown filename (without .md extension) |
[arguments] | Optional arguments passed to the command |
/help
, these commands show “(project)” after their description.
Location: .claude/commands/
In the following example, we create the /optimize
command:
/help
, these commands show “(user)” after their description.
Location: ~/.claude/commands/
In the following example, we create the /security-review
command:
.claude/commands
) or the user-level directory (~/.claude/commands
).
Conflicts between user and project level commands are not supported. Otherwise,
multiple commands with the same base file name can coexist.
For example, a file at .claude/commands/frontend/component.md
creates the command /frontend:component
with description showing “(project)”.
Meanwhile, a file at ~/.claude/commands/component.md
creates the command /component
with description showing “(user)”.
$ARGUMENTS
placeholder.
For example:
!
prefix. The output is included in the command context. You must include allowed-tools
with the Bash
tool, but you can choose the specific bash commands to allow.
For example:
@
prefix to reference files.
For example:
Frontmatter | Purpose | Default |
---|---|---|
allowed-tools | List of tools the command can use | Inherits from the conversation |
argument-hint | The arguments expected for the slash command. Example: argument-hint: add [tagId] | remove [tagId] | list . This hint is shown to the user when auto-completing the slash command. | None |
description | Brief description of the command | Uses the first line from the prompt |
model | Specific model string (see Models overview) | Inherits from the conversation |
/mcp
command to: