JSON Formatter & Validator
Format, validate & diff JSON — runs entirely in browser
A working reference for Claude Code — the slash commands, CLI flags, and keyboard shortcuts you actually reach for, current for 2026. Start with the ten commands that cover 90% of a session, then keep the full tables for when you need them.
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.
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 |
| 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.
What you run in the terminal before the session starts:
| Command | What it does |
|---|---|
claude | Start an interactive session |
claude "query" | Start interactive with an initial prompt |
claude -p "query" | Print mode — query via SDK, then exit (great for scripts and pipes) |
cat file | claude -p "query" | Pipe content in and process it headless |
claude -c | Continue the most recent conversation in this directory |
claude -r " | Resume a session by ID or name |
claude mcp | Configure MCP servers |
claude agents | Open the agent view to monitor and dispatch parallel background sessions |
claude doctor | Print installation and settings diagnostics |
claude update / claude install | Update to latest / install the native binary |
claude setup-token | Generate a long-lived OAuth token for CI and scripts |
| Flag | What it does |
|---|---|
--print, -p | Print the response without interactive mode |
--continue, -c | Load the most recent conversation in the current directory |
--resume, -r | Resume a specific session by ID or name |
--model | Set the model (alias or full name) |
--permission-mode | Begin in a specific permission mode (e.g. plan, acceptEdits, auto) |
--dangerously-skip-permissions | Skip permission prompts entirely (bypass mode — use with care) |
--add-dir | Add extra working directories Claude can read and edit |
--allowedTools / --disallowedTools | Allow tools without prompting / deny specific tools |
--agents | Define custom subagents dynamically via JSON |
--max-budget-usd | Cap the dollar spend on API calls before stopping |
--max-turns | Limit the number of agentic turns |
--effort | Set the effort level for the session |
--fallback-model | Auto-fall back to another model when the primary is unavailable |
--worktree, -w | Create and work in a git worktree |
--output-format | Output format for print mode: text, json, stream-json |
--verbose, -v | Verbose output |
| Key | What it does |
|---|---|
Esc | Interrupt Claude mid-turn (keeps work so far), or close an open dialog |
Esc Esc | Clear the input draft; on an empty prompt, open the rewind menu |
Shift+Tab | Cycle permission modes: default → acceptEdits → plan → (auto / bypass) |
Ctrl+C | Interrupt a running op; if idle, first press clears input, second exits |
Ctrl+D | Exit the session (double-press to confirm) |
Ctrl+L | Redraw the screen (fix a garbled terminal); twice = /clear |
Ctrl+R | Reverse-search command history |
Ctrl+O | Toggle the transcript viewer (detailed tool usage) |
Ctrl+B | Background running Bash tasks and agents |
Ctrl+T | Toggle Claude's task checklist |
Ctrl+V / Cmd+V | Paste an image from the clipboard as an [Image #N] chip |
Option/Alt+P | Switch model without clearing your prompt |
Option/Alt+T | Toggle extended thinking |
Shift+Enter / Ctrl+J / \+Enter | Insert a newline (multiline input) |
@ | Mention a file to attach it to the prompt |
! | Run a shell command inline (bash mode) |
# | Add a line to CLAUDE.md memory |
Most people learn the commands and stop there. Three habits matter more than the rest.
Watch your context with /context, not by vibes. A bloated context window makes responses slower and worse. The colored grid shows exactly what is consuming tokens — old file reads, a long tool result, a verbose subagent — so you know whether to /compact or /clear. If you want to model the token cost before you run something big, our free AI token estimator gives you the number up front. The deeper mechanics of what actually costs tokens are in our breakdown of the Claude Code cost system.
Live in Shift+Tab. Cycling permission modes is the single biggest control on how autonomous a session feels — plan mode to think before touching code, acceptEdits to stop confirming every write, back to default when you want the brakes on. It is faster than reaching for a flag on restart.
Treat CLAUDE.md as the real interface. The # shortcut and /memory let you encode project rules once instead of re-explaining them every session. A well-built CLAUDE.md plus custom skills is what separates a tidy Claude Code setup from a chaotic one — it is the same discipline packaged in our Claude Code Production Pack, which ships the agents, skills, and rule files that run a real production repo. If you are wiring in your own tools, the MCP server build guide walks the TypeScript path.
Bookmark this page and check /help in your install for anything version-specific — the surface moves fast, and this reflects Claude Code v2.1.x in 2026. The commands are free; the setup that makes them pay off is the part worth building.
Every Claude Code product mentioned is available at wowhow.cloud — pay once, ship forever.
Written by
WOWHOW
The WOWHOW team brings 14+ years of production engineering experience. Every tool and product in the catalog is personally built, tested, and curated.
Monday Memo · Free
1 field report, 3 links, 1 tool we actually use. No fluff, no spam.
Free browser tools with no signup, plus 2,000+ premium dev templates and starter kits.
Useful developer and business tools — no signup required
Pairs with this note
The difference between a CLAUDE.md that works and one that gets ignored is not writing quality — it is enforcement, specificity, and scars. After a year of running a real store on Claude Code, here is the anatomy of rules that hold.
Test regex live — railroad diagrams + plain English explained
The Supabase + Next.js boilerplate market sorted itself into two clear camps this year: speed kits for solo founders and architecture platforms for teams. Picking the wrong camp costs more than the license fee — here is the map.
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.