The Claude Code Cheat Sheet: Master the 10 Commands That Matter

The Claude Code Cheat Sheet: Master the 10 Commands That Matter

Stop memorizing 50+ commands. This cheat sheet prioritizes the 10 slash commands and shortcuts you'll use daily to work faster and smarter.

Ggentic.news Editorial·7h ago·3 min read·2 views·via hn_claude_code
Share:

The Technique — Prioritized Command Mastery

Claude Code has over 50 slash commands, CLI flags, and keyboard shortcuts. Trying to learn them all is overwhelming. The curated cheat sheet from cc.storyfox.cz and community sources solves this by organizing commands by real-world usage frequency. It identifies the core 10 you need for 90% of your work, turning a reference list into an actionable workflow guide.

Why It Works — Context and Token Economics

This prioritization works because it aligns with how you actually use Claude Code: managing context windows, controlling costs, and maintaining flow. The top commands directly address Claude Code's unique constraints and strengths.

For example, /compact is the #1 command because long sessions are inevitable. When the context window warning appears, a targeted /compact Focus on TypeScript type definitions compresses the conversation while preserving what's relevant for your current task. This isn't just a convenience—it's a direct reduction in token consumption, which for API users means lower costs, and for all users means avoiding the "context exceeded" error.

Similarly, /model and /cost (or /stats for Pro users) form a feedback loop. You learn that switching to Sonnet for exploration (/model sonnet) and Opus for complex implementation (/model opus) is efficient. Checking /cost after a session teaches you the resource impact of your choices, enabling better decisions next time. The cheat sheet teaches the relationship between commands.

How To Apply It — Your New Daily Workflow

Integrate these prioritized commands into your routine. Here’s a step-by-step workflow based on the cheat sheet's top 10:

  1. Start a Session & Set Context: Begin with claude code . in your project. Use @ to mention key files immediately.
  2. Switch Models Strategically: Use Alt+P (the shortcut for /model) to switch without losing your typed prompt. Start with Sonnet for browsing and searching, then switch to Opus for the heavy lifting.
  3. Manage Long Sessions: After 30+ minutes or when you see a warning, run /compact. Be specific: /compact Focus on the auth module and current test failures.
  4. Review Before Committing: After any significant change, run /diff. Use the arrow keys to navigate between git diff and per-turn diffs to catch unintended changes.
  5. Check Your Usage: End your session with /stats (Pro) or /cost (API) to build intuition about task resource costs.
  6. Reset for a New Task: Use /clear (or /reset) at logical task boundaries to free the context window for the next problem.

Essential Keyboard Shortcuts:

  • Ctrl+C: Cancel generation. Your most important control.
  • Ctrl+G: Open your current prompt in your $EDITOR for complex, multi-line instructions.
  • Ctrl+T: Toggle the task list to see background agents.
  • Esc Esc: Rewind/undo the last turn—incredible for quick corrections.
  • Shift+Tab: Cycle permission modes (e.g., read-only vs. write) without touching the mouse.

The /fork Power Move: While not in the quoted top 10, a deep-cut command like /fork is invaluable. It creates a parallel session branch from any point in the history. Use it to experiment with a risky refactor or try an alternative implementation without corrupting your main session's context. It's the ultimate "what if" tool.

Stop treating the command list as a menu. Use this prioritized set as your core toolkit. The other 40+ commands are for edge cases you'll discover naturally.

AI Analysis

Claude Code users should immediately stop trying to memorize everything. Instead, internalize this priority list. The biggest shift is proactively using `/compact` with a focus directive *before* you hit context limits, not after. This alone will make long sessions more stable. Change your model-switching habit. The `Alt+P` shortcut is a game-changer because it lets you change models mid-prompt. Start typing a complex reasoning task, realize it needs Opus, hit `Alt+P`, select Opus, and continue—your prompt stays in place. Finally, make `/diff` and `/stats` (or `/cost`) part of your closure ritual for every session. Reviewing the diff ensures quality, and checking stats builds the meta-cognition needed to use Claude Code efficiently over time. These two steps, done consistently, will prevent bugs and optimize your token spend.
Original sourcecc.storyfox.cz

Trending Now

More in Products & Launches

View all