This is all about Claude Code, the terminal app you run on your computer to build things with AI. It is a different product from the claude.ai website and the desktop app. Everything below (the commands, the files, the hooks) lives inside Claude Code. If you only ever use Claude in the browser, this guide is not for you (yet).
These take about two minutes total and save you money immediately. If you do nothing else, do these.
Before you can cut costs, you have to see them. A custom statusline adds one live line at the bottom of your Claude Code window showing your current model, how full your context window is, and how much you have spent this session. It turns an invisible bill into a number you watch in real time.
Follow this free step-by-step tutorial, it walks you through the whole setup: learn.nextwork.org/projects/claude-code-statusline
You type these straight into Claude Code. They cost nothing and save you constantly.
/model haiku Switches Claude to Haiku, Anthropic's cheapest and fastest model. Use it for simple tasks that do not need heavy reasoning (renaming things, quick edits, formatting). Switch back when you need the big brain./effort low Tells Claude to skip the deep thinking on simple tasks, so it stops spending reasoning tokens on jobs that do not need them./clear Wipes your context window after you finish a task. Stale output from the last job stops sitting there burning space on the next one. Run it between unrelated tasks./model haiku
/effort low
/clear
You create these once per project and they keep saving you forever.
Make one file called .claudeignore in your project folder and list the folders Claude should never read. Things like node_modules, build output, and log files are usually thousands of lines of auto-generated junk that eat your context every session without adding anything useful. One file, and that bloat is gone permanently.
A simple starter .claudeignore:
node_modules/
.next/
dist/
build/
*.log
.env
package-lock.json
Claude Code loads a main instructions file (your CLAUDE.md) at the start of every single session. The longer it is, the more you pay before you have typed a word. Keep it under about 200 lines. Move anything specialized (rules for one specific folder, instructions for one type of task) into smaller files inside a .claude/rules/ folder. Claude only loads those when it is actually working in that area, not every time.
A small mindset shift in how you hand Claude work. Both keep your main session clean.
A Claude Code skill is a saved workflow with a name. Instead of re-typing the same long instructions every time, you set it up once, then just type /its-name and Claude runs the whole thing. Skills live on your computer and only load into your context when you actually call one, so they are not sitting in your session burning tokens all day. Common ones people make: a test runner, a docs writer, a pull-request reviewer. Set up once, used forever.
Some jobs (like running your full test suite) dump thousands of lines into your context window, and you pay for every line. A subagent does the job in its own separate context window and hands back only the summary. The messy middle never touches your main session, so your context stays clean and cheap.
Hooks are little scripts Claude Code runs automatically at set moments. These two are the most advanced fixes on the list, but they are also where the biggest savings hide. If you are comfortable editing a settings file, do them.
Some commands dump thousands of lines into your context before Claude reads a single word. A PreToolUse hook runs a small filter script before that output ever reaches Claude, stripping out everything except the useful signal. You set it in .claude/settings.local.json. Claude reads less, you spend less.
A minimal shape of the hook (it points at a small script you write to trim the output):
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/filter-output.sh"
}
]
}
]
}
}
Every new session, if you have to re-explain your branch, your recent commits, and your open tasks, that is paid context you are typing out by hand. A SessionStart hook injects all of it automatically the moment a session opens: current branch, last few commits, open pull requests, failing checks. You type nothing, Claude already knows.
The same .claude/settings.local.json, with a SessionStart hook added (it runs a script that prints your project state):
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/load-state.sh"
}
]
}
]
}
}
A free, open-source skill with 70,000+ stars on GitHub. Install it and Claude stops padding its replies with filler and explanation you already know. Responses shrink by up to 65%, and your code, commands, and error messages are left untouched, only the waffle gets cut.
Three levels, pick by how aggressive you want it:
Get it free here: github.com/JuliusBrussee/caveman
Most Claude Code users have none of these turned on. The 80% does not come from one change, it comes from stacking eight small removals, every place your tokens were disappearing without doing anything useful.
Here is the run order:
.claudeignore (fix 03) + a lean rules file (fix 04).