Stop Wasting Your Claude Tokens: 10 Genius Hacks to Optimize Prompts and Save Money
From the publisher’s feed, collected in the ZeroLabs newsroom.
Usage metrics on ClaudeIf you’ve been building with AI lately, you already know that Anthropic’s Claude models are absolute powerhouses. Their massive context windows are a dream for developers, writers, and researchers alike.But here is the harsh reality: Claude doesn’t count messages like ChatGPT does. It counts TOKENS. Because Claude rereads your ENTIRE conversation history every single time you hit send, some conversations eat 10x more usage than others. Whether you are using the web browser, working in the terminal, or using an AI IDE, token bloat is the silent killer of productivity.Before we dive in, let’s establish your workspace. Token management looks a bit different depending on where you are using Claude:The Browser (Claude.ai): The standard web interface where chat history bloat is your biggest enemy.Claude Code: Anthropic’s terminal-based coding agent where prompt caching is your best friend.Google Antigravity: The powerful new agent-first IDE where selecting the right reasoning model (like swapping between Gemini and Claude 4.6) is crucial for your quota.Here are 10 proven hacks to stretch your Claude tokens further across all platforms.1. Edit Your Prompt, Don’t Send a Follow-Up[Best for: Browser]When Claude misses the mark, your instinct is probably to send a quick follow-up message saying, “No, do it like this instead.” Stop doing this immediately.The Hack: Click “edit” on your original message and regenerate. The old, incorrect response gets replaced instead of added to the chat history. Over a 10-round debugging session, this single habit cuts your token use by 80–90%.Editing the prompt2. The 15-Message Rule & Rolling Summaries[Best for: Browser / Antigravity]If you are having a long back-and-forth, the chat history grows exponentially. Your first message might cost around 200 tokens. By message 30, that exact same simple question is suddenly costing you 50,000+ tokens just in background context.The Hack: Start a new chat every 15–20 messages. Once you hit a natural milestone, ask Claude: “Summarize our progress and the key decisions made so far.” Copy that summary, open a fresh workspace or chat, and paste it in. You’ll drop thousands of dead tokens instantly.3. Match the Model to the Task[Best for: Universal]Don’t use a sledgehammer to crack a nut. This is the single highest-impact change you can make.Claude Opus: Deep research and hard logic.Claude Sonnet: Content writing, deep analysis, and heavy coding.Claude Haiku: Quick answers, brainstorming, grammar checks, and formatting.The Hack: Using Haiku all day for simple tasks frees up 50–70% of your budget/quota for the complex work that actually requires the bigger models.Model DropDown menu in Antigravity4. Set Up Memory and User Preferences[Best for: Browser]Every conversation you start without context burns setup messages just re-explaining who you are, what you are building, and how you want Claude to respond.The Hack: Go to your settings and store your context once. Add your role, your preferred tone, and your structural preferences. Claude will carry it into every single chat automatically, saving you thousands of setup tokens over time.5. Turn Off Unused Features[Best for: Browser / Antigravity]It is tempting to leave all the bells and whistles turned on, but features like Web Search, Research Mode, and external skills inject hidden text into your prompt behind the scenes.The Hack: Turn them off. They add tokens to every response, even when you don’t actually need them. The same applies to Extended Thinking — leave it off by default and only switch it on when your first standard attempt wasn’t good enough.Web Search is On6. Master the Magic of Prompt Caching[Best for: Claude Code / API]If you are using Claude Code in your terminal or hitting the API directly, Prompt Caching is a game-changer. Anthropic allows you to cache long, static contexts (like massive documents or large codebases).The Hack: Put your static, unchanging information at the top of your prompt and designate it for caching. Cached tokens cost a fraction of the price and process significantly faster. Put your dynamic, changing questions at the very end.7. XML Tags Are Your Best Friend[Best for: Universal]Claude was heavily fine-tuned to understand and process XML tags. Unlike other models that might need conversational cues to separate data, Claude thrives on structural precision.The Hack: XML tags prevent Claude from getting confused, reducing the need for you to write long, repetitive, and token-heavy explanations. Wrap your data in or tags, and keep your instructions outside of them.8. Ruthlessly Eliminate “Polite Fluff”[Best for: Universal]It feels natural to treat AI like a human, but your manners are costing you tokens. Words like “Please,” “Thank you,” and “Could you possibly…” add absolutely zero value to the model’s output.The Hack: Be direct. Treat the prompt like a command line interface. “Write a python script that does X” uses significantly fewer tokens than a polite paragraph.9. Optimize Your Few-Shot Examples[Best for: Universal]Giving the AI examples of the output you want is incredibly effective, but pasting 10 to 20 examples into your prompt is a massive token drain.The Hack: Claude is incredibly smart zero-shot (without examples). Try giving it clear instructions first. If it fails, add just one or two highly diverse, edge-case examples. You rarely need more than three.10. Cap Your Output Tokens[Best for: Claude Code / API]Sometimes Claude likes to be… overly helpful. If you ask it to fix a single function in a 500-line code script, it might confidently rewrite and output the entire 500 lines, burning through your output tokens (which are always more expensive than input tokens).The Hack: Explicitly restrict the output format. Add the phrase: “Only output the modified function. Do not output the rest of the script. Do not provide any conversational filler.”Final ThoughtsOptimizing your Claude prompts isn’t just about saving money; it’s about writing cleaner, more professional instructions. By editing your prompts instead of arguing with the AI, structuring your inputs, and managing your chat history, you’ll get faster responses and dramatically better outputs.Stop Wasting Your Claude Tokens: 10 Genius Hacks to Optimize Prompts and Save Money was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.