All 118 Claude Code commands, and when to use each

Claude Code has 118 slash commands and most people use about a dozen. Here is every one of them, plus the 26 that map to how a session actually runs.

Navid Moazzezby Navid Moazzez·Updated 2 Okt 2026·13 min read·

Claude Code commands are the slash commands you type into the prompt to change what the session is doing. Type / and the menu appears. If you haven't used Claude Code yet, start with what it is.

There are 118 of them. Most people meet about a dozen, usually by accident, and never find the ones that would have saved them the most time.

So this is all of them, grouped by the point in the work where you would actually reach for one.

In this guide, I'll show you:

  • What a Claude Code command is, and how the menu matches what you type
  • Why the right command at the right moment costs you less than a better prompt
  • The 26 that map to a normal session, grouped by when you use them
  • All 118 in one table you can search
  • The 6 worth setting up before your next session

And every one of them was read from Anthropic's own command reference on September 30, 2026.

key_takeaways.mdTL;DR

Key takeaways

Claude Code commands are instructions to the tool rather than to the model. Type / and the menu opens.
There are 118: core commands built into Claude Code, plus bundled skills you type the same way.
Most of what people try to fix with a better prompt is fixed by a command. /context shows what is filling the window, and /clear gives it back.
Anthropic groups them by when you use them: your first session, during a task, in parallel, before you ship, between sessions, and when something is wrong.
Set up 6 before your next session, starting with /permissions.

What is a Claude Code command?

A Claude Code command is an instruction to the tool rather than to the model. /clear does not ask Claude to forget: it empties the context window.

You type / and a menu opens. Keep typing and it filters.

Some are core commands built into Claude Code. Others are bundled skills, which behave the same way at the prompt but are loaded rather than built in.

Why Claude Code commands matter

Most of what people try to fix with a better prompt is not a prompting problem.

A session that has gone vague usually has a full context window. A run that keeps stalling on approvals usually has no permission rules. Neither gets better by rewording the request.

For example, an hour into a session the answers get worse. The prompt is not the problem. /context shows you what is filling the window and /clear gives it back, and that takes 2 seconds.

So the commands are the controls. Prompting is what you do once the controls are set.

Your first session in a repo

Run these once and the project is set up for every session after it. This is also where your AI OS starts.

CommandWhat it does
/initInitialize project with a CLAUDE.md guide.
/memoryEdit CLAUDE.md files, enable or disable auto memory, and view auto memory entries
/mcp [reconnect <server>|enable|disable [<server>|all]]Manage MCP server connections and OAuth authentication.
/permissionsManage allow, ask, and deny rules for tool permissions.

During a task

These are the 6 you will use every day, and 3 of them decide what the session costs you.

CommandWhat it does
/plan [description]Enter plan mode directly from the prompt.
/model [model]Switch the AI model and save it as your default for new sessions.
/effort [level|auto|status|ultracode [on|off]]Set the effort level: low to xhigh, max, or auto; status prints it.
/context [all]Visualize current context usage as a colored grid.
/compact [instructions]Free up context by summarizing the conversation so far.
/btw [question]Ask a side question about the current session without adding to the conversation.

Running work in parallel

Use these when 1 task is really several, or when you want your terminal back.

CommandWhat it does
/tasksView and manage background work in the current session, including subagents that have finished.
/background [prompt]Detach the current session to run as a background agent and free this terminal.
/batch <instruction>Orchestrate large-scale changes across a codebase in parallel.

Before you ship

Read what changed before anyone else has to.

CommandWhat it does
/diffReview the changes in your working tree, including the edits Claude has made so far.
/code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [pr#|branch|path]Review the current diff, or a PR number, branch, or path you pass, for correctness bugs.
/security-reviewAnalyze the changes on your current branch for security vulnerabilities.

Between sessions

Work does not end when you close the terminal, and last week's conversation is still there.

CommandWhat it does
/clear [name]Start a new conversation with empty context.
/resume [session]Resume a conversation by ID or name, or open the session picker.
/branch [name]Create a branch of the current conversation at this point, so you can try a different direction without losing the conversation as it stands.
/fork [prompt]Copy the current conversation into a new background session and keep working here.
/teleportPull a cloud session into this terminal.
/remote-controlMake this session available for Remote Control from claude.ai.