Published Nov 9, 2026 ⦁ 24 min read

Claude Code Commands: The Complete Cheat Sheet (November 2026)

Claude Code commands come in four kinds: slash commands you type inside a session (/clear, /model, /code-review), CLI commands and flags you pass when you start claude from your shell (claude -p, claude -c, --model), keyboard shortcuts and input prefixes (Esc Esc, Shift+Tab, !, @), and custom commands you write yourself as Markdown files. This page lists all of them in scannable tables first, then shows how to build your own, with seven complete custom commands you can paste into a repo today. Everything here is checked against the Claude Code docs in November 2026 (up to Claude Code v2.1.319), so it also flags what changed: custom commands merged into skills, /vim and /pr-comments were removed, and the # memory shortcut is gone.

6
Skills you can chain at the start of one message, e.g. /write-tests /fix-issue 123
1,536
Characters of a skill's description + when_to_use kept in the skill listing
5,000
Tokens of each invoked skill re-attached after auto-compaction (25,000 total)
2 min
Default timeout for each !command injected into a skill

What are Claude Code commands?

A Claude Code command is anything you type that controls the session instead of talking to the model. The commands reference splits slash commands into two families:

  • Built-in commands run fixed logic coded into the CLI. /clear, /model and /permissions are examples.
  • Bundled skills are prompts that ship with Claude Code and hand Claude a detailed procedure. /code-review, /batch, /debug, /loop and /simplify are bundled skills. They look and feel like commands, and Claude can also load some of them on its own when relevant.

A few rules apply to all of them:

  • A command only runs when it is at the start of your message. Text after the name becomes its arguments, as in /compact focus on the auth module.
  • If you send a command while Claude is working, it is queued and runs after the current turn. A few, such as /status, /tasks and /usage, run right away.
  • Not every command shows for every user. Availability depends on platform, plan and provider. /desktop, for example, needs macOS or x64 Windows and a Claude subscription.
  • Typing / mid-prompt (after a space) offers completions too, but the command only runs if it starts the message.

If you are new to the tool, start with How to use Claude Code, then come back here as a reference.

Claude Code slash commands: the full list by purpose

Below is every current command from the official commands table, grouped by what you use it for. Skill marks a bundled skill. Aliases are in parentheses. <arg> is required and [arg] is optional.

Session and context

Command What it does
/clear [name] (/reset, /new) Start a new conversation with empty context. The old one stays in /resume.
/compact [instructions] Summarize the conversation to free context. Add focus instructions for the summary.
/context [all] Show context usage as a colored grid, with tips for what is eating space.
/autocompact [auto|<tokens>] Set how full the window gets before auto-compaction, e.g. 500k.
/resume [session] (/continue) Resume a conversation by ID or name, or open the session picker.
/branch [name] Branch the conversation here and switch into the branch. The original stays resumable.
/rename [name] Rename the session. With no name, Claude Code generates one.
/rewind (/checkpoint, /undo) Roll code and/or conversation back to an earlier point, or summarize from a message.
/btw [question] Ask a side question without adding it to the conversation history.
/export [filename] Export the conversation as plain text to a file or the clipboard.
/copy [N] Copy the last (or Nth-latest) response. Pick single code blocks; press w to write to a file.
/diff Review working-tree changes, including Claude's edits so far.
/plan [description] Enter plan mode, optionally starting on a task: /plan fix the auth bug.
/goal [condition|clear] Keep Claude working across turns until a condition is met.
/add-dir <path> Give Claude file access to another directory for this session.
/cd <path> Move the session to another working directory, keeping the conversation.
/exit (/quit) Exit the CLI. In an attached background session, it detaches instead.

Model, settings and project config

Command What it does
/model [model] Switch model and save it as your default. Arrow keys adjust effort.
/effort [level|auto|status] Set reasoning effort: low to xhigh, max, or auto.
/fast [on|off] Toggle fast mode.
/advisor [model|off] Turn on the advisor tool, which consults a second model at key moments.
/config [key=value ...] (/settings) Open settings, or set one directly: /config theme=dark.
/permissions (/allowed-tools) Manage allow, ask and deny rules for tools.
/init Generate a starter CLAUDE.md for the project.
/memory Edit CLAUDE.md files and manage auto memory.
/hooks View your hook configuration.
/import [codex|gemini|cursor] Bring config from Codex, Gemini CLI or Cursor into Claude Code.
/output-style [style] List or switch output styles.
/theme Change the color theme, including colorblind and custom themes.
/color [color|default] Set the prompt bar color for this session.
/statusline Configure the status line, or auto-build one from your shell prompt.
/keybindings Open ~/.claude/keybindings.json to remap shortcuts.
/terminal-setup Install a Shift+Enter newline binding in terminals that need it.
/tui [default|fullscreen] Switch the terminal renderer and relaunch.
/sandbox Toggle sandbox mode on supported platforms.
/auto-mode-setup Draft autoMode.environment entries for auto mode from your project.
/voice [hold|tap|off] Toggle voice dictation.
/privacy-settings View privacy settings (Pro, Max and Ultra).
/setup-bedrock, /setup-vertex Wizards for Amazon Bedrock or Google Cloud. Hidden until the matching env var is set.
/update-config [request] Skill. Describe a settings change and Claude edits the right settings.json.
/fewer-permission-prompts Skill. Scan your history and add an allowlist for common read-only calls.

Account, usage and updates

Command What it does
/login, /logout Sign in to or out of your Anthropic account.
/usage (/cost, /stats) Session cost, plan usage limits and activity stats.
/usage-credits Configure usage credits, or request them from your admin. Formerly /extra-usage.
/rate-limit-options Options when you hit a usage limit: wait and auto-continue, add credits, upgrade.
/upgrade Open the upgrade page for a higher plan.
/status Version, model, account and connectivity. Works while Claude is responding.
/insights HTML report on how you use Claude Code across recent sessions.
/team-onboarding Build an onboarding guide for teammates from your last 30 days of usage.
/release-notes Browse the changelog by version.
/restart (/update) Restart and resume the session to apply an installed update.
/desktop (/app) Continue this session in the Claude Code desktop app.
/mobile (/ios, /android) QR code for the Claude mobile app.

For what plans and API usage cost, see Claude Code pricing.

Code review and git

Command What it does
/code-review [level] [--fix] [--comment] [target] (/review) Skill. Review the diff, a PR number, branch or path for bugs. --fix applies findings, --comment posts them to the PR.
/code-review ultra (/ultrareview) Deep multi-agent review in a cloud sandbox.
/security-review Check your branch's diff against origin's default branch for vulnerabilities.
/simplify [target] Skill. Four parallel agents look for reuse, simplification and efficiency fixes, then apply them.
/batch <instruction> Skill. Split a large change into 5 to 30 units, each run by a background agent in its own worktree.
/verify Skill. Build, run and observe your app to confirm a change works.
/run Skill. Launch and drive your app to see a change working.
/run-skill-generator Skill. Teach /run and /verify how to start your app.
/autofix-pr [prompt] Start a cloud session that watches your branch's PR and pushes fixes for CI failures and comments.
/install-github-app Install the Claude GitHub App and optional GitHub Actions workflows.

Agents, background work and cloud

Command What it does
/agents Reminder to ask Claude to create subagents or edit .claude/agents/ directly.
/tasks (/bashes) View and manage background shells and subagents in this session.
/subtask <task> Hand a side task to a forked subagent that reports back here.
/fork [prompt] Copy the conversation into a new background session and keep working here.
/background [prompt] (/bg) Detach this session to run as a background agent.
/stop Stop the background session you're attached to.
/list-agents (/peers) List subagents, teammates and sessions Claude can message.
/loop [interval] [prompt] (/proactive) Skill. Repeat a prompt on an interval: /loop 5m check if the deploy finished.
/schedule [description] (/routines) Create and manage cloud scheduled tasks.
/workflows Watch, pause, resume or save dynamic workflows.
/deep-research <question> Workflow. Fan out web searches and return a cited report.
/teleport (/tp) Pull a cloud session into this terminal.
/remote-control (/rc) Continue this local session from claude.ai or the Claude app.
/ide Manage IDE integrations.
/chrome Configure Claude in Chrome.
/claude-in-chrome [task] Skill. Have Claude do a task in your browser.

Tools, MCP, plugins and skills

Command What it does
/mcp [reconnect|enable|disable <server>|all] Manage MCP servers and OAuth. /mcp reconnect all retries failed servers.
/plugin [subcommand] Browse, install, enable and disable plugins.
/reload-plugins [--force] Apply plugin changes without restarting.
/skills List skills; press t to sort by token cost, Space to change visibility.
/reload-skills Re-scan skill and command folders for new files.
/skill-doctor Show what each skill costs in context and how often it's used.
/plugin-authoring Load the reference Claude uses to write a mod.
/claude-api [subcommand] Skill. Load Claude API and Managed Agents reference for your language.
/dataviz [request] Skill. Chart and dashboard design guidance.
/artifacts List and attach your published artifacts.
/design [brief], /slides [brief] Skills. Draft designs or a slide deck as an artifact.

Help and diagnostics

Command What it does
/help Show help and available commands.
/doctor (/checkup) Skill. Diagnose install, settings, extension and CLAUDE.md problems and propose fixes.
/debug [description] Skill. Turn on debug logging and analyze the session log.
/bug [report] (/share) Report a bug with the session context you choose to include.
/feedback [report] Send product feedback.

Also in the menu, used less often: /recap (one-line session summary), /focus (focus view in fullscreen), /scroll-speed, /powerup (interactive feature lessons), /heapdump (memory snapshot, hidden until typed in full), /remote-env (default cloud environment), /web-setup (GitHub for cloud sessions), /install-slack-app, /artifact-capabilities (skill), /design consent and /design revoke, /passes (share a free week), /stickers and /radio.

Claude Code CLI commands and flags

The second half of "Claude Code commands" is what you type in your shell. The CLI reference lists these subcommands:

Command What it does Example
claude Start an interactive session claude
claude "query" Start a session with a first prompt claude "explain this project"
claude -p "query" Run once, print the answer, exit claude -p "explain this function"
cat file | claude -p "query" Process piped input cat logs.txt | claude -p "explain"
claude -c Continue the most recent conversation in this directory claude -c
claude -r "<session>" "query" Resume a session by ID or name claude -r "auth-refactor" "Finish this PR"
claude update Update to the latest version claude update
claude install [version] Install or reinstall the native binary claude install stable
claude auth login / logout / status Manage sign-in. --console bills to an API account claude auth login --console
claude doctor Read-only install and settings diagnostics claude doctor
claude mcp Configure MCP servers claude mcp add --transport http notion https://mcp.notion.com/mcp
claude mcp login <name> Run a server's OAuth flow from the shell claude mcp login sentry
claude plugin Manage plugins claude plugin install code-review@claude-plugins-official
claude agents Open agent view for background sessions claude agents
claude attach / logs / stop / respawn / rm Manage a background session by ID claude logs 7c5dcf5d
claude import [source] Import config from other coding agents claude import codex --dry-run

The flags worth memorizing

Flag What it does Example
-p, --print Non-interactive: answer and exit. Use it in scripts and CI claude -p "query"
-c, --continue Load the latest conversation in this directory claude --continue
-r, --resume Resume by ID or name, or open the picker claude --resume auth-refactor
-n, --name Name the session so you can resume it by name claude -n "my-feature-work"
--model Model alias (sonnet, opus, haiku, fable) or full name claude --model opus
--effort low, medium, high, xhigh, max claude --effort high
--permission-mode Start in default, acceptEdits, plan, auto, dontAsk or bypassPermissions claude --permission-mode plan
--allowedTools Tools that run without a prompt claude --allowedTools "Bash(git log *)" "Read"
--disallowedTools Deny rules; a bare name removes the tool claude --disallowedTools "Edit"
--tools Restrict which built-in tools exist claude --tools "Bash,Edit,Read"
--add-dir Extra working directories claude --add-dir ../apps ../lib
--output-format text, json or stream-json (print mode) claude -p "query" --output-format json
--json-schema Validated JSON output matching a schema (print mode) see example below
--max-turns Cap agentic turns (print mode) claude -p --max-turns 3 "query"
--max-budget-usd Stop once estimated spend hits a cap (print mode) claude -p --max-budget-usd 5.00 "query"
--append-system-prompt Add to the default system prompt claude --append-system-prompt "Always use TypeScript"
--system-prompt Replace the system prompt entirely claude --system-prompt "You are a Python expert"
--mcp-config Load MCP servers from a JSON file claude --mcp-config ./mcp.json
--agent Run the session as a specific subagent claude --agent my-custom-agent
-w, --worktree Start in an isolated git worktree claude -w feature-auth
--bg Start as a background agent and return claude --bg "investigate the flaky test"
--settings Extra settings file or JSON for this session claude --settings ./ci-settings.json
--bare Skip hooks, skills, plugins, MCP and CLAUDE.md for fast scripted runs claude --bare -p "query"
--safe-mode Start with all customizations off, to debug a broken setup claude --safe-mode
--disable-slash-commands Turn off all skills and commands for the session claude --disable-slash-commands
--dangerously-skip-permissions Same as --permission-mode bypassPermissions use only in a sandbox
--debug Debug logging, optionally filtered claude --debug='mcp,startup'

Here is how these combine in real scripts:

# One-shot question about the repo, plain text out
claude -p "Summarize what changed in the last 5 commits" 

# Read-only review in CI: no edits, git read commands pre-approved, JSON out, capped
git diff origin/main...HEAD | claude -p "Review this diff for bugs. Be terse." \
  --permission-mode plan \
  --allowedTools "Bash(git log *)" "Bash(git diff *)" "Read" \
  --output-format json --max-turns 5 --max-budget-usd 2.00

# Structured output you can parse
claude -p "List the TODO comments in src/" \
  --json-schema '{"type":"object","properties":{"todos":{"type":"array","items":{"type":"string"}}},"required":["todos"]}'

# Run one of your custom commands (skills) headless
claude -p "/review-diff"

# Pick up yesterday's named session and give it the next step
claude -r "auth-refactor" "Now write the migration"

Claude Code shortcuts and input prefixes

These come from the interactive mode docs. On macOS, the Alt word-editing shortcuts need "Option as Meta" turned on in your terminal.

Shortcut What it does
Esc Stop Claude mid-turn so you can redirect. Work done so far is kept.
Esc Esc With text: clear the draft (Up recalls it). With an empty prompt: open the rewind menu.
Shift+Tab Cycle permission modes: default (shown as Manual), acceptEdits, plan, then bypassPermissions and auto when available.
Ctrl+C Interrupt, or clear the prompt. When nothing is running, a second press exits.
Ctrl+D Exit (press twice).
Ctrl+O Toggle the transcript viewer with full tool output.
Ctrl+R Reverse-search your prompt history.
Ctrl+G or Ctrl+X Ctrl+E Edit the prompt in your $EDITOR.
Ctrl+B Send a running Bash command or agent to the background (tmux: press twice).
Ctrl+T Show or hide Claude's task checklist.
Ctrl+S Stash the prompt; press again on an empty prompt to restore it.
Ctrl+V (Cmd+V in iTerm2, Alt+V on Windows) Paste an image from the clipboard.
Ctrl+L Redraw a garbled screen.
Ctrl+Enter or Ctrl+X Ctrl+S Send queued messages now.
Ctrl+X Ctrl+K Stop all background subagents (press twice to confirm).
Ctrl+Z Suspend to the shell (Unix); fg resumes.
Option+P / Alt+P Switch model without clearing your prompt.
Option+T / Alt+T Toggle extended thinking (no effect on models that always think).
Option+O / Alt+O Toggle fast mode.
Up / Down Move in a multiline prompt, then walk history.
Tab Accept an autocomplete suggestion.
Ctrl+_ Undo the last input edit.
\ + Enter, Ctrl+J, Shift+Enter New line in the prompt. \ + Enter and Ctrl+J work in any terminal.
Hold Space Voice dictation, once /voice is on.

Input prefixes change what a message is:

Prefix What it does
/ at the start Run a command or skill.
! at the start Shell mode: ! npm test runs the command, adds output to context, and Claude responds to it.
@ Autocomplete a file path to mention it.
: Emoji shortcode.
? on an empty prompt Show the shortcut help panel.

You can remap most shortcuts in ~/.claude/keybindings.json; run /keybindings to open it. The word-editing shortcuts such as Alt+B, Alt+F and Ctrl+W can't be remapped.

How do custom slash commands work in Claude Code?

Claude Code custom commands and skills are now the same thing. The skills docs say it plainly: a file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy and work the same way. The merge landed in v2.1.3. Your existing command files keep working; skills add a folder for supporting files and let Claude load them on its own when the description matches.

  1. v2.0.70The # quick-memory shortcut is removed.
  2. v2.1.3Slash commands and skills merge, with no change in behavior.
  3. v2.1.91/pr-comments is removed.
  4. v2.1.92/vim is removed; Vim mode moves to /config.
  5. v2.1.223/review becomes an alias of /code-review.

Where to put a custom command

Location Path Who gets it
Project .claude/skills/<name>/SKILL.md Everyone working in this repo. Commit it.
Personal ~/.claude/skills/<name>/SKILL.md You, in every project on this machine.
Nested <subdir>/.claude/skills/<name>/SKILL.md Sessions working in that part of a monorepo.
Plugin <plugin>/skills/<name>/SKILL.md Anyone with the plugin enabled, as /plugin-name:name.
Legacy file .claude/commands/<name>.md Still works. A subfolder adds a prefix: commands/frontend/component.md is /frontend:component.

If two share a name, enterprise beats personal and personal beats project. A skill beats a .claude/commands/ file with the same name. A skill named like a built-in (say usage) replaces the built-in in local sessions, but not its aliases. Claude Code watches skill folders, so edits apply without a restart; run /reload-skills if you created a brand-new skills folder mid-session.

Arguments: $ARGUMENTS, $0, $1 and named arguments

Placeholder Expands to
$ARGUMENTS Everything typed after the command name.
$ARGUMENTS[0] or $0 The first argument.
$1, $2 The second and third arguments.
$name A named argument declared in arguments: frontmatter.
${CLAUDE_SKILL_DIR} The skill's own folder, for bundled scripts.
${CLAUDE_PROJECT_DIR} The project root.
${CLAUDE_SESSION_ID} The current session ID.

Frontmatter fields you'll actually use

All fields are optional. The ones that matter for commands, from the frontmatter reference:

Field What it does
description What it does and when to use it. Claude uses it to decide when to load the skill.
argument-hint Autocomplete hint, e.g. [issue-number].
arguments Names for positional arguments, e.g. [issue, branch].
disable-model-invocation true means only you can run it. Use for anything with side effects.
user-invocable false hides it from the / menu; only Claude loads it.
allowed-tools Tools pre-approved for the turn that runs the skill, e.g. Bash(git diff *).
disallowed-tools Tools removed while the skill is active.
model Model for the rest of that turn, e.g. haiku. Not saved to settings.
effort Effort level for that turn.
context: fork + agent Run the skill in an isolated subagent, e.g. agent: Explore.
paths Globs that limit when Claude auto-loads it (skills only, not command files).
name Override the command name (skills only).

Two more features make commands much better:

  • Live shell output. A line like !`git diff --cached` runs before Claude sees the prompt and is replaced by the output. Use a fenced block opened with ```! for multi-line scripts.
  • The permission catch. Injected commands never prompt. Outside auto mode, a command that your rules don't already allow aborts the whole skill. So list every injected command in allowed-tools, as the examples below do.

7 custom Claude Code commands you can paste

Each one is a project skill. Create the folder, paste the file, then type the command. They are written for git and the GitHub CLI (gh); swap in your own tools where needed.

1. /commit: write the commit message from staged changes

.claude/skills/commit/SKILL.md

---
description: Write a conventional commit message for the staged changes and commit them.
disable-model-invocation: true
model: haiku
allowed-tools: Bash(git status *) Bash(git diff *) Bash(git commit *)
---

Staged changes:
!`git status --short`
!`git diff --cached`

Task:
1. If nothing is staged, say so and stop.
2. Write one commit message in Conventional Commits format: `type(scope): summary` under 72 characters, a blank line, then 1-4 bullets on why.
3. Extra guidance from me, if any: $ARGUMENTS
4. Run `git commit -m` with that message. Do not stage other files and do not push.

Use it as /commit or /commit mention the ticket ABC-123. The model: haiku line makes this cheap; delete it to keep your session model.

2. /pr-description: draft the pull request body

.claude/skills/pr-description/SKILL.md

---
description: Draft a pull request title and description for the current branch.
disable-model-invocation: true
argument-hint: [base-branch]
allowed-tools: Bash(git log *) Bash(git diff *) Bash(git branch *)
---

Base branch: $ARGUMENTS (use `main` if empty).

1. Run `git log --oneline <base>..HEAD` and `git diff <base>...HEAD --stat`, then read the full diff of the important files.
2. Output, in Markdown:
   - A title under 70 characters
   - **What**: 2-4 bullets
   - **Why**: one short paragraph
   - **How to test**: numbered steps
   - **Risks**: anything a reviewer should look at closely
3. Do not create the PR. Print the text so I can paste it.

3. /fix-issue: fix GitHub issue #N

.claude/skills/fix-issue/SKILL.md

---
description: Fix a GitHub issue by number, with a test.
disable-model-invocation: true
argument-hint: [issue-number]
allowed-tools: Bash(gh issue view *)
---

Fix GitHub issue #$0.

1. Run `gh issue view $0 --comments` and restate the problem in two sentences.
2. Find the relevant code. If the cause is unclear, tell me what you'd check before editing.
3. Write a failing test that reproduces the bug, then make it pass.
4. Run the test suite for the files you touched.
5. Summarize the change and suggest a commit message that ends with `Fixes #$0`.

Run /fix-issue 482. Because gh issue view is pre-approved, Claude reads the issue without stopping to ask.

4. /explain: explain a file or folder

This one uses the legacy single-file format to show it still works.

.claude/commands/explain.md

---
description: Explain what a file or directory does and how it fits the codebase.
argument-hint: [path]
allowed-tools: Read Grep Glob
---

Explain $ARGUMENTS to a developer who is new to this repo.

- Start with one sentence on its job.
- Then: main exports or entry points, what calls it, what it depends on, and any side effects (network, disk, database).
- Point out anything surprising or risky.
- Keep it under 300 words. Use file:line references.

5. /write-tests: add tests for a file

.claude/skills/write-tests/SKILL.md

---
description: Write unit tests for a file using the project's existing test setup. Use when asked to add or improve tests.
argument-hint: [file]
arguments: [file]
---

Write tests for $file.

1. Find the test framework, config and an existing test file near $file. Copy its style, naming and helpers.
2. Cover the happy path, edge cases (empty, null, large input) and error paths. Don't test private details.
3. Put the tests where this repo keeps them.
4. Run only the new tests and fix failures in the tests, not in $file. If $file itself looks wrong, tell me instead of changing it.

Since disable-model-invocation isn't set, Claude can also load this skill when you just say "add tests for the parser".

6. /review-diff: review uncommitted changes

.claude/skills/review-diff/SKILL.md

---
description: Review my uncommitted changes before I commit.
disable-model-invocation: true
context: fork
agent: Explore
allowed-tools: Bash(git diff *) Bash(git status *)
---

Changes:
!`git status --short`
!`git diff HEAD`

Review. List problems in this order, each with file:line and a one-line fix:
1. Bugs and broken logic
2. Security issues (secrets, injection, missing auth checks)
3. Missing or weak tests
4. Naming and readability, only if important

If everything looks fine, say so in one line. Do not edit files.

context: fork runs the review in a separate Explore subagent that reports back when done, so the diff doesn't fill your main context. For a deeper review that can also fix things, the bundled /code-review is the better tool; this is the fast, read-only version.

7. /changelog: release notes since the last tag

.claude/skills/changelog/SKILL.md

---
description: Write user-facing release notes from git history.
disable-model-invocation: true
argument-hint: [from-ref] [to-ref]
arguments: [from, to]
allowed-tools: Bash(git describe *) Bash(git log *) Bash(git tag *)
---

From: $from (if empty, use the latest tag from `git describe --tags --abbrev=0`)
To: $to (if empty, use HEAD)

1. Run `git log --no-merges --pretty=format:'%h %s' <from>..<to>`.
2. Group entries under **New**, **Improved**, **Fixed** and **Breaking changes**. Drop chores, CI and refactors users won't notice.
3. Rewrite each line for users, not developers. One line each.
4. Output Markdown only, ready to paste into a GitHub release.

Run /changelog for everything since the last tag, or /changelog v1.4.0 v1.5.0 for a range. It uses named arguments because an unfilled $0 or $1 stays in the prompt as literal text, while an unfilled named argument becomes empty. It isn't called /release-notes because a project skill with a built-in command's name replaces that command. Want more ideas? The agent skills directory lists community skills you can install.

MCP prompts as slash commands

MCP servers can expose prompts, and Claude Code turns them into commands. They appear in the / menu as /servername:promptname (MCP), and typing /mcp__servername__promptname also runs them. Arguments are space-separated, per the MCP docs:

/mcp__github__list_prs
/mcp__github__pr_review 456
/mcp__jira__create_issue login-bug high

Prompts are discovered from connected servers, so what you see depends on what you've added. Find servers in the MCP server directory, for example MCP servers for GitHub or for Jira. If a server's prompts are missing, check /mcp for its connection status, or run /mcp reconnect all.

Plugin commands

Plugins bundle skills, agents, hooks and MCP servers. Every skill in a plugin becomes a namespaced command, /<plugin>:<skill>, so it can't clash with yours. The plugin install docs use Anthropic's commit-commands plugin as the example:

/plugin install commit-commands@claude-plugins-official
/commit-commands:commit

In your shell, the same install is claude plugin install commit-commands@claude-plugins-official. You can also type just the bare skill name: /deploy finds a plugin skill named myplugin:deploy-app in autocomplete. Plugins can still ship a legacy commands/ folder (commands/db/migrate.md becomes /my-plugin:db:migrate), but the docs recommend skills for new work. Keep in mind that the descriptions of every enabled plugin's skills that Claude can invoke on its own sit in context on every turn, so disable plugins you don't use.

Which Claude Code commands should you learn first?

Best for Long sessions: /clear and /compact
Use /clear when you switch tasks and /compact when you want to keep going on the same one with less context. Check /context first to see what's using space.
Best for Big or risky changes: /plan or Shift+Tab
Plan mode lets Claude read and propose before it edits anything. Approve the plan, then let it work.
Best for Undoing a bad turn: Esc Esc and /rewind
Roll back code and conversation to a checkpoint instead of asking Claude to undo by hand.
Best for Before every commit: /code-review
Catches correctness bugs in your diff; --fix applies them. Add /security-review for anything touching auth or input handling.
Best for Scripts and CI: claude -p
Pair it with --output-format json, --allowedTools and --max-turns for repeatable, bounded runs.

To compare Claude Code's command set with other agents, see the AI coding agents comparison.

FAQ

How do I see all Claude Code commands?

Type / in a Claude Code session. The menu lists built-in commands, bundled skills, your own skills and command files, plugin commands and MCP prompts, and filters as you type. /help shows the same list. A few commands, such as /heapdump, stay hidden until you type the full name.

How do I use commands in Claude Code?

Type the command at the start of your message, followed by any arguments, for example /compact keep the API decisions. Commands typed later in a message don't run directly. From your shell, use CLI commands such as claude -p "query" or claude -c instead.

How do I create a custom slash command in Claude Code?

Create .claude/skills/<name>/SKILL.md in your repo (or ~/.claude/skills/ for every project), add a description in YAML frontmatter, and write the prompt below it. It runs as /<name>. A single Markdown file in .claude/commands/ also works, because custom commands have been merged into skills.

What is the difference between Claude Code commands and skills?

There is no longer a real difference for your own files: both create a /name command and accept the same frontmatter. Skills add a folder for scripts and reference files, the name and paths fields, and automatic loading by Claude when the description matches. Built-in commands like /clear are different: they run fixed code, not a prompt.

What happened to the # memory shortcut in Claude Code?

It was removed in v2.0.70. To save something to memory, ask Claude to add it to CLAUDE.md or open the files with /memory.

How do I run Claude Code commands from the command line?

Use print mode: claude -p "/review-diff" runs a custom command non-interactively and prints the result. Built-in commands that need a dialog won't work there, but several support -p, including /config key=value, /model <model>, /rename and /mcp.

What is the difference between /clear and /compact?

/clear starts a fresh conversation with empty context; the old one stays available in /resume. /compact keeps the same conversation but replaces its history with a summary, and you can tell it what to keep: /compact focus on the database schema.