the writing ai & claude code 8 min updated

Claude Code Slash Commands: A Practical Cheat Sheet

A task-first lookup for Claude Code slash commands, plus how to tell built-ins from skills and why a command goes missing in your session.

Terminal window with a slash prompt and a dropdown list of commands beside a small checklist card.

Type / in Claude Code and a menu appears; type a few letters and it filters. That menu is the real reference, because it reflects your installed version, your plugins and your connected servers. The official commands reference is the document to trust for what each command does. This post sorts the commands people reach for by task, shows how to inspect and resume a session, explains why an entry might be missing on your machine, and marks where custom skills stop being a lookup problem and become an authoring one.

Quick reference: pick a command by task

Start from what you want to happen, not from the command name. The table below is compiled from the official docs plus the third-party cheat sheets listed at the end of this section. Treat it as a starting point and confirm each row against /help in your own install, because I have not run it against any particular CLI build and the sources don't all agree on every detail.

TaskCommandNotes
List what's available/helpShows commands, including custom and connected-server ones
Start fresh/clearThe Claude Help Center lists /reset and /new as aliases
Free up context/compactTakes optional focus instructions
See where context is going/contextVisual breakdown of window usage
Continue earlier work/resumePicker, or pass a name
Undo code and/or conversation/rewindEsc Esc opens the same kind of menu
Ask a side question/btwStays out of the main conversation
Review what changed/diffInteractive diff viewer per one cheat sheet
Switch model/modelEffort level has its own /effort
Check install health/doctorDiagnoses Claude Code problems
Enter plan mode/planAlso reachable via Shift+Tab
Generate a starter memory file/initWrites a first CLAUDE.md
Manage integrations/mcp , /hooks , /agents , /ideOne each for servers, hooks, subagents, editors

The Claude Help Center cheatsheet and devhints are the two compact lists I'd keep open next to the official reference. One author, at CC for Everyone, argues you should never memorise any of this, and that the ten worth knowing by reflex are the ones you reach for mid-thought. Fair. I'd add that the table is for the other 90%, the commands you use twice a month.

Inspect your session and diagnose a problem

When something feels off, don't guess. Work through a short sequence, cheapest check first.

  1. Run /help and confirm the command you expect actually appears.
  2. Run /doctor to check the installation.
  3. Run /context to see whether the window is crowded with something you forgot about.
  4. Run /usage to see plan limits and rate-limit status (and /cost if your version still has it, more on that below).
  5. If a tool or server is the suspect, open /mcp or /hooks and look at what's configured.

That's it. Five steps, and most "Claude is being weird" sessions resolve before step five.

What the output looks like

I'm describing shapes here, not pasting captured output, since I'd rather not hand you numbers that look measured when they aren't. /help gives you a scrollable list of command names with one-line descriptions, and your own custom entries sit in the same list. /context renders a grid or bar showing how much of the window is used and by what category. /doctor prints a pass or fail style report on your setup. If yours looks different, your version differs. That's normal.

Reading the diagnosis

A context grid that is mostly full with tool output points to a compaction or clear problem, not a model problem. A missing command points to version, plugin or scope. A hook misfiring points to configuration, and the hooks guide covers that side properly. Separate those three early. Mixing them up is how people lose an afternoon.

Manage context and resume work

Context is the thing you'll manage most. Three commands do the heavy lifting, and they differ in how much they throw away.

  • /compact summarises the conversation so far. You can pass focus instructions, for example telling it which part to preserve.
  • /clear wipes the conversation and starts again. Per the Help Center, project memory stays.
  • /rewind rolls the conversation, your code, or both back to an earlier checkpoint.

One walkthrough on AI For Developers suggests checking /context when you finish a logical chunk, running /compact before the next phase, and using /clear only when switching to something unrelated. That's a reasonable routine. It is a heuristic, though, not a rule from the docs. I've seen no evidence for a universal fill percentage at which you must compact, so pick your own trigger and see whether output quality changes for you.

Side questions and rewinds

/btw is underused. Per the Help Center it asks a quick side question without adding it to the main conversation or consuming context. Handy when you want to check a flag name and don't want it polluting the thread.

Rewinding is better than arguing. If Claude has gone down the wrong path, roll back to the checkpoint and re-prompt with what you now know. Pressing Esc Esc opens a rewind menu where you pick code only, conversation only, or both, according to the AI For Developers write-up.

Resuming

/resume opens a picker of past sessions, or takes a name to jump straight to one. From the terminal, the sources describe claude --continue for the most recent session and claude --resume with a session ID for a specific one. Shipyard's cheatsheet lists both flags. Some third-party lists also show short forms (-c , -r ), so check claude --help before relying on them.

How these fit into a full day of work is a different question, and I've covered it in the daily founder workflow post.

Built-in commands, bundled skills and installed commands

Here's the mistake I see in cheat sheets: every /something gets called a built-in command. It isn't. The slash menu is a merged list from several places.

Line-art manifold where three pipes merge into one outlet with a gauge
  • Fixed commands that are part of the CLI itself, such as /clear or /help.
  • Prompt-based skills that ship with Claude Code.
  • Skills or commands you wrote, in project or user folders.
  • Entries contributed by plugins and connected MCP servers. Shipyard notes that /help includes commands from connected MCP servers as well as your custom folders.

The official skills docs say custom commands have been merged into skills. So a file under .claude/commands/ and a skill with a SKILL.md can both show up as a slash entry. Older guides still describe .claude/commands/ as a separate mechanism, and that's partly why the terminology is a mess.

How to classify an entry

You have two practical checks. First, read the description in the menu; custom entries usually carry your own text. Second, look for the file. If a matching file exists in your project or user config folders, it's yours. If not, check the commands reference, which is the place to confirm how Anthropic classifies each documented entry. I won't sort every command into a bucket here, because I'd be guessing for some of them.

Why bother? Because behaviour differs. A fixed command acts on the app. A skill hands Claude a prompt and lets it work, so the result can vary between runs.

Why a command is missing or behaves differently

No command in the list? Run through these causes in order.

Version drift

Commands get added, renamed and aliased. The clearest example in the research is usage reporting. The Help Center lists /cost for session spend and /usage for plan limits as separate commands. Another cheat sheet says /usage replaces /cost and /stats , and DataCamp says /cost is now an alias for /usage . Those can all be true at different versions. Same story with /model : DataCamp notes that as of v2.1.153 your selection becomes the default for new sessions, with s in the picker to apply it to the current session only. If your install is older, you'd see different behaviour.

So run claude --version, write it down, and compare against the docs before you blame yourself.

Scope and eligibility

Some entries depend on your plan, your platform or your terminal. The AI For Developers guide says /cost is for API users and /stats for Pro and Max subscribers. /focus is described by one cheat sheet as fullscreen only. Shift+Enter needs /terminal-setup in some terminals. Absence from your menu can mean ineligible, not nonexistent.

Not documented

I've left out anything I couldn't point to the official reference for. If you see a command mentioned in a forum post or a social thread and it isn't in the commands reference, don't assume it's fake, and don't assume it's yours to rely on either. Look for a release note or support article, then check /help locally. Absence from the reference is a reason to verify, not proof either way.

Name collisions and typos

A custom entry can share a name with something else, and plugin entries may be namespaced. If a command does something unexpected, check whether you've defined one with the same name before suspecting a bug.

Where custom skills fit

This post stops at lookup. If you've concluded that you want your own /something , that's an authoring job: writing a SKILL.md, choosing where it lives, handling arguments. That belongs to the skills documentation, and I'm not going to repeat a starter-pack tutorial here.

What I will say is how the three concerns separate:

  • Command lookup: which entry exists and what it does (this post).
  • Authoring: how to build your own entry (the skills docs).
  • Mechanism choice: whether a skill, a hook or a subagent suits a given job.

That last one trips people up. A hook runs on events and doesn't wait for you to type anything, which is a different animal from a slash entry you invoke on demand. The hooks guide linked earlier handles that comparison.

If you want these commands folded into a repeatable routine instead of one-off lookups, the Claude Code workflow page is where I'd send you.

FAQ

Do I need to memorise these commands?

No. The / menu filters as you type, and /help lists everything your install offers. A handful are worth knowing by reflex: /clear , /compact , /resume and /rewind. Everything else can stay in the menu.

Does Esc always interrupt Claude?

It's supposed to stop the current action while keeping work done so far. CC for Everyone notes that users have filed GitHub issues where it didn't interrupt long operations, and suggests Ctrl+C as the fallback. Treat Esc as the first try, not a guarantee.

What's the difference between /clear and /compact?

/clear throws the conversation away and starts again, while project memory stays. /compact keeps a summary so you can carry on with less context used. Use /compact when the task continues and /clear when it doesn't.

Why do two cheat sheets disagree about /cost and /usage?

They were probably written against different versions, and the commands have changed over time. Check claude --version, then read the current entry in the official reference rather than picking whichever blog post you found first.

The sharpest caveat in all this: a slash command is only as documented as the version you're running, so /help and the official reference beat any cheat sheet, including this one. And a missing entry usually means version, plan or scope, not a broken install.

this post in the tree

Need this done, not just read?

Discuss your website Book 30 minutes