Skip to content
← Articles

How I audit Claude Code context before a project grows

Revised 2 min read

By Jake Bauman

claude-code / ai-agents / context-engineering / build-notes

Editorial graphic about Claude Code context audits

I use Claude Code across several projects. Over time, I had added project history, package lists, and stale deployment notes to files the assistant could load at the start of a session. That made it harder to tell which instructions were still useful.

This article describes the audit I use. An earlier version reported exact token savings and a 40% cost reduction without a shareable run log or billing receipt. I removed those numbers. Your result will depend on model, project, tools, and the files actually loaded.

Measure the starting point

Open a fresh session in the project and inspect context usage with /context. Record the model, date, reported usage, and which instruction files are present. Claude Code's official commands documentation describes /context; its pricing documentation explains why costs vary by model and usage. A context count alone is not a billing receipt.

Repeat the check after a change. Compare the same project and task, and keep the model fixed where possible. If a file is loaded only after a specific action, measure that point too.

Inspect standing instructions

Read CLAUDE.md as if you were a new teammate. Keep stable conventions, the project map, important boundaries, and commands the assistant cannot infer safely. Move completed-task history, old changelogs, and detailed API references to files that can be read when needed. A short file is not automatically better; the test is whether the agent still makes the right decisions.

Ask these questions of each section:

  • Is this still true?
  • Does every session need it?
  • Can the assistant discover it from the current code or documentation?
  • Would removing it make a likely task less reliable?

Look at retrieval and tool output

Searches, logs, and tool definitions can consume context after the session starts. Narrow a broad search to the relevant directory, summarize only verified findings, and avoid repeating the same large output. Keep the source path or link so a future step can check the detail.

Do not assume that excluding a file from Git also excludes it from every agent tool. Check the current tool's behavior before treating an ignore pattern as a privacy or context control. Credentials should be handled by proper secret storage and access controls, regardless of context size.

Verify the result

Start another fresh session, compare the recorded usage, and run a representative task. Check whether the agent still follows project rules and finds the information it needs. Revert a deletion if it saves tokens but harms the work. I review this whenever project instructions have accumulated, rather than aiming for a universal percentage of context overhead.

For a small workflow that uses focused instructions, see the free Growth Agent Starter Kit.

Get the free Starter Kit.

Enter your email to see the download link on this page. Build Notes is optional and has a separate checkbox.

Your files appear here after signup. If email delivery is available, you may also receive your requested file by email. The newsletter is optional. Privacy.

Related reading