Wednesday, June 17, 2026
jynlab

notes on building, judging, and selling small software

Case Study · Build-to-Exit

Cut Your Claude Code Bill by Up to 80%: The 8-Fix Setup Guide

Eight one-time settings and habits that stop Claude Code from burning tokens on context you never asked it to load. Copy-paste configs for .claudeignore, hooks, and lean CLAUDE.md.


Claude Code is the fastest way to build software with AI, but it is also the fastest way to run up a bill you did not plan for. Most of the spend is not from hard problems. It is from stale context, bloated files, and habits nobody told you to fix. These eight changes are one-time settings, not better prompts. Do all eight and the savings stack.

What you get
  • 8 one-time fixes that cut Claude Code token spend by up to 80%
  • Copy-paste configs for .claudeignore, hooks, and settings
  • A run order so you see savings immediately
  • Bonus: an open-source tool that shrinks responses by 65%

Before diving in: this guide is about Claude Code, the terminal app you install on your computer to build 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 use Claude in the browser, bookmark this for when you make the switch.

The 2 fixes to do right now

Two minutes total. These cost nothing and save you money on every session after.

Fix 01: Turn on a statusline

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.

Set this up first. Once you can see the spend ticking, every other fix on this list becomes obvious. Follow the statusline setup guide in the Claude Code docs.

Fix 02: Three commands worth memorizing

You type these straight into Claude Code. They cost nothing and save you constantly.

  1. /model haiku switches to Haiku, Anthropic's cheapest and fastest model. Use it for simple tasks: renaming, quick edits, formatting. Switch back when you need the heavy reasoning.
  2. /effort low tells Claude to skip deep thinking on simple tasks. Stops it from spending reasoning tokens on jobs that do not need them.
  3. /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.
The three commands
/model haiku
/effort low
/clear

Two minutes to learn. Savings on every single session after.

The 2 one-time file setups

Create these once per project. They keep saving you forever.

Fix 03: Add a .claudeignore file

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.

.claudeignore starter
node_modules/
.next/
dist/
build/
*.log
.env
package-lock.json

Fix 04: Keep your CLAUDE.md lean

Claude Code loads your main instructions file (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.

Less loaded automatically equals more room for the real work.

The 2 architecture moves

A small mindset shift in how you hand Claude work. Both keep your main session clean.

Fix 05: Use skills instead of re-explaining

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: a test runner, a docs writer, a PR reviewer. Set up once, used forever.

Fix 06: Hand big jobs to a subagent

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.

In practice: when you ask Claude Code to do something large, tell it to "use a subagent for this." It spins up a separate context, does the work, and returns a concise result. Your main session stays lean.

The 2 hooks (power users)

Hooks are scripts Claude Code runs automatically at set moments. These two are the most advanced fixes on the list, but also where the biggest savings hide. If you are comfortable editing a settings file, do them.

Fix 07: A PreToolUse hook to filter noise

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.

PreToolUse hook config
{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "$CLAUDE_PROJECT_DIR/.claude/filter-output.sh"
          }
        ]
      }
    ]
  }
}

Fix 08: A SessionStart hook to auto-load your state

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 PRs, failing checks. You type nothing, Claude already knows.

SessionStart hook config
{
  "hooks": {
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "$CLAUDE_PROJECT_DIR/.claude/load-state.sh"
          }
        ]
      }
    ]
  }
}

Bonus: Caveman mode

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 stay untouched. Only the filler gets cut.

Three levels: Lite (gentle trim, good for most tasks), Full (standard brevity, the daily driver), and Ultra (maximum compression, when every token counts).

Get it free: github.com/JuliusBrussee/caveman

The run order

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.

  1. Do right now: statusline (fix 01) + the three commands (fix 02).
  2. One-time files: .claudeignore (fix 03) + a lean CLAUDE.md (fix 04).
  3. Habits: lean on skills (fix 05) and subagents (fix 06) for big jobs.
  4. Power-user hooks: the PreToolUse filter (fix 07) + the SessionStart auto-load (fix 08).
  5. Bonus: install caveman mode for shorter replies on top of all of it.

Start with fix 01 so you can watch the number shrink as you add each one. That feedback loop is what makes the rest stick.

FAQ

Does this work on the free Claude plan?

No. Claude Code requires a paid plan (Claude Pro at $20/mo, or Max). These fixes only apply to Claude Code, the terminal tool, not the claude.ai website.

Will these fixes break anything?

No. Every fix is additive. The .claudeignore file tells Claude what to skip, not what to delete. The hooks filter output before it reaches Claude, not after. If anything feels wrong, remove the setting and you are back to default.

Do I need all 8 to see savings?

No. Fixes 01 and 02 alone will change how you work. Each additional fix compounds the savings. But if you only do two things, do the statusline and the three commands.

How do I know how much I am actually spending?

Fix 01 (the statusline) shows your session spend in real time. You can also check your usage at console.anthropic.com for API usage, or your Claude account settings for Pro/Max plan usage.

Get guides like this in your inbox

Builders and founders are already on the list. One email when we publish. No spam.