Guide
How many tokens does my CLAUDE.md cost?
Short answer: about one token per four characters of English, every session. The longer answer is that CLAUDE.md rarely travels alone. Here is everything that loads with it, real files measured, and how to cut the bill.
The rule of thumb
Tokens are the units a model reads. For English prose and code-like markdown, a token is roughly four characters, so a 4,000-byte CLAUDE.md is roughly 1,000 tokens. Text in Chinese, Japanese, Korean and other non-Latin scripts packs fewer characters into each token, so the same number of characters costs more; budget close to one token per character there.
Every figure on this page is an estimate. The only exact count is the one the model provider's own tokenizer produces for a given model, and those differ between models. For deciding whether your file is too big, an estimate that is right to within ten or twenty percent is all you need.
Why it matters: a project CLAUDE.md is loaded "at the start of every session", in the words of Anthropic's memory docs, and stays in the context window for the whole conversation. The same docs say "longer files consume more context and reduce adherence." So the cost is twice over: room in the context window that your code and conversation could have used, and rules that get followed less reliably as the file grows.
Real files, measured
Three CLAUDE.md files from Anthropic's own public repositories, pinned to the commit we measured. Counted with the AsItIs plugin's context_budget tool (the same estimator as the checker), which leaves out block HTML comments as Claude Code does.
| Repository (pinned) | Lines | Bytes | Estimated tokens |
|---|---|---|---|
| anthropics/claude-agent-sdk-python at 1cc862c | 82 | 3,939 | about 985 |
| anthropics/claude-code-action at 86d88e6 | 58 | 5,629 | about 1.4k |
| anthropics/anthropic-sdk-python at 18f2554 | 368 | 31,559 | about 7.9k |
The spread is the point: the same kind of file ranges from under a thousand tokens to nearly eight thousand. Bytes predict the cost far better than lines do, because one 300-character line costs as much as ten short bullets. The third file is longer than the docs' 200-line target; for a large SDK with generated code and many conventions, that can be a deliberate trade, and it is a useful upper reference point.
Everything that loads with it
When people ask what their CLAUDE.md costs, the real question is what their instructions cost per session. According to the docs, these load at launch:
- Every CLAUDE.md and CLAUDE.local.md from your working folder up to the filesystem root, concatenated. Start Claude in
repo/packages/weband you pay forpackages/web/CLAUDE.mdandrepo/CLAUDE.md. - Your user file,
~/.claude/CLAUDE.md, in every project. - Every
@import, recursively, up to four hops. The docs say imports "don't reduce its context cost, because imported files also load at launch." - Rules in
.claude/rules/without apathsfield. They load "at launch with the same priority as.claude/CLAUDE.md." - Auto memory. The first 200 lines or 25 KB of
MEMORY.md, every session. - The skill listing. Each skill's name and description sit in context so Claude knows what is available; the skills docs cap the description plus
when_to_usetext at 1,536 characters per skill in that listing. - AGENTS.md, if your project has one and no CLAUDE.md,
.claude/CLAUDE.mdor CLAUDE.local.md in the working folder or above (Claude Code v2.1.277 or later). See AGENTS.md vs CLAUDE.md.
Add those up and a project with a modest 1,000-token CLAUDE.md can easily carry three or four times that in total, mostly from imports and long-forgotten rules files.
What does not count
- Block-level HTML comments in CLAUDE.md. The docs say they "are stripped before the content is injected into Claude's context." Comments inside code blocks are kept.
- CLAUDE.md files in subfolders, until Claude reads or edits a file in that folder.
- Path-scoped rules (with
pathsfrontmatter), until Claude works with a matching file. - Skill bodies. "Full skill content only loads when invoked." Once invoked, it stays for the rest of the conversation.
These are not free forever: once they load, they stay in the conversation. But they cost nothing in a session that never touches them, which is why moving material into them is the main way to cut.
Three ways to measure
- In Claude Code. Run
/context. The docs point to its Memory files list as the way to confirm which instruction files loaded. - In your browser. Paste the file into the steering file checker. It estimates the tokens, shows when the file loads, and flags length against the 200-line target. Nothing is uploaded.
- For the whole project. With the AsItIs plugin installed,
/asitis:md-budgetwalks the project and totals what loads every session per tool: Claude Code (CLAUDE.md, imports, rules, MEMORY.md, the skill listing), Codex, Gemini CLI, Cursor, Copilot, Windsurf and Cline. It reads project files only, so your~/.claude/CLAUDE.mdand personal skills are not in its total.
A rough manual check also works: wc -c CLAUDE.md and divide by four.
How to cut it
- Delete what is no longer true. The cheapest token is the rule you remove. Old migration notes and finished projects are the usual suspects.
- Move area-specific rules into path-scoped rule files. A
.claude/rules/frontend.mdwithpaths: ["web/**"]costs nothing while Claude works on the backend. - Move procedures into skills. "How to cut a release" is twenty lines Claude needs twice a month. As a skill, only its description loads every session.
- Turn maintainer explanations into block comments. The "why we do this" paragraph can stay in the file for humans at no context cost.
- Remove duplicates. The same rule in CLAUDE.md, a rules file and an imported doc is paid for three times.
- Prefer facts over prose. "Test:
pnpm test" carries the same information as a paragraph about the importance of testing, at a tenth of the cost.
Do not try to cut by switching to imports: they still load at launch. And do not chase tiny savings in a file that is already a few hundred tokens; the 200-line target and clear, checkable rules matter more than the last hundred tokens. For what to keep, see CLAUDE.md best practices.
Check your file
The steering file checker estimates the tokens your CLAUDE.md, AGENTS.md or SKILL.md costs, says when it loads, and flags files over the published limits. It runs in your browser; nothing is uploaded.
Open the steering file checker
To check every steering file in a project from inside Claude Code, including links, @imports and what loads every session, install the free AsItIs plugin. It is read-only and makes no network calls.
claude plugin marketplace add Katta041/asitis-agent-tools
claude plugin install asitis@asitis About the pluginSource on GitHub
MIT licensed. A star on GitHub helps other people find it.
Sources: Claude Code docs, How Claude remembers your project and Skills, read on 14 October 2026; quotes are exact. Token figures are estimates from the AsItIs plugin's context_budget tool (one token per 4 characters of ASCII text, 0.8 tokens per character otherwise), not from a vendor tokenizer.