Claude Code Cheat Sheet
TL;DR Highlight
A auto-updating one-page cheat sheet for Claude Code shortcuts, commands, and config.
Who Should Read
Developers who use Claude Code daily but keep forgetting slash commands, flags, and settings.
Core Mechanics
- Everything on one page
- It covers shortcuts, slash commands, MCP, memory (CLAUDE.md), skills, CLI flags, settings, and env vars.
- The page shows Claude Code v2.1.304, last updated October 20, 2026.
- Context and cost commands exist
- /context shows context usage as a grid, and /compact [focus] compresses with a chosen focus.
- /usage shows tokens, cost, and cache breakdown, and replaces /cost and /stats.
- Flags like --max-budget-usd 5 cap spending.
- Headless and automation options
- claude -p "query" runs non-interactively, and --output-format json gives structured output.
- You can pipe input with cat file | claude -p.
- /loop 5m msg runs a recurring task.
- Tools for isolating work
- --worktree name creates an isolated branch per feature, and /batch makes large parallel changes across 5-30 worktrees.
- Subagents can run in their own worktree via isolation: worktree in frontmatter.
- Permission modes in steps
- default prompts each time, acceptEdits auto-accepts edits, and plan is read-only.
- dontAsk denies unless allowed, and bypassPermissions skips everything.
- Shift+Tab cycles modes, and --permission-mode plan starts in plan mode.
- Fixed locations for memory and rules
- Use ./CLAUDE.md for the project, ~/.claude/CLAUDE.md for personal, and ./CLAUDE.local.md (gitignored) for local-only.
- .claude/rules/*.md holds project rules, and a paths: frontmatter scopes rules to paths.
- Many skill and agent frontmatter options
- Skills can set allowed-tools, model, effort, context: fork, and more in frontmatter.
- /skill-doctor finds unused skills and their context cost.
Community Reactions
- Underused commands can be handy
- One commenter found /insights genuinely useful.
- The same commenter said the CLI sometimes feels very slow.
- Errors in the sheet were pointed out
- One commenter said pasting images on Mac is CTRL+V, not CMD+V.
- Another said the MCP Local scope path should be .claude.json (per project), not prefixed with ~.
- Someone asked what the 'Session Picker' section refers to.
- Missing items suggested
- Several commenters said --dangerously-skip-permissions is missing and is the flag they use most.
- One tip: Ctrl+S stashes your prompt so you can run a slash command mid-draft.
- One commenter said there are many more env vars, and IS_DEMO=1 trims the welcome banner.
- Pushback that it's unnecessary
- Several commenters said you can just ask Claude Code to generate its own cheat sheet.
- Another said it would be stale within a week.
- The author said a daily cron checks the changelog, updates the sheet, and adds NEW badges.
How to Apply
- Audit your CLAUDE.md with /doctor
- Run /doctor prompt-audit in your current project to check for stale model references in CLAUDE.md.
- Then run /skill-doctor to find and clean up unused skills.
- Put a cost cap on CI scripts
- Add --max-budget-usd and --output-format json to claude -p calls in automation scripts.
- Parse the JSON output and pass it to later steps.
- Use /context and /compact in long sessions
- When responses start to drift, check usage with /context.
- Run /compact with the focus you want to keep.
- Split work by feature with worktrees
- For parallel work, start with claude --worktree feature-name to get an isolated branch.
- Use /batch to run large changes in pieces.
Try It
# Paste into the Claude Code terminal as-is (cheat-sheet-based setup audit prompt)
Audit my Claude Code setup for this project.
1. Use the /doctor prompt-audit result to find stale model references in CLAUDE.md.
2. Use /skill-doctor to list unused skills and their context cost.
3. Based on {{my common tasks}}, suggest permission rules worth adding to settings.json.
Don't change anything; just show me the list.Terminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques