/.
Quick reference
| Command | Description |
|---|---|
/init | Generate CLAUDE.md files and optional skills/hooks for the project |
/memory | Edit Claude memory files (global, project, local) |
/config | Open the settings panel |
/hooks | View hook configurations for tool events |
/mcp | Manage MCP servers — enable, disable, reconnect |
/permissions | Manage allow and deny rules for tools |
/plan | Enable plan mode or open/describe the current session plan |
/model | Set the AI model for the current session |
/commit | Create a git commit with an AI-generated message |
/review | Review a pull request |
/skills | List available skills |
/compact | Summarize conversation history to reduce context usage |
/clear | Clear conversation history and free up context |
/help | Show help and available commands |
/login | Sign in or switch Anthropic accounts |
/logout | Sign out from your Anthropic account |
Project and memory commands
/init
/init
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).
/memory
/memory
Syntax:
Example:
/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:| Scope | File | Who it applies to |
|---|---|---|
| Global | ~/.claude/CLAUDE.md | You, across all projects |
| Project | CLAUDE.md at project root | Everyone on the team |
| Local | CLAUDE.local.md at project root | You, for this project only (gitignored) |
Configuration commands
/config
/config
Syntax:
/configAlias: /settingsOpens the configuration panel where you can view and edit Claude Code settings, including model preferences, theme, verbose mode, and more.Example:/hooks
/hooks
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:To create or edit hooks, use
/init or edit .claude/settings.json directly. See the hooks guide for the full schema./mcp
/mcp
Syntax:
Examples:
/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.| Argument | Effect |
|---|---|
| (none) | Open the MCP management panel |
enable | Enable all disabled MCP servers |
enable <server-name> | Enable a specific server by name |
disable | Disable all active MCP servers |
disable <server-name> | Disable a specific server by name |
reconnect <server-name> | Reconnect to a specific server |
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./permissions
/permissions
Syntax: Rules use glob-style patterns:See permissions for the full rule 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:/model
/model
Syntax:
Examples:
/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.| Argument | Effect |
|---|---|
| (none) | Open the interactive model picker |
sonnet | Switch to the latest Claude Sonnet |
opus | Switch to the latest Claude Opus |
haiku | Switch to the latest Claude Haiku |
claude-sonnet-4-6 | Switch to a specific model by full ID |
Session management commands
/plan
/plan
Syntax:
Examples:
/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.| Argument | Effect |
|---|---|
| (none) | Toggle plan mode on/off |
open | Open and display the current plan |
<description> | Create a new plan with the given description |
/compact
/compact
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:/clear
/clear
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:/skills
/skills
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:Git commands
/commit
/commit
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
/commit only has access to git add, git status, and git commit. It cannot push, rebase, or run other git operations./review
/review
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
/review requires the GitHub CLI (gh) to be installed and authenticated.Account and help commands
/help
/help
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:/login
/login
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:/logout
/logout
Syntax:
/logoutSigns out from your Anthropic account. After logging out, Claude Code will prompt you to authenticate again on the next session.Example: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.
/skills to see all loaded skills and their descriptions. See the skills guide for how to create your own.