Claude Code commands are shortcuts you type after a forward slash inside a session, such as /init to create a CLAUDE.md file, /clear to start a fresh task and /rewind to roll back a mistake. Type / on its own to see the ones available to you. Anthropic's reference lists well over a hundred, but a dozen or so cover nearly everything a non-developer needs.
This page is about the commands you type, not the questions you ask Claude. I've grouped the useful ones by the moment you'd reach for them, and the table further down doubles as a cheat sheet.
How slash commands work
Commands control Claude Code from inside a session. Type / and a menu appears. Keep typing letters to filter it. Three rules from Anthropic's commands page save a lot of confusion:
- A command only counts at the start of your message. Anything you type after the command name becomes its arguments, so /plan fix the login page starts plan mode with that task.
- If you send a command while Claude is still responding, it waits in a queue and runs after the current turn. A few, such as /status, /tasks and /usage, run straight away.
- Some commands are bundled skills or workflows rather than built-in code, and you can add your own commands by writing skills. You can even start one message with several skills, up to six.
The cheat sheet
| Command | When you'd use it | What it does |
|---|---|---|
| /init | First session in a folder | Writes a starter CLAUDE.md file |
| /memory | Setting up or tidying | Opens your CLAUDE.md files and switches auto memory on or off |
| /permissions | Setting up | Manages your allow, ask and deny rules |
| /mcp | Connecting other tools | Manages connections to MCP servers |
| /plan | Before a big change | Switches to plan mode so Claude plans before it edits |
| /model and /effort | When results feel slow or shallow | Changes the model and how much reasoning it applies |
| /context | Long conversations | Shows what's filling the context window |
| /compact | Long conversations | Summarises the conversation to free space |
| /btw | Mid-task side question | Asks something without adding it to the conversation |
| /clear | Starting a new task | Starts fresh while keeping project memory |
| /resume | Coming back later | Returns to an earlier conversation |
| /diff | Before you hand work over | Shows what changed, including Claude's edits |
| /code-review | Before you hand work over | Checks the changes for correctness bugs |
| /rewind | Something went wrong | Rolls code and conversation back to a checkpoint |
| /doctor | Something's broken | Runs a setup checkup and proposes fixes |
| /usage | Checking your plan | Shows session cost, plan limits and activity |
Your first session in a new folder
Anthropic's own workflow grouping starts here. Run /init to generate a starter CLAUDE.md, then /memory to refine it. Use /mcp to set up any connections the project needs, and /permissions to decide what Claude can do without asking. That's four commands, once per project, and most people never touch the others in this group.
During a long piece of work
Before a large change, /plan puts Claude into plan mode so you can agree the approach first. If answers feel rushed or slow, /model switches the model and /effort changes how much thinking it does.
When a conversation gets long, /context shows what's taking up room, and /compact summarises the conversation to make space. You can add focus instructions to /compact, telling it what to keep. And /btw is the one I wish more people knew: it lets you ask a quick side question about the session without that question and answer cluttering the conversation history.
When you switch to an unrelated job, /clear gives you an empty conversation while keeping project memory. Pass a name, like /clear newsletter, and you'll find the old conversation by that name in the /resume picker later.
Before you hand work to someone else
/diff shows what changed in your files, including every edit Claude made. /code-review checks those changes for correctness bugs, and can apply the fixes if you add --fix. /security-review looks at the changes on your branch for security problems. If a review step is new to you, I've explained how Claude Code's review works in more detail.
When something goes wrong
/rewind is the undo button. It rolls code and conversation back to an earlier checkpoint, and you can also type it as /checkpoint or /undo. /doctor runs a setup checkup that diagnoses installation, settings and CLAUDE.md problems and proposes fixes, which Claude applies after you confirm. /debug turns on debug logging and reads it to troubleshoot, and /feedback sends a bug report with your session context attached. /status shows your version, model, account and connection, and it works even while Claude is busy.
Why a command might be missing for you
The commands page is clear that not every command shows for every user. Availability depends on your platform, your plan and your environment. Its examples: /desktop only shows on macOS and x64 Windows when you're signed in with a Claude subscription, and /upgrade doesn't show on Enterprise plans. Some commands also run differently in the desktop app, VS Code and the terminal. So if one is missing for you, that's the plan or the platform, not you. If you work in the app rather than the terminal, the Claude Code desktop app takes many of the same commands.
Want AI doing the heavy lifting in your marketing?
I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.
One more worth knowing about once you're comfortable: /loop runs a prompt repeatedly while the session stays open, which is the start of scheduled work in Claude Code.
The ones I'd learn first
I'd learn five: /init, /clear, /context, /rewind and /doctor. Between them you can set up a folder, start clean, see why a session's struggling, undo a mistake and fix a broken setup. I'd skip the rest until you hit the moment one of them is for, then come back to the table above.
If you'd like your team to get comfortable with Claude Code without learning every command, that's the kind of AI training I run. I run AI training and workshops for teams, and help businesses with AI enablement and workflow automation, so the busywork runs itself and people get time back. Most of that work is with SaaS marketing teams and small businesses. Here's how we can work together.
Frequently asked questions
How do I see all Claude Code commands?
Type / at the start of a message in a session. A menu shows the commands available to you, and typing letters after the slash filters the list.
How many commands does Claude Code have?
Anthropic's commands reference lists well over a hundred as of October 2026, but not every command shows for every user, because availability depends on plan, platform and environment.
What's the difference between /clear and /compact?
/clear starts a new conversation with empty context while keeping project memory. /compact keeps the same conversation and summarises it to free space.
How do I undo something Claude Code did?
Use /rewind, also available as /checkpoint or /undo. It rolls code and conversation back to an earlier checkpoint.
Why can't I see a command that's in the docs?
Some commands depend on your plan, platform or environment. For example, /desktop only shows on macOS and x64 Windows with a Claude subscription, and /upgrade doesn't show on Enterprise plans.


