4 Claude Code Hacks to Cut Token Usage by 80%
4 Claude Code Hacks to Cut Token Usage by 80%
Stop hitting limits quickly.
If you are using Claude Code for development, you know how quickly you can burn through tokens and hit context limits. Whether it's the verbosity of the AI or the raw output of tool calls, wasted tokens slow down your workflow.
Here are 4 hacks (and the open-source tools behind them) to drastically reduce your token usage.
#1 Caveman Skill
The Concept: Make Claude talk like a caveman.
By forcing the LLM to strip away all conversational filler and fluff, you save significantly on output tokens. It’s about getting the code, not the pleasantries.
- How it works: Removes filler & fluff to save on tokens.
- Usage: Run with
/cavemancommand. - GitHub: guillaumemeyer/watermarks-remover
Impact: 65% less output tokens
#2 Context-mode
The Concept: Keep your context window clean.
Usually, tool calls dump massive amounts of raw output directly into your context window, filling it up with noise. Context-mode changes this by running tools in a sandbox.
- How it works: It runs tool calls in a sandbox and sends only the answer back to Claude, rather than the raw dump.
- Persistence: Session memory survives
/compacttoo. - GitHub: mksglu/context-mode
Impact: 98% less tool output in context
#3 Pxpipe
The Concept: Turn text into pixels.
Pxpipe is a clever utility that converts code and text into images before sending them to Claude Code. Since image tokens are often more efficient for dense code than raw text tokens, this can result in massive savings.
- How it works: Converts code and text to images, saving tokens, then sends them to Claude Code.
- GitHub: teamchong/pxpipe
Impact: 70% less input tokens
#4 Use Blacdisk
The Concept: The "All-in-One" solution.
If you want to implement all these strategies without juggling multiple scripts, Blacdisk is the tool to use. It combines multiple compression methods into a single interface.
- How it works: Compresses code using multiple methods (e.g., caveman, code to image, etc.).
- Features: An all-in-one tool to use all the best token-saving hacks.
- Usage: Runs on top of Claude Code. Run with
blacdisk claude. - GitHub: MasterKlm/Blacdisk
Impact:
- 80% less input tokens
- 65% less output tokens
Summary
By implementing just a few of these tools, you can stretch your Claude Code usage significantly further. Start with Context-mode to clean up your tool outputs, or try Blacdisk for a comprehensive compression suite.
Happy coding (and saving)!