Asset 20 8 2
Does AI recommend your business? Run the free check →

Join 15,000 business owners, marketers and entrepreneurs. The Sunday newsletter you'll be annoyed only arrives once a week.

Article

Claude Code Commands (2026): The Slash Commands Worth Learning First

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

CommandWhen you'd use itWhat it does
/initFirst session in a folderWrites a starter CLAUDE.md file
/memorySetting up or tidyingOpens your CLAUDE.md files and switches auto memory on or off
/permissionsSetting upManages your allow, ask and deny rules
/mcpConnecting other toolsManages connections to MCP servers
/planBefore a big changeSwitches to plan mode so Claude plans before it edits
/model and /effortWhen results feel slow or shallowChanges the model and how much reasoning it applies
/contextLong conversationsShows what's filling the context window
/compactLong conversationsSummarises the conversation to free space
/btwMid-task side questionAsks something without adding it to the conversation
/clearStarting a new taskStarts fresh while keeping project memory
/resumeComing back laterReturns to an earlier conversation
/diffBefore you hand work overShows what changed, including Claude's edits
/code-reviewBefore you hand work overChecks the changes for correctness bugs
/rewindSomething went wrongRolls code and conversation back to a checkpoint
/doctorSomething's brokenRuns a setup checkup and proposes fixes
/usageChecking your planShows 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.

Work with me

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.

Published and maintained by the Lilach Bullock team, covering marketing, AI and business growth.
Your buyers are asking AI who to use. Does it say you?

See for free whether ChatGPT, Claude, Perplexity, Gemini and Google name you, and get the plan to become the answer.

Check my AI visibility →
Sundays only

Get the Sunday newsletter.

One email a week. AI experiments, marketing tactics, and the workflows Lilach is building right now in her own business.

Subscribe free

Let’s get your marketing running on AI.

Book a free 30-minute call

We figure out what you need, where AI fits in, and what working together would look like.

Book the call →

Or take the 30-second calculator

You’ll see the hours and the money quietly leaking out of your week, and the three workflows worth building first.

Take the calculator →

Or grab the free AI resource library

Prompt packs, templates, checklists, and swipe files. The exact tools I build for paying clients. Yours, free.

Get the library →
Keep reading

More from the blog.