ModsCode / Claude Code Mods / Ranking / context-map
context-map
A bar above the prompt showing how the context window fills up by category, in Vesuvius colors
What it does
- Draws a band above the prompt, a pane
- Adds /context-map
- Hooks session.start, turn.complete
Good points
- No network calls
- Starts no processes
- Small: 293 lines
- Written in TypeScript
Code to start from
A starter ModsCode writes from the drawing it read, and the mod's own lines that draw, where there are any.
Starter (register.tsx)
import type { Register } from 'claude-code'
// Drawn like context-map by Davide D'Antonio (pane, band), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/pompeitech-context-map/
// Written by ModsCode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
// the band above the prompt; what else goes there is drawn under it
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
const { Box, Text, Button } = $.ui.resolve(e)
const glyphOf = '…'
const glyphOf2 = '…'
const glyphOf3 = '…'
const percent = '…'
const formatTokens = '…'
const formatTokens2 = '…'
const name = '…'
const formatTokens3 = '…'
const name2 = '…'
const formatTokens4 = '…'
const name3 = '…'
const formatTokens5 = '…'
return (
<Box flexDirection="column">
<Box flexDirection="row" columnGap={1}>
<Text color="#E4572E">
▲
</Text>
<Text>
<Text>
{glyphOf}
</Text>
<Text>
{glyphOf2}
</Text>
<Text>
{glyphOf3}
</Text>
</Text>
<Text>
{percent}
%
</Text>
<Text color="#8A8D91">
{formatTokens}
/
{formatTokens2}
</Text>
<Button plain label="legend" />
<Button plain label="details" />
</Box>
<Box flexDirection="row" flexWrap="wrap" columnGap={2} paddingLeft={2}>
<Text>
<Text>
█
</Text>
{" "}
{name}
{" "}
<Text color="#8A8D91">
{formatTokens3}
</Text>
</Text>
<Text>
<Text>
█
</Text>
{" "}
{name2}
{" "}
<Text color="#8A8D91">
{formatTokens4}
</Text>
</Text>
<Text>
<Text>
█
</Text>
{" "}
{name3}
{" "}
<Text color="#8A8D91">
{formatTokens5}
</Text>
</Text>
</Box>
{await next(e)}
</Box>
)
})
// the pane: open it with $.ui.open({ id: 'my-pane', title: "Context map" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text } = $.ui.resolve(e)
const percent = '…'
const formatTokens = '…'
const model = '…'
const formatTokens2 = '…'
const name = '…'
const formatTokens3 = '…'
const percentOf = '…'
const glyphOf = '…'
const name2 = '…'
const formatTokens4 = '…'
const percentOf2 = '…'
const glyphOf2 = '…'
const name3 = '…'
const formatTokens5 = '…'
const percentOf3 = '…'
const glyphOf3 = '…'
const name4 = '…'
const note = '…'
const formatTokens6 = '…'
const name5 = '…'
const note2 = '…'
const formatTokens7 = '…'
const name6 = '…'
const note3 = '…'
const formatTokens8 = '…'
const name7 = '…'
const note4 = '…'
const formatTokens9 = '…'
const name8 = '…'
const note5 = '…'
const formatTokens10 = '…'
const name9 = '…'
const note6 = '…'
const formatTokens11 = '…'
const name10 = '…'
const note7 = '…'
const formatTokens12 = '…'
const name11 = '…'
const note8 = '…'
const formatTokens13 = '…'
const name12 = '…'
const note9 = '…'
const formatTokens14 = '…'
const name13 = '…'
const note10 = '…'
const formatTokens15 = '…'
const name14 = '…'
const note11 = '…'
const formatTokens16 = '…'
const name15 = '…'
const note12 = '…'
const formatTokens17 = '…'
return (
<Box flexDirection="column" rowGap={1}>
<Text>
<Text bold>
{percent}
%
</Text>
{" "}
{"of "}
{formatTokens}
{" · "}
<Text color="#8A8D91">
{model}
</Text>
<Text color="#8A8D91">
{" · compacts at "}
{formatTokens2}
</Text>
</Text>
<Box flexDirection="column">
<Text>
<Text>
█
</Text>
{" "}
{name}
{" "}
<Text color="#8A8D91">
{formatTokens3}
</Text>
{" "}
<Text color="#C9B79C">
{percentOf}
</Text>
{" "}
<Text>
{glyphOf}
</Text>
</Text>
<Text>
<Text>
█
</Text>
{" "}
{name2}
{" "}
<Text color="#8A8D91">
{formatTokens4}
</Text>
{" "}
<Text color="#C9B79C">
{percentOf2}
</Text>
{" "}
<Text>
{glyphOf2}
</Text>
</Text>
<Text>
<Text>
█
</Text>
{" "}
{name3}
{" "}
<Text color="#8A8D91">
{formatTokens5}
</Text>
{" "}
<Text color="#C9B79C">
{percentOf3}
</Text>
{" "}
<Text>
{glyphOf3}
</Text>
</Text>
</Box>
<Box flexDirection="column">
<Text color="#C9B79C" bold>
Memory files
</Text>
<Text wrap="truncate-end">
{" "}
{name4}
{" "}
<Text color="#8A8D91">
{note}
</Text>
{" "}
<Text color="#F28C28">
{formatTokens6}
</Text>
</Text>
<Text wrap="truncate-end">
{" "}
{name5}
{" "}
<Text color="#8A8D91">
{note2}
</Text>
{" "}
<Text color="#F28C28">
{formatTokens7}
</Text>
</Text>
<Text wrap="truncate-end">
{" "}
{name6}
{" "}
<Text color="#8A8D91">
{note3}
</Text>
{" "}
<Text color="#F28C28">
{formatTokens8}
</Text>
</Text>
</Box>
<Box flexDirection="column">
<Text color="#C9B79C" bold>
MCP servers
</Text>
<Text wrap="truncate-end">
{" "}
{name7}
{" "}
<Text color="#8A8D91">
{note4}
</Text>
{" "}
<Text color="#F28C28">
{formatTokens9}
</Text>
</Text>
<Text wrap="truncate-end">
{" "}
{name8}
{" "}
<Text color="#8A8D91">
{note5}
</Text>
{" "}
<Text color="#F28C28">
{formatTokens10}
</Text>
</Text>
<Text wrap="truncate-end">
{" "}
{name9}
{" "}
<Text color="#8A8D91">
{note6}
</Text>
{" "}
<Text color="#F28C28">
{formatTokens11}
</Text>
</Text>
</Box>
<Box flexDirection="column">
<Text color="#C9B79C" bold>
Custom agents
</Text>
<Text wrap="truncate-end">
{" "}
{name10}
{" "}
<Text color="#8A8D91">
{note7}
</Text>
{" "}
<Text color="#F28C28">
{formatTokens12}
</Text>
</Text>
<Text wrap="truncate-end">
{" "}
{name11}
{" "}
<Text color="#8A8D91">
{note8}
</Text>
{" "}
<Text color="#F28C28">
{formatTokens13}
</Text>
</Text>
<Text wrap="truncate-end">
{" "}
{name12}
{" "}
<Text color="#8A8D91">
{note9}
</Text>
{" "}
<Text color="#F28C28">
{formatTokens14}
</Text>
</Text>
</Box>
<Box flexDirection="column">
<Text color="#C9B79C" bold>
Skills
</Text>
<Text wrap="truncate-end">
{" "}
{name13}
{" "}
<Text color="#8A8D91">
{note10}
</Text>
{" "}
<Text color="#F28C28">
{formatTokens15}
</Text>
</Text>
<Text wrap="truncate-end">
{" "}
{name14}
{" "}
<Text color="#8A8D91">
{note11}
</Text>
{" "}
<Text color="#F28C28">
{formatTokens16}
</Text>
</Text>
<Text wrap="truncate-end">
{" "}
{name15}
{" "}
<Text color="#8A8D91">
{note12}
</Text>
{" "}
<Text color="#F28C28">
{formatTokens17}
</Text>
</Text>
</Box>
</Box>
)
})
}
The mod's own code
Its licence text was not found at the commit read, so only the places in the source are linked.
plugins/context-map/hooks/register.tsxlines 157–205plugins/context-map/hooks/register.tsxlines 208–270
How to build this: Pane (panel), Add a slash command
What its code calls
nothing found
What its code shows
Read from the source at commit ef14f2011f57 on 2026-10-11. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.
| Decides the listing: code you can check | |
|---|---|
| Entry read | Every module hooks/hooks.json names was read.plugins/context-map/hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.2 files parsed |
| All its code is in the mod | Every import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod |
| Readable | No minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs |
| Calls in the open | Network and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open |
| For you to weigh before installing | |
| Where it draws | The terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both |
| Install line | Whether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there |
| Programs on Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks |
| Network | Whether every fetch names its https host in the code.no network |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.starts no programs |
| Reads and sends | Whether it both reads something of yours (files, environment variables, the transcript, settings) and reaches outside (the network, an MCP server, another session, telemetry).reaches nothing outside |
| Keys in the source | Whether the source holds what looks like an API key or a private key.no keys in the source |
| Licence | An open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets ModsCode show its code; otherwise the code is linked.no licence |
| Settings hooks | Hooks declared in hooks/hooks.json or plugin.json beside the module: a command (a shell when it has no args), an HTTP request, an MCP tool or a model prompt at an event. They run outside $.no settings hooks: its function hooks alone |
| Servers it ships | MCP servers (a program, or a URL; a headersHelper is a shell command; a .mcpb bundle is unpacked at run time), LSP servers, monitors (a shell command for the whole session) and bin/ (on the PATH of the Bash tool).ships no MCP or LSP server, no monitor, no bin/ |
| Skills, commands, agents | What its Markdown declares beyond text: allowed-tools granted for the turn, hooks added when a skill is invoked, a command run before Claude reads the skill.no skills, commands, agents or workflows |
| Tools and MCP | Whether every tool it calls through $.tool.call and $.mcp.call is named in the code, and none is a shell (Bash through the tool runs a shell without $.process).calls no tool, MCP server or command |
| Asks of the model | Completions it runs ($.model.complete, fork, classify), subagents it spawns, prompts it submits as you, and the tools, commands and agents it adds.adds command context-map |
| Events it hooks | By what a hook there can do: gates (refuse a tool call, a prompt, a setting, another plugin), shapes (what the model reads: the system prompt, tool descriptions, each request), reads (your input, the events of the settings hooks, every event with *), and the rest.gates: command.run (context-map) · also: session.start, turn.complete, ui.render (AbovePrompt, Pane) |
| Reads, by name | The environment variables and files it names, and whether it reads the transcript, settings.json, the prompt box or the mouse selection.reads no files, environment variables, settings or transcript |
| Writes, by name | The files and environment variables it names, and whether it changes settings, the prompt box, the clipboard, the conversation (a row the model reads) or another session.writes no files, environment variables, settings or conversation rows |
This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen
Install it
Check it yourself before you install it. Mods run unsandboxed, with your permissions, and ModsCode does not vouch for what this code does. Read its code (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.
From its marketplace
Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:
/plugin marketplace add pompeitech/affreschi/plugin install context-map@affreschi/reload-pluginsThis installs the marketplace's latest commit, which may not be the one read here (ef14f2011f57). Compare them before you install. /reload-plugins loads it into a session that is already open.
Try the commit ModsCode read
No marketplace needed. In a terminal, clone the repository, check out the commit read, validate the mod, and load it for one session:
git clone https://github.com/pompeitech/affreschigit -C affreschi checkout ef14f2011f579c69659003da8739537c21cbe446claude plugin validate affreschi/plugins/context-mapclaude --plugin-dir affreschi/plugins/context-mapThe validate line lists the events the mod hooks and what it asks Claude Code to do, without running it. The last line loads the mod for this session only and writes nothing to your settings. If the author has rewritten history, the commit may no longer exist.
Ask Claude about it
With the ModsCode connector added, Claude can read this mod's code and what it reaches, and build on them. Ask it like this:
Read the ModsCode mod "pompeitech-context-map" with its code and make me one like itSearch them from Claude: the MCP connector
Similar mods
- blast-radiusdeepseek-ai★ 247,289
- replay-theaterdeepseek-ai★ 247,289
- code-modernizationAnthropic★ 37,653
- seo-cockpitAgrici Daniel★ 18,364
- crit-tuiTomasz Tomczyk★ 1,196
- ai-maestro-secrets23blocks-OS★ 817
More from this repository
Badge for your README
If this is your mod, paste this into your README. It links to this page.
[](https://modscode.com/claude-mods/mods/pompeitech-context-map/)