Claude Code Tips & Settings Guide
Three quick wins to stop hitting Claude Code usage limits: /model opus plan, /compact, and ultrathink. Plus a complete reference for model selection, CLAUDE.md, parallel worktrees, sub-agents, and the commands that actually move the needle.
Most people hit Claude Code's usage limits and assume they need a bigger plan. They don't. They just don't know how Claude Code actually consumes tokens. This guide covers the three quick wins from the video plus the broader settings that turn a frustrating tool into the most productive coding setup you've ever used.
The 3 Quick Wins (from the video)
1. /model opus plan
Type this at the start of any session that involves planning before coding:
/model opus planThis routes planning work to Opus 4.7 (the strongest reasoning model) and code-writing work to Sonnet (faster and cheaper). Opus burns tokens fast, so reserving it for planning saves you a huge amount of usage while keeping the strategic thinking sharp. The actual coding doesn't need Opus most of the time, Sonnet is more than enough.
2. /compact
Run this whenever your conversation gets long:
/compactClaude re-reads your entire chat history on every single message. A 50-message conversation is roughly 10x the cost of a fresh one. /compact compresses the whole thing into a tight summary so you can keep going without losing the important context. Run it any time the chat hits roughly 30+ messages, or whenever you notice responses slowing down.
3. "ultra think"
Add this phrase to any complex prompt:
ultra think, refactor this entire auth flow to use OAuthIt forces Claude to map out the whole problem before writing a single line of code. The output quality difference on complex tasks is significant. Claude works through edge cases, identifies dependencies, and avoids the half-baked first attempts you would otherwise need to throw away. Use it on architecture decisions, multi-file refactors, and anything where being wrong costs more than the extra thinking time.
Beyond the Basics: Model Selection
Claude Code lets you switch models on the fly. Picking the right one for the job is the single biggest lever you have on speed, cost, and quality.
/model commands
/model opus # Opus 4.7 for everything (most expensive)
/model opus plan # Opus for planning + Sonnet for coding
/model sonnet # Sonnet 4.6 for everything (best default)
/model haiku # Haiku 4.5 for simple tasks (fastest, cheapest)When to use each
- Opus: architecture decisions, complex refactors, debugging tricky issues, code review, security analysis
- Opus plan: any session where you want a strong plan upfront but routine execution after, the recommended default
- Sonnet: day-to-day coding, feature implementation, writing tests, most refactors
- Haiku: file organisation, simple search/replace, quick lookups, batch operations on many files
Conversation Management
/clear
Nukes the conversation and starts fresh. Use when you're switching to a completely unrelated task, or when the conversation has drifted into territory that's polluting Claude's context.
/compact (deep dive)
The /compact command runs Claude over your conversation and rewrites it as a structured summary, keeping decisions and important state while dropping verbose exploration. Three things to know:
- Compact runs through Claude itself, so it costs a small amount of tokens, but saves orders of magnitude more on every subsequent message
- You can /compact mid-task, Claude will preserve the current state of what you're working on
- If you compact too aggressively, you might lose nuanced context. Aim for every 30 to 50 messages, not every 10
/resume
Pulls up your previous conversations and lets you continue any of them. Useful when you closed the terminal mid-task and want to pick up exactly where you left off.
CLAUDE.md: The Persistent Context File
Drop a CLAUDE.md file in any project folder and Claude Code reads it automatically on every session. This is the single highest-leverage thing you can do for output quality.
What to put in CLAUDE.md
- Project overview: what this code does in 2-3 sentences
- Tech stack: language versions, frameworks, key dependencies
- Build/test/lint commands: the exact commands Claude should run to verify changes
- Conventions: how the codebase is structured, naming patterns, where things live
- Gotchas: known footguns, deprecated APIs to avoid, areas of the code that look weird but are intentional
- What NOT to do: any patterns you've decided against (e.g. "don't add an ORM, we use raw SQL on purpose")
Self-updating CLAUDE.md
Boris Cherny's tip from his Claude Code tips video: every time Claude makes a mistake, tell it to update its own CLAUDE.md so the mistake doesn't happen again. Over a few weeks the file becomes a custom rulebook for your project, and quality compounds.
Example minimal CLAUDE.md
# Project: my-api
## Stack
Python 3.12, FastAPI, Postgres 16, SQLAlchemy
## Commands
- Test: pytest tests/ -v
- Lint: ruff check .
- Type check: mypy src/
- Run: uvicorn src.main:app --reload
## Conventions
- Tests live next to the code they test (foo.py becomes test_foo.py)
- All API endpoints use Pydantic models for input/output
- Never edit migrations after they are merged, write a new one
## Gotchas
- The /webhook endpoint can't be moved, third parties hardcode it
- Background jobs use RQ, not Celery, despite the legacy code suggesting otherwiseExtended Thinking (ultra think and variants)
Claude Code supports several thinking trigger phrases that activate extended reasoning before output:
- think: light reasoning pass
- think hard: moderate reasoning
- think harder: deeper reasoning
- ultrathink or ultra think: maximum reasoning budget
Token cost scales with thinking depth. Use ultrathink for architecture, complex debugging, security review, anything you would ask a senior engineer to think hard about. Use plain prompts for simple edits, well-defined tasks, anything where the answer is obvious.
Parallel Sessions and Worktrees
Run multiple Claude Code sessions in parallel, each working on a different part of your project. This can finish work 3-5x faster than a single agent.
Setup with Git Worktrees
# Create a new worktree for a feature branch
git worktree add ../myproject-feature-auth feature-auth
# Open a new terminal in that worktree
cd ../myproject-feature-auth
claude
# Now you have two Claude Code sessions on the same repo, different branchesEach session has its own conversation, its own CLAUDE.md awareness (the file at the worktree's root), and they can't step on each other's files. Merge with AI assistance at the end:
# In the main worktree
git merge feature-auth --no-ff
# Ask Claude to resolve any conflicts intelligentlySub-agents: Specialised Workers
Sub-agents are scoped Claude instances with a specific job. Define them once in ~/.claude/agents/ and Claude Code routes appropriate tasks to them automatically.
When to build a sub-agent
- You do the same kind of task repeatedly (e.g. "write tests for this file", "review this PR for security issues")
- The task needs specific context or tool access that you don't want in your main session
- You want Claude to delegate work and continue in parallel
Common sub-agent patterns
- test-writer: writes unit and integration tests for any function or module
- code-reviewer: reads diffs and flags issues before commit
- doc-writer: generates docstrings and README sections
- dependency-auditor: checks for security vulnerabilities and outdated packages
- git-historian: searches git log for context on why something exists
Quick Reference
Essential commands
/model opus plan # Opus for planning, Sonnet for execution
/compact # Compress conversation history
/clear # Start fresh
/resume # Continue a previous conversation
/agents # List available sub-agents
/mcp # Manage MCP server connections
/help # Full command list
Shift+Tab # Toggle Plan Mode (think before doing)
Esc # Stop current generation
Esc Esc # Rewind to a previous checkpoint
Ctrl+G # Edit the current planPrompt prefixes
ultrathink, [complex task] # Maximum reasoning
think hard, [moderate task] # Moderate reasoning
plan only, [task] # Make a plan but don't executeCommon Mistakes That Burn Tokens
- Running Opus for everything when Sonnet would handle 80% of tasks
- Never running /compact, so each message re-reads a 100-message history
- No CLAUDE.md, so Claude has to explore the codebase from scratch every session
- Asking Claude to "figure out" instead of giving it the exact file paths and acceptance criteria
- Letting context drift across unrelated tasks instead of running /clear between them
- Skipping Plan Mode on multi-file changes and ending up with half-done implementations
New guides land in your inbox first
One short email a week with the tools and prompts worth your time. Free, and you can leave any time.