Skip to main content
Commands control Claude Code from inside a session. They provide a quick way to switch models, manage permissions, clear context, run a workflow, and more. Type / to see the commands available to you, or type / followed by letters to filter. How the command menu matches what you type covers highlighting, typos, and the few commands Claude Code hides from the menu until you type their full name. A command is only recognized at the start of your message. Text that follows the command name becomes its arguments. As of v2.1.199, skills are the exception: a skill invocation followed by more skills, such as /skill-a /skill-b do XYZ, loads every skill named at the start and passes the trailing text to each as arguments. Up to six skills can be chained. If you send a command while Claude is responding, Claude Code queues it and runs it after the current turn finishes. Claude Code runs some commands immediately without interrupting the response, such as /status, /tasks, and /usage. In fullscreen rendering, Claude Code also opens dialog commands such as /theme and /help immediately. Before v2.1.234, Claude Code queued those dialogs until the turn finished.

Commands across a typical workflow

Most commands are useful at a specific point in a session, from setting up a project to shipping a change. First session in a repo. Run /init to generate a starter CLAUDE.md, then /memory to refine it. Use /mcp to set up any servers the project needs, ask Claude to create any subagents you want, and run /permissions to set your approval rules. During a task. /plan switches into plan mode before a large change. /model and /effort adjust which model you’re using and how much reasoning it applies. When the conversation gets long, /context shows what’s filling the window and /compact summarizes it to free space. Use /btw for a side question that shouldn’t add to the conversation history. Run work in parallel. Claude delegates side tasks to subagents, and /tasks lists the current session’s background work, including subagents that have finished. /background detaches the whole session to keep running as a background agent and frees your terminal. For a large change that spans the codebase, /batch decomposes it into independent units and runs each in its own worktree. See Run agents in parallel for how these approaches relate. Before you ship. /diff shows what changed. /code-review checks the current diff for correctness bugs and cleanups and can apply the findings with --fix; pass a PR number, such as /code-review high 1234, to review a pull request instead. /review is an alias. /code-review ultra runs a multi-agent review in the cloud. /security-review checks the diff for security vulnerabilities. Between sessions. /clear starts fresh on a new task while keeping project memory. /resume returns to an earlier conversation, /branch branches the current one to try a different direction, and /fork copies it into a new background session. /teleport pulls a web session into this terminal, and /remote-control lets you continue this local session from another device. When something is wrong. /rewind rolls code and conversation back to a checkpoint, or summarizes part of the conversation. /doctor runs a setup checkup that diagnoses installation and configuration issues and can fix them, /debug diagnoses runtime issues, and /feedback reports a bug with session context attached.

All commands

The table below lists all the commands included in Claude Code. Most are built-in commands whose behavior is coded into the CLI. Two kinds of entries are marked:
  • Skill: a bundled skill. It works like skills you write yourself: a prompt handed to Claude, which Claude can also invoke automatically when relevant.
    • /verify runs only when you invoke it. Before v2.1.215, Claude could also run /verify on its own.
  • Workflow: a bundled dynamic workflow that fans work out across many subagents and runs in the background.
    • /deep-research runs only when you invoke it. Before v2.1.218, Claude could also start it on its own.
To add your own commands, see skills. In the table below, <arg> indicates a required argument and [arg] indicates an optional one.
Not every command appears for every user. Availability depends on your platform, plan, and environment. For example, /desktop only shows on macOS and x64 Windows when signed in with a Claude subscription, and /upgrade doesn’t show on Enterprise plans.

How the command menu matches what you type

Claude Code filters the / menu as you type. Each bullet below covers one thing you might notice while filtering:
  • Highlighting: Claude Code highlights the top suggestion only when the letters after the / match a command’s name or alias, from the start of the name or from a word within it, ignoring the :, _, and - separators. Typing /adddir highlights /add-dir, and typing /new highlights /clear through its alias. Press Enter to run the highlighted suggestion.
  • After a typo: Claude Code highlights nothing. The close matches stay listed, and you can pick one with Tab or the arrow keys, but Enter submits your text as typed and reports Unknown command.
  • Commands that aren’t available to you: Claude Code leaves them out of the menu. When nothing matches, Claude Code shows No commands match "/name". Most unavailable commands return Unknown command when you submit them; a few, such as /schedule on a Console API key, answer with their own availability message instead.
  • Hidden commands: Claude Code keeps a few available commands, such as /heapdump, out of the menu by design. A partial name never brings a hidden command into the menu: if the partial matches nothing visible, Claude Code shows the same no-match message. Claude Code lists the command only once you’ve typed its full name, and submitting the full name runs it.

MCP prompts

MCP servers can expose prompts that appear as commands. These use the format /mcp__<server>__<prompt> and are dynamically discovered from connected servers. See MCP prompts for details.

See also