← All guides
CommandsSetup

Claude Code Slash Commands: The Complete List (Built-In + Custom)

Neo ZinoBy Neo Zino - builder of ClockedCode16 min read

Every built-in Claude Code slash command by category, how to write your own (now merged with skills), the exact argument syntax, and why one might not show up.

Claude Code Slash Commands: The Complete List (Built-In + Custom)

Made with DispatchSEO

On this page

A Claude Code slash command is a /word you type at the start of a message to trigger a specific action instead of writing a prompt. Some are built in and run fixed logic straight from the CLI - /compact, /model, /config - while others are bundled skills that hand Claude a detailed set of instructions to follow, like /code-review or /debug. You can also write your own: save a file, and it becomes a working slash command the moment Claude Code notices it.

TL;DR: Claude Code ships 89 active built-in commands across nine rough categories (session control, memory, model/context, code review, workflow, permissions, MCP/plugins, design, and everything else) - the full tables are below. Writing your own no longer means learning a separate "custom commands" system: a file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md create the identical /deploy command, arguments and all. Pass input with $ARGUMENTS, $1/$2, or a named $issue from the frontmatter, and if a command you wrote won't show up, claude plugin validate on its directory is the fastest way to find out why.

Every built-in slash command, by category

Built-in commands, by category

89 active commands
  • Session & conversation control

    13

    /clear, /resume, /rewind, /fork

  • Memory & project setup

    4

    /init, /memory, /doctor

  • Model, context & performance

    8

    /model, /effort, /compact

  • Code quality & review

    11

    /code-review, /verify, /simplify

  • Workflow & automation

    6

    /plan, /goal, /loop, /worktree

  • Permissions, hooks & config

    5

    /permissions, /hooks, /config

  • MCP, plugins & agents

    5

    /mcp, /plugin, /list-agents

  • Design & visualization

    4

    /design, /design-sync, /dataviz

  • Account, device & everything else

    33

    /login, /theme, /usage, /bug

Counted from code.claude.com's commands reference on Claude Code 2.1.258, excluding one command marked removed. New releases add rows often - the tables below link back to the live reference.

code.claude.com's own commands reference is one long alphabetical table with no section headers - the groupings below are this guide's own read of that table, done by counting every row while writing this guide on Claude Code 2.1.258. One listed command, /pr-comments, is marked removed as of v2.1.91 and isn't counted below; ask Claude to view PR comments directly instead.

Session & conversation control (13)

CommandWhat it does
/clear [name]Start a fresh conversation with empty context, keeping project memory. Aliases: /reset, /new
/resume [name]Return to an earlier conversation by name or number
/rewind [turn|checkpoint]Roll back code and conversation to an earlier turn or checkpoint
/branch [name]Branch the conversation at this point to try a different direction
/fork [prompt]Copy the conversation into a new background session; keep working here
/subtask [agent] <prompt>Hand a side task to a subagent that reports its result back into this conversation
/background [prompt]Detach the session to run as a background agent. Alias: /bg
/cd <path>Move the session to a new working directory, keeping the conversation
/add-dir <path>Grant file access to another directory for this session
/rename [name]Rename the current session in agent view
/tasksList this session's background work: subagents and workflows, running or finished
/statusShow the current model, effort level, working directory, and uncommitted-change count
/exitExit the CLI (detaches, doesn't stop, a background session). Alias: /quit

Memory & project setup (4)

CommandWhat it does
/initScaffold a CLAUDE.md for the project by scanning the codebase
/memoryEdit CLAUDE.md files and manage auto memory entries
/import [codex|gemini]Bring instructions, MCP servers, commands, and skills over from another coding agent
/doctorSkill. Setup checkup: install health, unused skills/MCP servers, slow hooks, oversized CLAUDE.md. Alias: /checkup

Model, context & performance (8)

CommandWhat it does
/model [model]Switch the active model and save it as your default
/effort [level|auto|status]Set effort from low to xhigh, plus max and auto
/advisor [model|off]Toggle a second model that consults on guidance at key moments
/context [all]Visualize context usage as a colored grid, with optimization suggestions
/compact [instructions]Summarize the conversation so far to free up context
/autocompact [auto|<tokens>]Set how full the context window gets before auto-compacting
/fast [on|off]Toggle fast mode for the session
/sampling-settingsSkill. Adjust temperature and sampling for responses

Code quality & review (11)

CommandWhat it does
/code-review [level] [--fix] [--comment] [pr#|branch|path]Skill. Review a diff or PR for bugs and cleanup opportunities. Alias: /review
/security-review [--fix] [--comment] [pr#|branch|path]Skill. Review a diff or PR for security vulnerabilities
/simplify [--fix] [--comment] [path|function]Skill. Refactor uncommitted changes, a path, or a function for readability
/type-check [path]Skill. Run the project's type checker and fix what it flags
/verify [--fix] [path]Skill. Verify correctness by running tests or validation rules, on request only
/repro [details]Skill. Generate a minimal reproducible example for a bug
/start-tests [description]Skill. Start a background workflow that writes and runs tests continuously
/watch <prompt>Skill. Rerun a prompt every time watched files change
/diffOpen an interactive viewer for uncommitted changes and per-turn diffs
/batch <instruction>Skill. Decompose a large change into units, then run one subagent per unit in its own worktree
/debug [description]Skill. Turn on debug logging and troubleshoot from the session log

Workflow & automation (6)

CommandWhat it does
/plan [description]Enter plan mode, optionally starting on a specific task
/goal [condition|clear]Set a condition Claude keeps working toward across turns
/loop [interval] [prompt]Skill. Run a prompt repeatedly, self-paced or on a fixed interval. Alias: /proactive
/deep-research <question>Workflow. Fan out web searches and synthesize a cited report
/worktree [subcommand]Create, list, or remove git worktrees for parallel work
/autofix-pr [prompt]Watch the current branch's PR and push fixes when CI or reviewers flag something

Permissions, hooks & config (5)

CommandWhat it does
/permissionsManage allow/ask/deny rules for tools, by scope. Alias: /allowed-tools
/hooksView hook configurations for tool events
/config [key=value]Open the settings interface, or set a key directly. Alias: /settings
/fewer-permission-promptsSkill. Scan transcripts for safe read-only calls and allowlist them
/auto-mode-setupDraft autoMode.environment entries from the project and recent sessions

MCP, plugins & agents (5)

CommandWhat it does
/mcp [reconnect|enable|disable]Manage MCP server connections and OAuth authentication
/plugin [subcommand]Install, enable, disable, or list plugins
/reload-pluginsReload plugins without restarting the session
/agentsPrompts you to ask Claude to manage subagents, or edit .claude/agents/ directly
/list-agentsList subagents, agent-team teammates, and sessions Claude can message. Alias: /peers

Design & visualization (4)

CommandWhat it does
/design [brief]Skill. Draft UI mockups or screens as an editable artifact
/design-sync [hint]Skill. Upload your repo's React design system to Claude Design
/design-loginAuthorize design-system access for /design-sync
/dataviz [request]Skill. Chart and dashboard design guidance: form, color, accessibility

Account, device & everything else (33)

CommandWhat it does
/login / /logoutSign in or out of your Anthropic account
/desktopContinue the session in the Claude Code Desktop app. Alias: /app
/mobileShow a QR code for the Claude mobile app. Aliases: /ios, /android
/teleport [session]Pull a Claude Code on the web session into this terminal
/remote-control [on|off]Continue this local session from another device via claude.ai/code
/chromeConfigure Claude in Chrome
/ideManage IDE integrations and show status
/theme [light|dark|auto]Set the display theme
/color [color|default]Set the prompt bar color for the session
/keybindingsOpen the keyboard shortcuts file
/privacy-settingsView and update privacy settings (Pro/Max only)
/passesShare a free week of Claude Code, if your account is eligible
/radioOpen Claude FM lo-fi radio in your browser
/powerupInteractive lessons on Claude Code features
/insightsGenerate an HTML report on your recent local usage
/transcriptOpen the session transcript in your default text editor
/export [filename]Export the conversation as plain text
/copy [N]Copy the last (or Nth-latest) assistant response to the clipboard
/usageShow session token usage and cost. Alias: /cost
/btw [question]Ask a side question without adding it to the conversation
/bug [report]Report a bug, with a consent screen before anything sends. Alias: /share
/feedback [report]Send product feedback, or review Claude-drafted feedback
/install-github-appInstall the Claude GitHub App for a repository
/install-slack-appInstall the Claude Slack app
/sync-github-appSync GitHub App integration config from the web to the CLI
/upgradeUpgrade to the latest version on your release channel. Alias: /update
/release-notesShow recent release notes and version history
/helpShow help and available commands
/heapdumpWrite a memory diagnostics snapshot. Hidden from the menu - type it in full
/claude-api [subcommand]Skill. Load Claude API reference material, or run migrate, upgrade, cost-optimize
/focusToggle a condensed view: last prompt, one-line tool summary, final response
/artifactsList, attach, or open artifacts you own or that are shared with you

That table (and the ones above it) is a direct count of code.claude.com's commands reference, not a copy of its wording - always check the official reference for the exact current text, since new commands land nearly every release.

How to create a custom slash command

Save a markdown file and it becomes a slash command - that's still true, and still the fastest path if you just want /your-name to exist. Create .claude/commands/your-name.md (project-only) or ~/.claude/commands/your-name.md (every project), add a description in YAML frontmatter, and write what you want Claude to do underneath:

---
description: Draft PR description bullets from the current diff and recent commits
---

## Diff
!`git diff main...HEAD`

## Your task
From the diff above, write 3-5 bullet points for a PR description.

That !`git diff main...HEAD` line runs before Claude ever sees the file - the command's actual output replaces the placeholder, so the instructions arrive with your real diff already inlined. Save the file and /your-name works immediately, no restart needed.

The fuller version of this - every frontmatter field, SKILL.md's supporting-files directory, invocation control, running a command as a subagent - lives in ClockedCode's Claude Code skills guide, since as of recent Claude Code releases that's the same system this section is describing. If you'd rather answer seven quick questions than write the frontmatter by hand, the free custom commands generator does the same job with a live preview.

Are custom commands and skills the same thing now?

Yes, and it's the detail that trips up anyone whose mental model is a year old: custom commands were folded into the skills system. A file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy and run identically - your existing .claude/commands/ files keep working exactly as they are, with nothing to migrate. What a SKILL.md adds on top is optional: a directory for supporting reference files, frontmatter fields like disable-model-invocation to control who can trigger it, and the ability for Claude to load it automatically when your request matches its description - a .claude/commands/*.md file only ever runs when you type its name.

If a command and a skill share a name, the skill wins. And if you only take one thing from this section: there's no reason to keep writing new commands the old way. .claude/commands/ isn't deprecated, but every feature this guide covers past this point - named arguments, invocation control, running as a subagent - only exists on the SKILL.md side.

How arguments work in a custom slash command

Everything typed after the command name is available as $ARGUMENTS inside the command body. Running /fix-issue 123 against a command containing Fix GitHub issue $ARGUMENTS following our coding standards sends Claude that exact sentence with 123 substituted in.

Every argument placeholder a command body accepts

7 forms
  • $ARGUMENTS

    Everything typed after the command name, as one string.

    /fix-issue 123 -> "123"
  • $ARGUMENTS[N]

    One argument by 0-based index.

    $ARGUMENTS[0] -> the first word
  • $N

    Shorthand for $ARGUMENTS[N].

    $0 first, $1 second, $2 third
  • $name

    A named argument declared in the frontmatter's arguments: list.

    arguments: [issue, branch] -> $issue, $branch
  • !`command`

    Runs a shell command before Claude sees the file; output replaces the placeholder.

    !`git diff HEAD`
  • ```! block

    Same as !`command`, for a multi-line script instead of one inline command.

    a fenced block of shell lines
  • \$1

    Escapes a placeholder so it reaches Claude as literal text, e.g. in prose about pricing.

    \$1.00 -> "$1.00", not an argument

From code.claude.com's skills reference (the system custom commands now share) - every field a bare $ARGUMENTS list leaves out.

Quote a multi-word value to pass it as one argument - /my-command "hello world" second makes $0 expand to hello world and $1 to second. An indexed placeholder with nothing at its position, like $2 when only one argument was given, is left in the text unchanged rather than turning into an empty string; a named placeholder from arguments: does the opposite and quietly becomes empty. Worth knowing before you ship a command that silently does the wrong thing when someone forgets an argument.

When a slash command is the wrong tool

  • The trigger should be automatic, not typed. A command only runs when someone types its name. If you want Claude to reach for the instructions on its own whenever a request matches, that's the default behavior for a skill without disable-model-invocation set - see the skills guide for the invocation controls.
  • It needs to fire on every tool call, not on request. A slash command is something a person or Claude chooses to run. Something that must happen every time regardless of what's decided - blocking a dangerous command, logging every edit - is a hook's job, not a command's.
  • It's a fact true on every turn. A command's content only reaches Claude when it's invoked. A standing fact about the project belongs in CLAUDE.md, where it's loaded every time without anyone having to remember to type anything.
  • It needs to call an external system. A command is prose Claude follows with the tools it already has - it can't add a new capability. Talking to a live API, a database, or a ticketing system is an MCP server's job.

Why a slash command isn't showing up or isn't working

Most of the time it's one of four things, roughly in order of how often each one turns out to be it:

  1. Malformed frontmatter YAML. Claude Code still loads the file and /your-name still runs, but with empty metadata - so Claude has no description to automatically match your requests against. Run claude plugin validate .claude/commands (or .claude/skills) to find the exact parse error, or start with claude --debug to watch it load.
  2. A name collision. Enterprise beats personal beats project; any of those beats a bundled command; a skill beats a same-named .claude/commands/*.md file. If /deploy isn't doing what you expect, something with the same name and higher priority is probably winning.
  3. A brand-new top-level skills folder. Live editing an existing .claude/skills/ or .claude/commands/ directory picks up changes immediately, mid-session. Creating the first one in a project that didn't have it yet needs a session restart before Claude Code starts watching it.
  4. It's plainly platform- or plan-gated, and you haven't noticed. A handful of built-in commands only show up under specific conditions - /desktop only on macOS or x64 Windows with a subscription, /upgrade only when an update exists and never on Enterprise, /heapdump hidden from the menu on purpose. Typing the full name still works for a hidden command even though it won't appear as you type /.

FAQ

How many slash commands does Claude Code have?

89 active built-in commands as of Claude Code 2.1.258, counted directly from the official commands reference (a 90th, /pr-comments, is listed but marked removed). That number grows with nearly every release, so treat it as a snapshot rather than a permanent count.

Are custom slash commands the same as skills now?

Functionally yes. A file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy and behave the same way - custom commands were folded into the skills system. The old .claude/commands/ location still works; skills just add optional extras like a directory for supporting files and finer invocation control.

How do I pass arguments to a custom slash command?

Everything typed after the command name is available as $ARGUMENTS in the command body. To use individual words, $1 and $2 (or $ARGUMENTS[0] and $ARGUMENTS[1]) pull out the first and second argument by position, and a named arguments: list in the frontmatter lets you reference them as $issue or $branch instead of by number.

Why isn't my custom slash command showing up?

The most common cause is malformed frontmatter YAML: Claude Code still loads the file, but with empty metadata, so the command works when typed by name but Claude has no description to match against for automatic use. Run claude plugin validate on the .claude/commands or .claude/skills directory to find the exact parse error, or start Claude Code with --debug.

Can I create my own slash commands in Claude Code?

Yes. Save a markdown file to .claude/commands/your-name.md, or a SKILL.md to .claude/skills/your-name/SKILL.md for the fuller feature set, and it becomes /your-name the moment the file exists. ClockedCode's free custom commands generator asks 7 quick questions and hands back a working command file with valid frontmatter.


Ninety commands is too many to hold in your head, which is exactly why /help and typing / to filter exist - this list is for the moment you need to know a command is real before you go looking for it, or that the thing you want (self-paced background loops, a subagent that reports back without detaching, a hidden memory diagnostic) already shipped under a name you hadn't tried yet. ClockedCode's curated setup and free generators exist for the same reason: less time rediscovering what Claude Code already does, more time using it.