Skip to main content
Slash commands are short directives you type directly in the Claude Code prompt, prefixed with /. They control session state, configuration, integrations, and tooling — without consuming any AI tokens. Claude never sees them; they are intercepted and handled locally before the message is sent to the model.
# Type a slash command at any Claude Code prompt
> /clear
> /compact focus on the authentication logic
> /model claude-opus-4-5
Commands are available in the interactive REPL (claude). Most are not available in non-interactive / pipe mode unless the entry in the table below notes supportsNonInteractive: true.

All commands by category

CommandAliasesDescription
/clearreset, newClear conversation history and free up context
/compact [instructions]Summarise conversation history and continue with a compact context
/resume [id or search]continueList and resume a previous conversation session
/contextVisualise context window usage as a coloured grid
/costShow total API cost and duration for the current session
/usageShow plan usage limits (claude.ai subscribers)
/exportExport current conversation to a file
/rewindRewind to an earlier point in the conversation
/exitquitExit the REPL
CommandAliasesDescription
/configsettingsOpen the interactive configuration panel
/model [model]Switch the active AI model
/memoryEdit CLAUDE.md project memory files
/plan [open|description]Enable plan mode or view the current session plan
/themeChange the UI colour theme
/vimToggle between Vim and Normal editing modes
/effort [level]Set reasoning effort level (low, medium, high, max, auto)
/statusShow version, model, account, API connectivity, and tool status
/doctorDiagnose and verify your Claude Code installation
/permissionsallowed-toolsManage allow/deny tool permission rules
/hooksView hook configurations for tool events
/keybindingsView and manage keyboard shortcuts
/sandboxToggle or configure sandbox restrictions
/initCreate or improve a CLAUDE.md for the current repository
CommandAliasesDescription
/mcp [enable|disable [server]]Manage MCP server connections
/loginSign in to your Anthropic account
/logoutSign out from your Anthropic account
/installInstall or reinstall the Claude Code native binary
/install-github-appSet up Claude GitHub Actions for a repository
/install-slack-appInstall the Claude Slack app
/desktopappContinue the current session in Claude Desktop
/ideConnect to an IDE integration
/feedback [report]bugSubmit feedback or report a bug
/upgradeUpgrade to Max plan for higher rate limits (claude.ai)
CommandAliasesDescription
/agentsManage agent configurations
/review [PR number]Review an open pull request
/tasksView and manage background tasks
/add-dir [path]Add an additional working directory
/branchManage git branches
/diffShow current git diff
/skillsView and manage loaded skills
/pluginManage Claude Code plugins
CommandAliasesDescription
/helpShow help and available commands
/versionPrint the current Claude Code version
/statusShow full runtime status summary
/doctorRun installation diagnostics
/release-notesView release notes for the current version
/insightsGenerate a usage analytics report for your sessions
/statsShow session statistics

How slash commands work

1

Input interception

When you press Enter after typing /command, Claude Code intercepts the input before it reaches the AI model. The command name is matched against the built-in command registry.
2

Argument parsing

Everything after the command name is passed as a raw argument string to the command handler. Commands that accept arguments document them with an argumentHint, visible in autocomplete.
3

Local execution

The command runs locally — modifying session state, opening a UI panel, or performing a system operation. No API call is made unless the command itself triggers one (e.g. /compact).
4

Return to prompt

After the command completes, the REPL returns to the input prompt, ready for the next message or command.

Custom slash commands (skills)

In addition to built-in commands, Claude Code loads skills from:
  • .claude/commands/ in the current project directory
  • ~/.claude/commands/ in your home directory
Skills are Markdown or MDX files whose filename becomes the command name. Place them in .claude/commands/ to make them available as slash commands.
.claude/
└── commands/
    ├── deploy.md          # available as /deploy
    └── generate-tests.md  # available as /generate-tests

Build docs developers (and LLMs) love