For developers on Claude Code and Codex

Stop hitting your Claude Code and Codex limits halfway through the day

Ready-made files that stop your coding agent wasting tokens on stale context, giant file reads, noisy test logs and an expensive model doing simple work. Set up in about 10 minutes.

Get the free kit

Free and open source under the MIT License. Use it in every project.

  • Works with Claude Code and Codex
  • Checked against the official docs, October 2026
  • Plain text files you can read before you run them
  • Free and open source (MIT)
token-saver-kit/14 files
  • ├─ START-HERE.md
  • ├─ GUIDE.md
  • ├─ claude-code/CLAUDE.md
  • ├─ claude-code/settings.json
  • ├─ claude-code/hooks/block-big-reads.sh
  • ├─ claude-code/hooks/filter-test-output.sh
  • ├─ claude-code/agents/scout.md
  • ├─ claude-code/agents/test-runner.md
  • ├─ claude-code/skills/codebase-map/
  • ├─ claude-code/glm-settings.example.json
  • ├─ codex/AGENTS.md
  • ├─ codex/config.toml
  • ├─ codex/deep.config.toml
  • ├─ prompts/

Where your tokens actually go

Most usage limits aren't hit by hard work. They're hit by waste the agent repeats every message. The kit fixes the five biggest leaks.

01

Your CLAUDE.md or AGENTS.md is hundreds of lines long, and it's re-sent with every single message.

The fix: Lean templates under 100 lines, with long instructions moved into skills that load only when needed.

02

The agent opens lockfiles, build output, node_modules and 5,000-line files in full.

The fix: A settings file that blocks those reads, and a hook that turns huge-file reads into a search or a line range.

03

One test run dumps thousands of lines of passing tests into your context.

The fix: A hook that trims test output to the failures, and a cheap Haiku test-runner that reports back a summary.

04

Every session starts by re-exploring your whole repo with Glob, Grep and Read.

The fix: A codebase-map prompt and skill, so the agent reads one short map instead of searching from scratch.

05

The most expensive model does everything, including renaming a variable.

The fix: A Codex config that defaults to gpt-6-luna with a "deep" profile for hard tasks, and model guidance for Claude Code.

What's inside

Plain files you copy into your project. No app to install, no account to create.

START-HERE.md
The 10-minute setup, in order of impact, with a checklist
GUIDE.md
Why each step works, with sources, and when not to use it
claude-code/CLAUDE.md
Lean memory template (fill in the blanks)
claude-code/settings.json
Blocks reads of dependencies, build output, lockfiles and .env files
claude-code/hooks/block-big-reads.sh
Stops whole-file reads of files over 1,500 lines
claude-code/hooks/filter-test-output.sh
Trims test-runner output to failures only
claude-code/agents/scout.md
Read-only explorer on Haiku that returns a short summary
claude-code/agents/test-runner.md
Runs your tests on Haiku and returns only the failures
claude-code/skills/codebase-map/
Makes Claude read your map before it searches
claude-code/glm-settings.example.json
Optional: route to the cheaper GLM Coding Plan
codex/AGENTS.md
Lean memory template for Codex
codex/config.toml
Defaults to gpt-6-luna, OpenAI's most efficient model
codex/deep.config.toml
A "deep" profile for the hard tasks
prompts/
Make a codebase map, plan-then-build, and fresh-session handoff

A look at one file

This is the read-blocking part of claude-code/settings.json, exactly as it ships. The kit adds the two hooks it points to.

claude-code/settings.json

{
  "permissions": {
    "deny": [
      "Read(./node_modules/**)",
      "Read(./dist/**)",
      "Read(./build/**)",
      "Read(./.next/**)",
      "Read(./coverage/**)",
      "Read(./package-lock.json)",
      "Read(./pnpm-lock.yaml)",
      "Read(./yarn.lock)",
      "Read(./.env)",
      "Read(./.env.*)"
    ]
  },
  "hooks": {
    "PreToolUse": [
      { "matcher": "Read", "hooks": [{ "type": "command",
        "command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/block-big-reads.sh" }] },
      { "matcher": "Bash", "hooks": [{ "type": "command",
        "command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/filter-test-output.sh" }] }
    ]
  }
}

Set up in about 10 minutes

Step 1

Measure first

Run /usage and /context in Claude Code, or /status in Codex, so you can see the difference afterwards.

Step 2

Copy the files in

Drop the templates, settings, hooks and subagents into your project, and the Codex config into ~/.codex. START-HERE.md walks you through it in order.

Step 3

Work as usual

Fresh sessions every 15–20 messages, the cheap model by default, and a map instead of re-exploring. Check /usage again after a few days.

Who it's for

It's for you if

  • You're on Claude Pro or ChatGPT Plus and hit your limit before the day is over
  • You use Claude Code, Codex, or both, on real projects
  • You'd rather copy working files than piece settings together from docs

Skip it if

  • You only use the chat apps, not Claude Code or Codex
  • Your projects are a handful of files (there isn't much to save)
  • You want a guaranteed saving: it depends on how you work, so we don't promise a number

Get the Token Saver Kit

Free

Free and open source under the MIT License. Use it in every project.

  • Every file listed above, in one GitHub repo
  • Claude Code and Codex versions
  • START-HERE setup and the full GUIDE
  • Use, change and share it, including in client work

Found a broken file or a better setting? Open an issue or a pull request on GitHub, or email contact@aieatingtheworld.com.

Token Saver Kit for Claude Code and Codex

Clone the repo, then open START-HERE.md. No Git? Download the ZIP instead.

git clone https://github.com/brianweerasinghe/token-saver-kit.git

Questions

Will it actually save tokens?

It removes the most common sources of waste: oversized memory files, reads of files the agent doesn't need, noisy test output, re-exploring the repo and using the top model for everything. How much you save depends on your projects and habits, so we don't promise a number. The guide shows you how to measure before and after with /usage, /context and /status.

Does it work with Codex as well as Claude Code?

Yes. There's a Codex folder with an AGENTS.md template, a config.toml that defaults to gpt-6-luna and a deep profile for hard tasks. The prompts work in both.

Mac, Linux or Windows?

The templates, settings, subagents and prompts work everywhere. The two hooks are shell scripts that need bash and jq, so on Windows run them in WSL or Git Bash, or skip them.

Is it safe to install?

Every file is plain text you can read first. The hooks only block or shorten output; they don't send anything anywhere. Nothing is installed globally except the Codex config, and only if you copy it.

Couldn't I set this up myself from the free guides?

Yes, and the guides on this site explain how. The kit saves you the evening of reading docs and writing the settings, hooks and subagents yourself, and it's checked against the current Claude Code and Codex docs.

Is it really free?

Yes. The kit is open source under the MIT License: use it, change it and share it, in personal or commercial projects, including client work. There's nothing to buy and no account to create.

How do I get the files?

Clone the GitHub repo, or download it as a ZIP if you don't use Git. Then open START-HERE.md and follow the steps in order.

Found a bug or a better setting?

Open an issue or a pull request on the GitHub repo. CONTRIBUTING.md explains the checks to run first. You can also email contact@aieatingtheworld.com.