The Claude Code Cheatsheet
Essential commands, workflows, and tips for AI-assisted coding — all on one page.
- Every essential Claude Code command with examples
- Workflow patterns for debugging, refactoring, and building features
- Pro tips for getting better results from AI pair programming
- Quick-reference format — print it, pin it, use it daily
No spam. Unsubscribe anytime.
Preview: 10 Commands Every Developer Should Know
claude
Launch Claude Code in your current directory. It reads your codebase and understands the project context automatically.
/init
Generate a CLAUDE.md file that teaches Claude about your project conventions, architecture, and preferences.
/compact
Summarize the current conversation to free up context window space during long sessions.
claude -p "your prompt"
Run a one-shot prompt without entering interactive mode. Pipe output to files or other commands.
claude commit
Generate a commit message from your staged changes. Understands diff context for meaningful messages.
/cost
Check your token usage and estimated cost for the current session.
/review
Ask Claude to review your recent changes and suggest improvements before committing.
Shift+Tab
Toggle between normal and auto-accept modes. In auto-accept, Claude runs tools without asking for permission.
cat file.py | claude -p "explain this"
Pipe any file or command output directly into Claude for analysis. Works with logs, errors, and code.
/model
Switch between Claude models mid-conversation. Use Haiku for quick tasks, Opus for complex reasoning.
The full cheatsheet includes 30+ commands, workflow patterns, and pro tips for debugging, refactoring, and building features with AI.