Claude Code Context Analyzer

Claude Code Context Analyzer

Paste the output of /context to see what fills your context window and how to free it up, or estimate the tokens in a file before you add it.

Home
Report
About the Claude Code Context Analyzer

A Free Claude Code Context Analyzer

Everything Claude Code loads takes room in the context window: its own system prompt and tools, your CLAUDE.md files, skill descriptions, MCP tools, custom agents and then the conversation. When the window fills up, Claude Code compacts the chat into a summary. The /context command shows what is in the window, but it does not tell you what to do about it. Paste its output here and this analyzer shows what loads before you type, which items are the biggest, and the fixes the Claude Code docs suggest for each one.

How to Analyze Your Context

  1. In Claude Code, type /context all and press Enter. Plain /context works too, with less detail.
  2. Copy everything it prints and paste it into Analyze /context.
  3. Read the findings, starting with the warnings, and check the biggest items.
  4. Make a change, start a new session, run /context again and paste the new output to compare.

How to Estimate a File

Switch to Estimate a file, pick CLAUDE.md, SKILL.md or other text, and paste the file. You get a token range and the share of a 200K and a 1M window. For a SKILL.md, it shows what loads in every session (the description) apart from what loads only when the skill is used.

What Uses Context Before You Type

  • System prompt and system tools: set by Claude Code. You cannot trim them much.
  • Memory files: CLAUDE.md and CLAUDE.local.md files in your project folder and above it load in full at launch. Files in subfolders load when Claude works with files there.
  • Skills: only each skill’s description loads up front. The rest loads when the skill is used.
  • MCP tools: with tool search, which is on by default, only tool names load up front.
  • Custom agents: each agent’s description loads up front. The agent runs in its own context.

How Accurate Are the Numbers?

In Analyze mode, every token number comes from your own /context output, which Claude Code calls an estimate. We do not change them. In Estimate mode, the numbers are ours. Claude’s tokenizer is not public, and Anthropic’s exact token counter needs an API key, so we show a range. We based it on files whose exact counts /context showed on current Claude models, and on Anthropic’s note that Claude 4.7 and later models use a tokenizer that makes about 30% more tokens for the same text. The warnings use our own thresholds, built from the Claude Code docs. They are a checklist, not an official grade.

Built With Claude Code

We built this tool with Claude Code and tested it on real /context output from our own sessions. No AI runs on this page. The /context format is not documented and can change between Claude Code versions. If a paste does not read correctly, the report says so.

Claude Code Context Analyzer FAQ

Is it free?

Yes. It is free, needs no sign-up and has no limits.

Does it send my /context output anywhere?

No. It runs in your browser. Your last paste is saved in this browser only, so it is there when you come back.

How big is the Claude Code context window?

Current models such as Opus 5.5, Sonnet 5.5 and Haiku 5.5 get a 1M token window in Claude Code by default. Some older models use 200K, and Opus 4.6 and Sonnet 4.6 can use 1M with the [1m] suffix. Your /context output shows the window for your session.

When does auto-compact run?

Before the window is full. /context shows the room left as Free space and the part kept back as the autocompact buffer. You can lower the point where it runs with /autocompact or the CLAUDE_CODE_AUTO_COMPACT_WINDOW variable.

Should I compact or clear?

Use /compact when you want to keep going on the same task with a summary of what happened. Use /clear when you start something new, so old messages do not use context or distract Claude.

Newsletter

New AI tools in your inbox

The best new tools and the AI news that matters, in one short email. Unsubscribe any time.

Free · No spam · Unsubscribe any time

✓ Looks like you’re subscribed

Loading Google’s sign-up form…

Looks like you’re already subscribed

Thanks for reading! New AI tools and the AI news that matters will land in your inbox.

Not subscribed yet? Refresh the page to load the sign-up form.

The sign-up form couldn’t load. If you use an ad or content blocker, allow news.google.com and reload the page.

Free instant check before you pay. Takes a few seconds.

Scroll to Top