Claude Code cheat sheet.
The commands and shortcuts you reach for every day, on one page. Print it or save it as a PDF to keep beside your keyboard.
Start and resume
claudeStart a session in the current folderclaude "fix the login bug"Start with a task straight awayclaude -cContinue your most recent sessionclaude -rPick a past session to resumeclaude mcp addConnect an MCP server
In a session
Shift+TabCycle permission modes, including plan modeEscStop what Claude is doingEsc EscRewind to an earlier message@path/to/filePoint Claude at a file or folder! git statusRun a shell command yourselfCtrl+C twiceLeave the session
Slash commands
/initDraft a CLAUDE.md for the project/clearStart fresh between unrelated tasks/compactSummarise to free up context/contextSee what is using the context window/memoryView and edit loaded memory files/modelSwitch model/permissionsReview allow and deny rules/agentsManage subagents/mcpManage MCP servers/hooksManage hooks/helpList every command
Where things live
~/.claude/CLAUDE.mdYour memory, for every projectCLAUDE.mdProject memory, shared with the team.claude/settings.jsonTeam settings, committed.claude/settings.local.jsonYour settings for this project, not committed.claude/rules/*.mdRules that load for matching paths.claude/commands/*.mdCustom slash commands.claude/skills/name/SKILL.mdSkills Claude loads when relevant.claude/agents/*.mdSubagents.mcp.jsonShared MCP servers
Headless and CI
claude -p "task"Run once without the interactive screen--output-format jsonMachine-readable result at the end--output-format stream-jsonLive events as it works--allowedToolsLimit which tools it may use--max-turnsCap how long it can run
Hook events
PreToolUseBefore a tool runs; exit code 2 blocks itPostToolUseAfter a tool runs, e.g. auto-formatUserPromptSubmitWhen you send a promptSessionStartWhen a session starts or resumesStopWhen Claude finishes responding
Claude Code changes quickly. Run /help for the full, current list in your version.