Skip to content
Claudekit.ai

Claude Code Slash Commands: A Practical Cheatsheet (2026)

Claude Code slash commands cheatsheet: the built-in commands that matter, their aliases and arguments, plus how to add custom commands, plugin and MCP ones.

By Claudekit Team Published 10 min read

Claude Code has a lot of slash commands. The official reference lists more than a hundred entries once you count bundled skills, and most sessions only need a handful. This cheatsheet covers the ones that actually change how you work, grouped by when you need them, plus how to add your own.

Everything here is checked against the official Claude Code commands reference as of October 2026. Availability can depend on your platform, plan and provider, so if a command is missing from your / menu, that’s usually why.

How slash commands work

  • Type / to open the menu, then type letters to filter. /help shows help and available commands.
  • A command is only recognised at the start of a message. Text after the command name becomes its arguments.
  • If you send a command while Claude is responding, it is queued until the turn finishes. A few, such as /status, /tasks and /usage, run immediately.
  • In the reference, <arg> means required and [arg] optional.

Three other input prefixes are worth knowing alongside /:

PrefixWhat it does
/Command or skill
! at the startShell mode: run a command directly and add its output to the session
@File path mention with autocomplete

The cheatsheet

Set up a project

CommandWhat it does
/initGenerates a starter CLAUDE.md from your codebase. Set CLAUDE_CODE_NEW_INIT=1 for an interactive flow that also covers skills and hooks
/memoryOpens your CLAUDE.md files for editing and toggles auto memory
/mcpManages MCP server connections and OAuth. /mcp reconnect all retries failed servers
/permissionsManages allow, ask and deny rules for tools. Alias: /allowed-tools
/configOpens settings. Accepts key=value pairs, e.g. /config model=sonnet. Alias: /settings
/pluginOpens the plugin menu, or runs a subcommand such as install or list
/hooksShows your configured hooks

/init deserves its own read: see the CLAUDE.md guide for what to keep and what to delete from the generated file.

During a task

CommandWhat it does
/plan [description]Enters plan mode; with a description it starts planning right away, e.g. /plan fix the auth bug
/model [model]Switches model and saves it as your default
/effort [level]Sets effort: low to xhigh, max, or auto
/contextShows what fills the context window as a coloured grid, with optimisation suggestions
/compact [instructions]Summarises the conversation to free space, optionally with focus instructions
/btw [question]Asks a side question that never enters the conversation history
/add-dir <path>Adds another working directory for this session

/btw is underrated. It answers from what’s already in context, has no tool access, and runs even while Claude is mid-turn, so “wait, which file did you change for the cache?” doesn’t derail the main thread.

Review and ship

CommandWhat it does
/diffReviews changes in your working tree, including Claude’s edits
/code-reviewReviews the current diff (or a PR number, branch or path) for correctness bugs. --fix applies findings, --comment posts them to the PR. Alias: /review
/security-reviewChecks your branch’s diff against the default branch for vulnerabilities. Needs an origin remote
/simplifyReviews changed code for cleanup opportunities and applies fixes; doesn’t hunt for bugs
/install-github-appInstalls the Claude GitHub App and can set up GitHub Actions workflows

For the CI side of reviews, see our Claude Code GitHub Actions guide.

Between sessions and when things go wrong

CommandWhat it does
/clear [name]Starts a new conversation with empty context. Aliases: /reset, /new
/resume [session]Resumes a conversation by ID or name, or opens a picker. Alias: /continue
/rewindRolls back conversation and/or code to a checkpoint, or summarises from a message. Aliases: /checkpoint, /undo
/usageShows session cost, plan usage limits and activity stats. Aliases: /cost, /stats
/statusShows version, model, account and connectivity
/doctorRuns a setup checkup and proposes fixes. Alias: /checkup
/export [filename]Exports the conversation as plain text

Double-tapping Esc is the keyboard route to the same rewind menu. For what /usage numbers mean on a subscription versus the API, see our Claude Code pricing guide.

Parallel and background work

CommandWhat it does
/tasksLists background work in the session, including finished subagents
/batch <instruction>Splits a large change into independent units and runs each in its own worktree. Needs a git repo
/loop [interval] [prompt]Runs a prompt repeatedly while the session is open, e.g. /loop 5m check if the deploy finished

Commands that changed recently

If you learned Claude Code a while ago, a few habits need updating:

  • /agents now prints a reminder to ask Claude to create or manage subagents, or to edit .claude/agents/ directly. On v2.1.197 and earlier it opened an interactive manager. See the subagents guide.
  • /review is now an alias of /code-review.
  • /vim was removed in v2.1.92; use /config and change Editor mode.
  • /pr-comments was removed in v2.1.91; ask Claude directly instead.

Custom slash commands are skills

Custom commands have been merged into skills. A file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy and work the same way. Existing .claude/commands/ files keep working, but skills add a folder for supporting files and frontmatter that controls who can invoke them. If a skill and a command share a name, the skill wins.

WherePathAvailable in
Personal~/.claude/skills/<name>/SKILL.mdAll your projects
Project.claude/skills/<name>/SKILL.mdThis repository
Plugin<plugin>/skills/<name>/SKILL.mdWherever the plugin is enabled, as /plugin-name:skill-name

A minimal custom command

Save as .claude/skills/fix-issue/SKILL.md:

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

## Issue
!`gh issue view $ARGUMENTS`

## Instructions
1. Read the issue above and find the relevant code.
2. Write a failing test that reproduces it.
3. Fix the code until the test passes.
4. Summarise the change in two sentences.

Then run /fix-issue 123. What each piece does:

  • $ARGUMENTS is replaced with everything after the command. You can also use $0, $1 or $ARGUMENTS[0] for individual space-separated arguments, or declare named arguments in frontmatter.
  • !`command` runs a shell command before Claude sees the skill and inlines its output.
  • disable-model-invocation: true means only you can trigger it, which is what you want for anything with side effects like deploys or commits.
  • allowed-tools pre-approves listed tools for that turn.

If you add or edit a skill mid-session, run /reload-skills to pick it up without restarting. /skills lists everything available, and you can type to filter.

For the full frontmatter reference and how Claude auto-loads skills, read our Claude Code skills guide, and browse the best Claude Code skills for ready-made ones.

Chaining skills

At the terminal prompt you can start one message with several skills: /skill-a /skill-b do XYZ loads both and passes the trailing text to each. The docs cap this at six skills per message.

Plugin commands

Plugins can ship skills, which show up namespaced as /plugin-name:skill-name. The namespace prevents collisions when two plugins both have a review skill. Install plugins with /plugin, and apply changes without restarting via /reload-plugins. The plugins guide covers marketplaces.

MCP prompts as commands

MCP servers can expose prompts, which appear in the / menu as /servername:promptname (MCP). You can also type the long form:

/mcp__github__list_prs
/mcp__github__pr_review 456
/mcp__jira__create_issue login-bug high

Arguments are space-separated, one token each. Many servers only expose tools, not prompts, so don’t be surprised if a server adds nothing to the menu. See best MCP servers for Claude Code for servers worth installing.

Bundled skills you get for free

Some entries in the menu are bundled skills rather than hard-coded commands: they’re prompts handed to Claude, just like the ones you write. Examples include /code-review, /simplify, /batch, /loop, /debug and /doctor. That’s useful to know because they consume context like any skill when invoked, and you can hide ones you never use from /skills.

Slash commands in your Claude kit

A good Claude kit is largely a set of well-named slash commands: a /plan-style workflow, a review command, a release command. You can write them yourself as skills, install them from plugin marketplaces, or start from a packaged kit; our Agentkit.best vs DIY comparison weighs those options.

Frequently asked questions

How do I see every slash command available in Claude Code?

Type / at the prompt to open the command menu, then type letters to filter. The list includes built-in commands, bundled skills, your own skills, plugin skills and MCP prompts. /help also shows help and available commands.

How do I create a custom slash command?

Create a skill: a folder at .claude/skills/<name>/SKILL.md for one project or ~/.claude/skills/<name>/SKILL.md for all projects. It becomes /<name>. Older .claude/commands/<name>.md files still work, but skills add supporting files and invocation control.

What is the difference between /clear and /compact?

/clear starts a new conversation with empty context, keeping project memory such as CLAUDE.md. /compact keeps the same conversation but replaces the history with a summary to free space; you can pass focus instructions like /compact focus on the auth bug.

Why does my slash command show as unknown?

A command is only recognized at the start of a message, and some commands depend on platform, plan or provider. Check spelling, make sure the skill folder contains a SKILL.md, and run /reload-skills if you added it during the session.

Get the weekly Claude digest

New skills, MCP servers, prompts and Claude updates — one short email a week. No spam, unsubscribe anytime.

The newsletter is launching soon. Follow the RSS feed in the meantime.