Claude Code Essentials
After months of daily Claude Code use, at work and on side projects, the thing that moved the needle was not using it more. It was the setup around it.
Four practices made the difference for me:
- Be specific: give it rich, precise input
CLAUDE.md: teach it your codebase once- Plan Mode: let it think before it writes
- Context management: keep conversations short and on topic
1. Be Specific (Use Rich Input)
The less specific you are, the more room the model has to make assumptions, and they rarely match what you had in mind.
Example
Name the technology, the versions, and the outcome you expect. Say what it should look like and how it should behave.
Richer input than text
Depending on the task, add:
- Screenshots: drag and drop, or paste with Cmd+V (Ctrl+V on Windows and Linux). Designs, error states, UI you want fixed
- File references:
@filenameputs the file in context, with tab completion - Data: pipe it in:
cat error.log | claude - URLs: the docs for the library or API you want used
Since I started working this way, I went from three or four iterations per feature to usually getting it right the first time.
Specific prompts are necessary, but explaining your stack every session gets old. That's what CLAUDE.md is for.
2. Master CLAUDE.md Files
Before I used CLAUDE.md, I was explaining our codebase setup and structure every single session.
How it works
CLAUDE.md files are loaded hierarchically:
- Enterprise policy:
/Library/Application Support/ClaudeCode/CLAUDE.md(macOS), orC:\ProgramData\ClaudeCode\CLAUDE.md(Windows) - organization-wide instructions - Project memory:
/CLAUDE.mdor/.claude/CLAUDE.md- team-shared instructions for the project - User memory:
~/.claude/CLAUDE.md- personal preferences for all projects
Subdirectories can carry their own (frontend/CLAUDE.md, backend/CLAUDE.md), and any of them can pull in other files with @path/to/file. A new session loads whichever apply to the directory you started in.
What to include - An example
Best practices
- Keep it under 100 lines - Claude loads this every session, and bloat kills signal
- Test and refine - Like production prompts, test effectiveness and remove fluff
- Edit it from inside a session -
/memoryopens the loaded memory files, so a lesson goes in the moment you learn it - Version control project files - Check them into git for team collaboration
- Create multiple
CLAUDE.mdfiles - Root + subdirectory (frontend/CLAUDE.md,backend/CLAUDE.md) for focused guidance - Initialize with
/init- Claude can generate a starterCLAUDE.mdfor your project
3. Use Plan Mode
On simple changes like "add a loading spinner while the user data is pending", I'll start straight in ⏵⏵ accept edits on mode.
For anything touching multiple files or with side effects, I start in ⏸ plan mode on.
In plan mode, Claude reads and thinks before it writes. It weighs approaches, flags problems, and commits to one strategy before touching a file.
How to enter Plan Mode
- Press Shift+Tab until the status line reads plan mode
- Or say "plan this first" in the request
Give it room to think
Extended thinking is a toggle, Option+T on macOS and Alt+T elsewhere, and /effort sets how hard the model works on each turn. I keep thinking on in plan mode and raise the effort for:
- Unclear requirements that need exploring first
- Multi-file refactors and architectural changes
- Anything security-sensitive
Then ask a question that deserves the extra thought:
Store Plans as Files
For bigger features, have Claude write the plan to a file:
Now you have something to review before any code exists. Adjust the approach, add constraints, cut scope, all without spending tokens on implementation. Once agreed, the file stays the reference for the whole feature, across as many /clears as it takes.
4. Break It Down & Manage Context
The context window is 200k tokens by default, with 1M opt-in on the newest models. That sounds like plenty until you're deep in a debugging session and the answers get vaguer about your setup with every turn.
The problem with context pollution
- Auto-compact spends tokens summarising the conversation, and loses detail doing it
- Error logs, permission prompts and repeated output pile up
- Large MCP results, a whole page fetch or a big query, land in context and stay there
- Long conversations drift toward generic answers
Best practices for context management
- Use
/clearfrequently
I clear after every finished subtask. Once the code is committed and the tests pass, that context has done its job.
- Break large tasks into phases
- Be surgical with file references
- Instead of: "Look at everything in the
/componentsfolder" - Try: "Review
@components/AuthForm.tsxand@hooks/useAuth.ts"
- Let Claude write the breakdown
- Turn the breakdown into tickets
Then take each one in its own conversation.
The guiding principle
Keep the context window full of things that matter to the task in front of you, and nothing else.
Resources
Comments
more articles
Newsletter
Get an email when I publish something new.