6 Claude Code Commands Most Developers Never Use
Amine Lahmary·Aug 12, 2026·5 min read
1. /rewind — the undo you did not know you had
Before Claude Code edits a file, it quietly saves a snapshot. /rewind rolls your code and conversation back to any earlier point in the session.
Open it by typing /rewind, or press Esc twice when your input is empty. You get a menu with every step of the session. Pick one and choose:
- Restore code and conversation — revert both to that point.
- Restore conversation only — rewind the chat, keep the working code.
- Restore code only — keep the conversation, undo the files.
- Summarize from here — compress part of the conversation without touching files.
When to use it: a change broke something and you want to undo it. It is the single most underused safety command in the tool.
Two honest warnings. Bash actions are not tracked — if Claude ran rm, npm install, or pushed to a remote, /rewind cannot undo that. And it is not a replacement for git: checkpoints are local undo, git is permanent history. Use both.
2. /compact — rescue a long conversation
Every conversation has a context limit. When Claude's answers start feeling vague, or you get close to the limit mid-task, /compact summarizes everything so far and frees the window — without ending the session.
You can tell it what matters most:
/compact keep API decisions only
When to use it: long task, context filling up, not done yet. Compare with /clear, which wipes the conversation entirely — use /compact when you want to continue, /clear when you are switching to unrelated work.
3. /review — a second pair of eyes before you commit
/review checks your current diff for bugs, edge cases, and cleanup opportunities — before you push. It is an alias for /code-review, and it accepts an effort level and a target:
/review high # review the current diff carefully
/review --fix # review AND apply the fixes it finds
/review 1234 # review pull request #1234
/code-review ultra # deep multi-agent review in the cloud
When to use it: after a focused coding session, before you commit or open a PR. It evaluates the complete diff, not individual lines, so run it when the work is done — not mid-edit.
4. /doctor — a checkup for your installation
Something feels off and you cannot tell why — wrong version, broken PATH, weird config. /doctor runs a full setup checkup and diagnoses: duplicate installs, PATH problems, unparseable settings, unused skills or MCP servers wasting context, slow hooks, and outdated versions. It reports findings first, then offers to fix them (press f to apply).
From the terminal, claude doctor prints read-only diagnostics without starting a session.
When to use it: right after installation, and any time "something is weird." It turns a 30-minute guessing session into a 10-second answer.
5. /usage — know what a session really costs
/usage (aliases: /cost, /stats) shows your session cost, plan limits, and reset time. On paid plans it breaks usage down by skill, subagent, plugin, and MCP server — so you can see exactly where your tokens go.
When to use it: before a long agentic task to set a baseline, and after one to see what it actually cost. If you are on a subscription, this is also where you check whether you are near your limit before you hit it.
6. /mcp — plug in the tools you already use
MCP (Model Context Protocol) lets Claude Code talk to your existing tools: GitHub, a database, Linear, Notion, Slack, internal APIs. /mcp manages those connections — listing servers, reconnecting, and handling OAuth authentication.
/mcp # open the interactive server list
/mcp reconnect # reconnect one disconnected server
/mcp enable github # turn a server on without the menu
Once a server is connected, its tools are just a slash command away. When to use it: when Claude needs data or actions from a tool outside your codebase.
Which one should you start with?
Here is a quick cheat sheet:
| Command | Use it when |
|---|---|
/rewind |
A change broke something — undo it |
/compact |
Context is full but you are not done |
/review |
Before you commit or open a PR |
/doctor |
After install, or when something feels off |
/usage |
To check what a session costs |
/mcp |
When Claude needs your other tools |
Honorable mentions
Four more worth knowing: /security-review checks your branch diff for injection, auth, and data-exposure risks; /context shows a visual grid of what is eating your tokens; /btw lets you ask a side question that does not pollute the main history; and /goal tells Claude to work autonomously until a condition is met, like "all tests pass."
The real secret
Slash commands are not shortcuts for laziness. They are consistency tools — the same careful review, the same checkup, the same cost check, every single time. A /review that runs a complete checklist is more reliable than a developer who remembers 9 steps on a good day and 6 on a Friday.
You already own the full tool. Start using the six commands above tomorrow morning, and Claude Code stops being a chatbot and starts being a teammate.