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 every command available to you, or type / followed by letters to filter. 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, it queues and runs after the current turn finishes. Some commands, such as /status, /tasks, and /usage, run immediately without interrupting the response.

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 quick aside 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 diff for correctness bugs and cleanups and can apply the findings with --fix, /review gives a fast single-pass, read-only review of a GitHub pull request, /code-review <level> <pr#> runs a multi-agent review of one, and /security-review checks the diff for security vulnerabilities. /code-review ultra runs a multi-agent review in the cloud. 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.
  • Workflow: a bundled dynamic workflow that fans work out across many subagents and runs in the background.
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 Windows when signed in with a Claude subscription, and /upgrade doesn’t show on Enterprise plans.

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