Free reference
The Claude Code cheat sheet
86 commands, shortcuts, flags and files, searchable and printable. Bookmark it.
| claude | Start an interactive session in the current folder | lesson → |
| claude "prompt" | Start a session with a first prompt | lesson → |
| claude -c | Continue the most recent conversation in this folder | lesson → |
| claude -r [name] | Resume a session by name or ID, or pick from a list | lesson → |
| claude --from-pr 1234 | Resume the session linked to a pull request | lesson → |
| /context | Show what's using the context window (/context all for detail) | lesson → |
| /compact [focus] | Summarize the conversation; add focus instructions to keep what matters | lesson → |
| /clear [name] | Start a fresh, empty conversation (optionally naming the one you leave) | lesson → |
| /btw [question] | Ask a side question that isn't added to history | lesson → |
| /rename <name> | Name the current session | lesson → |
| /resume | Open the session picker | lesson → |
| /branch | Branch the conversation to try an alternative | lesson → |
| /fork | Copy the conversation into a background session | lesson → |
| /export [file] | Export the conversation to a file | lesson → |
| /rewind | Roll back code and/or conversation to a checkpoint | lesson → |
| /goal <condition> | Keep working across turns until a checkable condition is met | lesson → |
| Esc | Interrupt Claude; work done so far is kept | lesson → |
| Esc Esc | On an empty prompt: open the rewind menu | lesson → |
| Shift+Tab | Cycle permission modes (Manual → Accept edits → Plan → Auto) | lesson → |
| Ctrl+R | Reverse-search prompt history | lesson → |
| Ctrl+G | Open the prompt or plan in your external editor | lesson → |
| Ctrl+B | Send running tasks to the background | lesson → |
| Ctrl+O | Open the transcript viewer | |
| Ctrl+T | Show the task checklist | |
| Ctrl+V | Paste an image (Alt+V on Windows/WSL) | lesson → |
| Alt+P | Switch model | lesson → |
| Shift+Enter | New line in the prompt (or \ then Enter) | |
| ? | On an empty prompt: show shortcut help | lesson → |
| / | Slash commands and skills | lesson → |
| @path | Mention a file or folder to pull it into context | lesson → |
| @server:proto://res | Attach an MCP resource | lesson → |
| ! | Shell mode: run a command and add its output to context | lesson → |
| ultrathink | Include in a prompt to raise effort for one turn | lesson → |
| /init | Generate or improve a starter CLAUDE.md | lesson → |
| /memory | View and edit memory files; toggle auto memory | lesson → |
| /config | Open settings | lesson → |
| /status | Show account, model and loaded settings sources | lesson → |
| /permissions | Manage allow / ask / deny rules | lesson → |
| /sandbox | Configure OS-level sandboxing for shell commands | lesson → |
| /model | Switch model (opus, sonnet, haiku) | lesson → |
| /effort | Set reasoning effort: low, medium, high, xhigh, max | lesson → |
| /fast | Toggle fast mode | lesson → |
| /output-style | Switch how responses are written | lesson → |
| /statusline | Set up a custom status line | lesson → |
| /doctor | Check your setup and suggest fixes | lesson → |
| /usage | Show usage and limits (alias /cost) | lesson → |
| /login · /logout | Switch accounts | lesson → |
| /hooks | Browse configured hooks | lesson → |
| /mcp | Manage MCP servers: status, auth, reconnect | lesson → |
| claude mcp add | Add an MCP server (--transport http|stdio, --scope) | lesson → |
| claude mcp list | List MCP servers and their status | lesson → |
| /skills | Manage skills | lesson → |
| /reload-skills | Pick up a newly created skills directory | lesson → |
| /agents | Get pointers for creating subagents in .claude/agents/ | lesson → |
| /plugin | Discover, install and manage plugins | lesson → |
| /plugin marketplace add | Add a plugin marketplace | lesson → |
| claude --plugin-dir ./p | Load a local plugin for one session | lesson → |
| /plan [task] | Enter plan mode (optionally with a task) | lesson → |
| /code-review [pr] | Review the diff, a branch or a PR (--fix applies fixes) | lesson → |
| /security-review | Review pending changes for vulnerabilities | lesson → |
| /batch <change> | Split a large change across parallel worktree workers | lesson → |
| claude -w <name> | Start a session in a new git worktree | lesson → |
| /install-github-app | Set up the GitHub app and Actions workflow | lesson → |
| /loop [interval] <prompt> | Repeat a prompt on an interval in this session | lesson → |
| /schedule | Create a cloud scheduled task | lesson → |
| claude -p "…" | Run non-interactively and print the result | lesson → |
| --output-format json | Machine-readable result with session_id and cost (or stream-json) | lesson → |
| --allowedTools | Pre-approve tools, e.g. "Read,Edit,Bash(pnpm test *)" | lesson → |
| --permission-mode | default · acceptEdits · plan · auto · dontAsk · bypassPermissions | lesson → |
| --max-turns N | Cap turns in print mode | lesson → |
| --max-budget-usd N | Cap spend in print mode | lesson → |
| --model <alias> | Choose the model for the run | lesson → |
| --resume <id> | Continue a specific conversation | lesson → |
| --bare | Skip auto-discovery of local config for reproducible CI | lesson → |
| --agent <name> | Run the whole session as a custom subagent | lesson → |
| CLAUDE.md | Project memory loaded every session (keep it under ~200 lines) | lesson → |
| CLAUDE.local.md | Personal project memory (gitignore it) | lesson → |
| ~/.claude/CLAUDE.md | Your memory across all projects | lesson → |
| .claude/rules/*.md | Rules, optionally path-scoped with paths frontmatter | lesson → |
| .claude/settings.json | Shared project settings: permissions, hooks, env | lesson → |
| .claude/settings.local.json | Personal project settings (gitignored) | lesson → |
| .claude/skills/<name>/SKILL.md | A project skill | lesson → |
| .claude/agents/<name>.md | A project subagent | lesson → |
| .mcp.json | Project-scoped MCP servers (shared) | lesson → |
| .claude-plugin/plugin.json | A plugin's manifest | lesson → |
| .worktreeinclude | Gitignored files to copy into new worktrees | lesson → |
✓
Print it
Press Ctrl+P (or ⌘P) to print a clean copy for your desk. And inside Claude Code, /help and ? show what's available in your version.