Getting More from Claude Code
It’s easy to treat Claude Code like a chat window. You type something in, see what comes back, nudge it in the right direction, and repeat until you get what you needed.
That works. But it’s not the full picture.
Every token spent on unnecessary back-and-forth, bloated context, or the wrong model for the job is a token not spent on your actual problem. Context windows are working memory. When they’re cluttered or unfocused, the output reflects it.
The best sessions aren’t the longest ones. They’re the ones where I showed up with a clear prompt, the right context loaded, and a session that hadn’t been dragging across three unrelated tasks. Efficiency isn’t just a cost concern. It’s a quality concern.
Here’s what makes the difference.
Match the Model to the Task
Claude Code lets you choose which model handles each task. Most people set it once and forget it exists.
That’s leaving something on the table. The three models each have a different sweet spot.
Haiku is the fastest and cheapest. Reach for it when the task is simple and well-defined: renaming a variable across a file, formatting output, generating boilerplate, or asking a quick factual question. When you know exactly what you want and the task doesn’t require judgment, Haiku gets it done without burning through your context budget.
Sonnet is the default for good reason. It handles the majority of real work: everyday coding tasks, content drafts, moderate debugging, code review, analysis. If you’re not sure which model to use, this is it.
Opus is for the hard stuff. Complex architectural decisions, bugs that require tracing state across multiple files, design choices with long-lasting consequences. When Sonnet’s answer doesn’t feel quite right, that’s often a signal to bring in Opus. It’s slower and costs more. On the tasks that warrant it, the difference shows.
The cost difference between Haiku and Opus can be 20x or more. That gap matters less on any single task and more across a full session of work. Defaulting to Opus for everything is like renting a crane to move a box. Know what you’re lifting.
Prompt Like You’re Writing a Spec
Vague prompts produce vague answers, then refinement, then more refinement. Two or three cycles of clarification costs more than writing a clear prompt the first time. Not just in tokens. In time.
Here’s what that actually looks like:
You: Help me write a client update email.
Claude: Happy to help. A few questions: Who is the client and what project is this for? What’s the main update you want to communicate? Is there a specific tone you’re going for?
You: Acme Corp. The data migration. We’re two weeks behind.
Claude: [Writes a 300-word email mentioning server infrastructure issues]
You: Too long. And don’t mention the server issues.
Claude: [Rewrites at 200 words]
You: Better. Can you add something about our mitigation plan?
Claude: [Rewrites again]
Four exchanges. Three drafts. The context window is carrying every message, every draft, and every revision. That’s roughly 1,000 tokens for a task that warranted maybe 250. Multiply that across a full working session and you hit your limits faster, the session gets noisier, and response quality drifts.
Compare that to:
You: Write a brief professional email to Acme Corp’s project lead. The data migration is running two weeks behind. Don’t cite technical causes. Close with one sentence on our revised go-live date and what we’re doing to stay on track. Under 150 words.
One exchange. One draft. About 250 tokens. Same email.
The discipline is front-loading the specificity. Say what you want, name the constraints, include what’s off the table. When Claude asks a clarifying question, take it as feedback: that’s something you could have said upfront.
Write Context to Files, Not Just to Prompts
If Claude needs to know something in every session, that information should live in a file, not in a prompt you retype each time.
CLAUDE.md is the standard starting point. It loads automatically into every session and is the right place for project-wide conventions, naming decisions, and constraints your team has agreed on. But it doesn’t have to stop there.
You can write to any number of markdown files and reference them explicitly when they’re relevant. A decisions.md that captures architectural calls you’ve already made, so Claude doesn’t propose re-litigating them. A client-context.md with background on a specific engagement. A constraints.md with hard requirements that apply to a particular task. You reference them directly in your prompt: “Read decisions.md before suggesting any changes to the data model.”
The effect is structured, selective context. Instead of dumping everything into a single session, you pull in exactly what’s relevant and leave the rest out. Cleaner sessions, more consistent behavior, less repetition.
Know When to Compact and When to Clear
Context accumulates. A session that started with one task and wandered through three others carries the weight of all of them. That weight shows up in responses.
The question isn’t whether to manage your context. It’s which tool to reach for.
Use /compact when you’re continuing the same thread of work. You’ve spent an hour designing a data model, landed on the right structure, and are ready to start building. The conversation that got you there doesn’t need to travel forward in full. You’ve been debugging something across 20 exchanges and finally isolated the issue. Compact before you fix it. You’ve finished planning a piece of work and are moving into execution. Compact and carry the decision forward, not the deliberation.
/compact summarizes the session into a shorter representation. The progress stays. The noise gets cut.
Use /clear when you’re actually done. You finished a task. You’re switching to something unrelated. You’re picking up tomorrow on a different project. The context you built up over the last session is no longer useful to what comes next, and carrying it forward just means the new work starts with a cluttered slate.
Clear after a deliverable lands. Clear when you switch clients or projects. Clear at the end of the day.
The default instinct is to keep adding to a session until something goes wrong. Fight it. Compact when the thread continues. Clear when it doesn’t.