Skip to main content
Slash commands are typed at the Claude Code input prompt during an active session. Every command starts with /.
/command [arguments]
Type /help at any time to see all commands available in the current session, including any added by plugins and skills.

Quick reference

CommandDescription
/initGenerate CLAUDE.md files and optional skills/hooks for the project
/memoryEdit Claude memory files (global, project, local)
/configOpen the settings panel
/hooksView hook configurations for tool events
/mcpManage MCP servers — enable, disable, reconnect
/permissionsManage allow and deny rules for tools
/planEnable plan mode or open/describe the current session plan
/modelSet the AI model for the current session
/commitCreate a git commit with an AI-generated message
/reviewReview a pull request
/skillsList available skills
/compactSummarize conversation history to reduce context usage
/clearClear conversation history and free up context
/helpShow help and available commands
/loginSign in or switch Anthropic accounts
/logoutSign out from your Anthropic account

Project and memory commands

Syntax: /initAnalyzes your codebase and sets up CLAUDE.md file(s), and optionally skills and hooks. Claude surveys key project files — manifests, CI config, build scripts, README — then interviews you to fill in any gaps before writing the output files.What it sets up, depending on your choices:
  • Project CLAUDE.md — team-shared instructions checked into source control. Covers build/test/lint commands, coding conventions, architecture notes, and non-obvious gotchas.
  • Personal CLAUDE.local.md — your private preferences for this project (gitignored). Covers your role, sandbox URLs, communication preferences.
  • Skills (.claude/skills/<name>/SKILL.md) — on-demand workflows you or Claude invoke with /<skill-name>.
  • Hooks (.claude/settings.json) — deterministic shell commands that run automatically on tool events (e.g. format on every edit).
Example:
/init
Run /init again at any time. If CLAUDE.md already exists, Claude will propose specific changes rather than overwriting the file.
Syntax: /memoryOpens an interactive editor for Claude’s memory files. Memory files are loaded into every session and persist across conversations.The three memory scopes are:
ScopeFileWho it applies to
Global~/.claude/CLAUDE.mdYou, across all projects
ProjectCLAUDE.md at project rootEveryone on the team
LocalCLAUDE.local.md at project rootYou, for this project only (gitignored)
Example:
/memory

Configuration commands

Syntax: /configAlias: /settingsOpens the configuration panel where you can view and edit Claude Code settings, including model preferences, theme, verbose mode, and more.Example:
/config
Syntax: /hooksDisplays the hook configurations currently active for this session. Hooks are shell commands that run automatically when tool events occur (e.g. after every file edit, before a Bash command).Example:
/hooks
To create or edit hooks, use /init or edit .claude/settings.json directly. See the hooks guide for the full schema.
Syntax: /mcp [enable|disable [server-name]]Manages MCP (Model Context Protocol) servers for the current session. Without arguments, opens the MCP management panel. With arguments, enables or disables specific servers.
ArgumentEffect
(none)Open the MCP management panel
enableEnable all disabled MCP servers
enable <server-name>Enable a specific server by name
disableDisable all active MCP servers
disable <server-name>Disable a specific server by name
reconnect <server-name>Reconnect to a specific server
Examples:
/mcp
/mcp enable
/mcp enable my-database-server
/mcp disable analytics-server
/mcp reconnect filesystem
To add or remove MCP servers permanently, use the claude mcp CLI subcommand or edit your MCP config file. Changes made with /mcp enable/disable apply for the current session only.
Syntax: /permissionsAlias: /allowed-toolsOpens the permissions panel where you can view and manage allow and deny rules for tools. Rules control which tools Claude can use without prompting (allow rules) and which are blocked entirely (deny rules).Example:
/permissions
Rules use glob-style patterns:
Bash(git:*)         # allow all git commands
Bash(npm:*)         # allow all npm commands
Edit(src/**/*.ts)   # allow edits to TypeScript files in src/
See permissions for the full rule syntax.
Syntax: /model [model]Sets the AI model used for the rest of the session. Without an argument, opens an interactive model picker. With a model name or alias, switches immediately.
ArgumentEffect
(none)Open the interactive model picker
sonnetSwitch to the latest Claude Sonnet
opusSwitch to the latest Claude Opus
haikuSwitch to the latest Claude Haiku
claude-sonnet-4-6Switch to a specific model by full ID
Examples:
/model
/model sonnet
/model claude-opus-4-5

Session management commands

Syntax: /plan [open|<description>]Enables plan mode or manages the current session plan. In plan mode, Claude produces a written plan before taking any action and waits for your approval.
ArgumentEffect
(none)Toggle plan mode on/off
openOpen and display the current plan
<description>Create a new plan with the given description
Examples:
/plan
/plan open
/plan refactor the auth module to use JWT
Plan mode is equivalent to --permission-mode plan at launch. Use it when you want to review what Claude intends to do before any files are touched.
Syntax: /compact [instructions]Summarizes the conversation history and replaces it with a condensed version in context. Use this when the context window is filling up and you want to continue working without starting a new session.An optional argument lets you give Claude specific instructions for how to summarize.Examples:
/compact
/compact focus only on the database schema changes
/compact summarize the last three completed tasks
Syntax: /clearAliases: /reset, /newClears the entire conversation history and frees up context, starting a fresh session in the same working directory. Unlike /compact, this removes all history rather than summarizing it.Example:
/clear
Syntax: /skillsLists all skills available in the current session. Skills are on-demand capabilities defined in .claude/skills/ that you or Claude can invoke with /<skill-name>.Example:
/skills

Git commands

Syntax: /commitCreates a git commit using AI-generated commit message. Claude reads the current git status and diff, analyzes staged and unstaged changes, and drafts a concise commit message that focuses on the “why” rather than the “what”. It then stages the relevant files and creates the commit.Claude follows the existing commit message style in the repository and applies these safety rules:
  • Never amends existing commits (always creates a new commit)
  • Never skips hooks (--no-verify)
  • Never commits files that likely contain secrets (.env, credentials files)
  • Does not create empty commits when there are no changes
Example:
/commit
/commit only has access to git add, git status, and git commit. It cannot push, rebase, or run other git operations.
Syntax: /review [PR-number]Runs an AI code review on a pull request using the GitHub CLI (gh). Without a PR number, Claude runs gh pr list to show open PRs. With a PR number, it fetches the PR details and diff, then provides a structured review covering:
  • Overview of what the PR does
  • Code quality and style analysis
  • Specific improvement suggestions
  • Potential issues or risks
  • Performance, test coverage, and security considerations
Examples:
/review
/review 142
/review requires the GitHub CLI (gh) to be installed and authenticated.

Account and help commands

Syntax: /helpShows help and lists all slash commands available in the current session, including built-in commands, skill commands, and any commands added by installed plugins.Example:
/help
Syntax: /loginSigns in to your Anthropic account or switches between accounts. Opens a browser-based OAuth flow if not already authenticated, or presents the account switcher if you are.Example:
/login
Syntax: /logoutSigns out from your Anthropic account. After logging out, Claude Code will prompt you to authenticate again on the next session.Example:
/logout

Custom skill commands

When you or a plugin author creates a skill in .claude/skills/<skill-name>/SKILL.md, it becomes available as /<skill-name> in any session where that skill is loaded.
/verify
/deploy staging
/fix-issue 123
Run /skills to see all loaded skills and their descriptions. See the skills guide for how to create your own.