> slash commands

Slash commands are typed into the prompt to control the session itself rather than ask Claude to do coding work — managing context, cost, checkpoints, and configuration. Type / to see the full list filtered as you type; it includes built-in commands, your skills, and commands from plugins and MCP servers. This section covers the built-ins you reach for most; you can also author your own as Markdown files in .claude/commands/.

// slash commands

7 commands

// faq

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

/compact summarizes the conversation into a shorter form and keeps going — use it on a long task when context fills up. /clear discards the conversation entirely and starts fresh — use it when switching to an unrelated task. Both keep the old conversation reachable under /resume, so nothing is truly lost.

How do I undo something Claude changed?

Run /rewind (or press Esc twice on an empty prompt) to open the checkpoint menu and roll code and conversation back to an earlier point. Checkpoints are captured automatically as Claude edits. Note that rewind only covers edits Claude made through its tools — changes you made by hand, or anything already pushed or deployed, aren't reverted.

How can I tell what's eating my context window?

Run /context for a visual breakdown of how the window is split between the system prompt, CLAUDE.md files, tools, MCP servers, and the conversation, with suggestions to trim. It's also the reliable way to confirm which CLAUDE.md files actually loaded — if one isn't in the breakdown, Claude can't see it.

Can I make my own slash commands?

Yes. Put a Markdown file in .claude/commands/ (project) or ~/.claude/commands/ (personal) and its filename becomes the command — deploy.md creates /deploy. The body is the prompt, $ARGUMENTS and $1/$2 inject arguments, and frontmatter sets description, allowed-tools, and model. These have merged with skills, so a .claude/skills/<name>/SKILL.md file works the same way.