CC-101 · Module 1
Essential Commands
4 min read
Use /clear to wipe the current context window. Great when switching tasks to prevent old context from polluting new work.
Equivalent to opening a fresh Claude instance. Use this between unrelated tasks to keep context clean and focused. Old context can cause the AI to make incorrect assumptions about your current task.
View a visual breakdown of what's consuming your context window — MCPs, files, conversation history, etc.
Critical for auditing token usage. If Claude seems to be regressing or your bill is climbing, check /context to identify the biggest offenders. MCPs are a common source of token bloat. Regularly audit this view.
Claude Code automatically compacts (summarizes) context during long sessions. Let it do its job — it works well.
Auto-compaction summarizes your context when it gets too large. It does a good job preserving important information. You can manually trigger /compact, but it's rarely needed. The author only manually compacts when saving context to a "second brain" system.
Change models mid-session with /model. Use Opus for complex reasoning, Sonnet for routine tasks if cost-sensitive.
If you have unlimited tokens (e.g., at work), default to Opus. If cost-sensitive, use Sonnet for simpler tasks. You can switch freely during a session based on the complexity of what you're doing.
Use /resume to recover a previous Claude Code session if you accidentally close or kill the wrong terminal.
Recovers your old context so you don't lose the work you invested in building up that conversation. Essential safety net alongside git.
Check which MCPs are installed and active. Be selective — MCPs significantly inflate your context window.
Only install MCPs that are truly needed for your specific project. MCPs blow up token usage. The author tries very hard to minimize MCP usage and prefers writing scripts manually for validation when possible.
Use /help to see all available commands, shortcuts, and their descriptions.
The comprehensive reference for everything available in Claude Code. Start here when you're unsure about a command or want to discover new features.