The complete Claude Code cheat sheet: every slash command, CLI flag, and keyboard shortcut that matters, current for 2026. Bookmark it — sourced from the official docs.
The ten commands below cover about 90% of a Claude Code session: /clear to reset context, /compact to summarize it, /context to see what is eating it, /model to switch models, /rewind to undo code and conversation, Shift+Tab to cycle permission modes, Esc to interrupt, Esc Esc to rewind, @ to attach a file, and ! to run a shell command inline. Everything else in this cheat sheet is the long tail you reach for less often but want on hand.
This is current for 2026 (Claude Code v2.1.x) and sourced from the official command reference, CLI reference, and interactive-mode docs. Availability varies by platform, plan, and version — check /help in your own install for the authoritative list.
Slash commands — the daily drivers
Type / at the start of a message to filter these. The ones you will actually wear out:
| Command | What it does |
|---|---|
/clear (aliases /new, /reset) | Start a fresh conversation with empty context |
/compact [instructions] | Summarize the conversation to free up context without losing the thread |
/context [all] | Visualize current context usage as a colored grid — find what is bloating it |
/model [model] | Switch model mid-session |
/rewind | Roll code and conversation back to a checkpoint |
/plan | Switch into plan mode before a large change |
/effort [level] | Set model effort: low, medium, high, xhigh, max, ultracode |
/usage (alias /cost) | Show token usage and cost for the session |
/resume [id] | Return to an earlier conversation or session |
/config (alias /settings) | Open settings — theme, model, preferences |
/memory | Edit CLAUDE.md memory files and manage auto-memory |
/init | Generate a CLAUDE.md guide for the current project |
Slash commands — review, workflow, and power tools
| Command | What it does |
|---|---|
/code-review [level] [--fix] [pr# | branch | path] (alias /review) | Review a diff or PR for correctness bugs and cleanup |
/security-review | Check the diff for security vulnerabilities |
/pr-comments [--fix] | Post review findings as inline GitHub PR comments |
/verify | Verify that code changes actually work |
/simplify | Remove duplication and complexity from changed code |
/agents | Manage subagent configurations |
/subtask [prompt] | Hand a side task to a subagent; its result returns to your conversation |
/background [prompt] / /fork [prompt] | Detach or copy the session to run as a background agent |
/loop [interval] [prompt] | Run a prompt repeatedly while the session stays open |
/goal [condition] | Set a goal — Claude keeps working until the condition is met |
/batch | Orchestrate large-scale changes across a codebase in parallel |
/hooks | View hook configurations for tool events |
/permissions | Set approval rules for file and command execution |
/mcp | Manage MCP server connections and OAuth |
/diff | Open an interactive diff of uncommitted changes |
/export [file] / /copy [N] | Export the conversation as text / copy the last response |
/doctor | Run a setup checkup that diagnoses and can fix issues |
/vim | Open the response in your $EDITOR |
One structural change worth knowing: custom slash commands are now skills. A file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy. Existing .claude/commands/ files keep working; skills add a supporting-file directory and frontmatter to control whether you or Claude invokes them.
Comments · 0
Beta: comments are stored locally on your device and not visible to other readers.
No comments yet. Be the first to share your thoughts.