Skip to content
Context Management·3 min·English

The Claude Code context map

One command shows what actually takes up the context window: conversation, memory, skills and MCP tools. Here is how to read the map and choose what to shorten, clean up or move to a separate agent.

The Claude Code context map

What you get

A 60-second check that shows what is eating your context and the right action for each case

Who it is for

For anyone working with Claude Code who wants to stop guessing why the session got heavy, slow or more expensive.

1. The first action: open the map

Inside an active Claude Code session, go to the input line, type /context and press Enter. No need to open another terminal or install anything.

  • The result is a colored map of your current context window.
  • Below the map you will see a breakdown by category and suggestions that fit your session.
  • Want the full breakdown? Run /context all.

2. Success check

You succeeded if a screen appears with a usage percentage and a breakdown by category. Your numbers will be different, and that is exactly the point: this is a live measurement of your session.

  • If the command is not recognized, type just / at the start of a line and look for context in the command list.
  • If it still does not appear, update Claude Code and open a new session.

3. How to read the breakdown

  • Conversation and files: the messages, responses, code files and tool outputs read during the task.
  • Memory and instructions: CLAUDE.md files, automatic memory and work rules loaded into the session.
  • Skills: descriptions of available skills, and the full content of skills that were activated.
  • MCP tools: the names and tool definitions of your external connections. Run /mcp to check the cost per server.
  • System prompt: the base Claude Code needs in order to work. This is usually not the first place to cut.

4. What to do based on what is big

  • The conversation and files are big, and you are continuing the same task: run /compact and ask it to keep the important decisions and files.
  • You switched to a different task: name the session with /rename, then start clean with /clear.
  • Memory is big: run /memory, check which files loaded, and shorten only duplicate or irrelevant instructions.
  • MCP tools are big: run /mcp, check which server costs a lot, and turn off only the connection you do not need for this task.
  • Research or heavy file reading is about to bloat the session: move it to a subagent with its own context and ask it to return a summary.

5. A ready prompt for a context check

After you run /context, paste this prompt along with the breakdown you got:

Copy box
This is the context breakdown of my current session.

Goal: reduce load without losing decisions, instructions or files that are essential to the task.

1. Rank the three biggest sources.
2. For each source, explain what is safe to shorten and what must not be deleted.
3. Choose exactly one action to start with:
   /compact, /clear, shortening CLAUDE.md, turning off an unneeded MCP, or moving research to a subagent.
4. Give me a success check I can run with /context after the change.
5. Do not change files or settings before I approve.

6. Four common mistakes

  • Deleting important instructions just because they take up space. An instruction that prevents a mistake is worth more than the tokens it costs.
  • Running /clear in the middle of a task and starting to explain everything again. For the same task, /compact is usually better.
  • Turning off every MCP. A useful connection that saves work can be worth its cost.
  • Looking only at the total percentage. The goal is not the lowest number, it is relevant context that leads to the right result.

7. The check after the change

Run /context again. Check that the category you handled went down, and more importantly, ask Claude to summarize in one sentence the goal of the task and the last decision. If the answer is accurate, you saved space without losing direction.

8. Official sources

The commands and categories in this guide were checked against the official Claude Code documentation.

Copy box
https://code.claude.com/docs/en/context-window
https://code.claude.com/docs/en/commands
https://code.claude.com/docs/en/how-claude-code-works
https://code.claude.com/docs/en/costs

How to use this now

Do not start with cutting. Start with measuring: /context, the biggest source of load, one action, then check again.

AI-native products, workshops, and automations. Built from everywhere.

© 2026 Daniel Goldman