Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/atuljha23/holocron/context-sizegit clone --depth 1 https://github.com/atuljha23/holocronWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/atuljha23/holocron/context-size)<a href="https://agentmods.dev/commands/atuljha23/holocron/context-size"><img src="https://agentmods.dev/badge/commands/atuljha23/holocron/context-size.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00036 | $0.00601 |
| Opus 5 | $0.00018 | $0.00300 |
| Sonnet 5 | $0.00007 | $0.00120 |
| Haiku 4.5 | $0.00004 | $0.00060 |
Grade A, and why
context-size scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
/holocron:context-size
Inspect where the context-window money is going.
Gather
-
Transcript size — if the session has a
transcript_path, report its size. Otherwise estimate from turn count × avg-turn-size. -
CLAUDE.md contributions — each of these, if it exists, contributes tokens to every turn:
~/.claude/CLAUDE.md(user scope)./CLAUDE.mdor./.claude/CLAUDE.md(project scope)~/.claude/memory/MEMORY.mdand the indexed memory files Report: file path, byte size, approximate tokens (bytes / 4).
-
MCP schemas — list the MCP tools in the current session's tool list and estimate their combined schema token cost.
-
Plugin hook additionalContext — note any persistent injections (e.g., holocron's SessionStart learnings, UserPromptSubmit matches). These live in the transcript.
-
Open file reads — list files you've
Readin this session. Big unread-again files are candidates for trimming in the next session.
Output
## Context footprint (snapshot)
- Transcript: <size> (~<tokens> tokens)
- CLAUDE.md (user): <size> (~<tokens> tokens) — <path>
- CLAUDE.md (proj): <size> (~<tokens> tokens) — <path> or "(none)"
- Memory index: <size> (~<tokens> tokens) or "(none)"
- MCP schemas: ~<tokens> tokens across <N> tools
- Big file reads:
- <file> (<lines> lines, ~<tokens>)
- ...
## Biggest offenders (trim candidates)
1. <item> — ~<tokens> tokens — trim by <action>
2. ...
Actions to suggest
- CLAUDE.md > 1k lines → split into role-scoped files (planned for v0.3.0+).
- MCP schemas > 8k tokens →
/holocron:mcp-auditfor pruning. - Session transcript > 150k tokens → run
/holocron:handoffand start fresh. - One file re-read multiple times →
Grep+ targetedRead(offset, limit)next time.
Do not
- Guess sizes. If you don't know, say so.
- Recommend a rewrite of CLAUDE.md without reading it first.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 56 lines · 36 tokens per session scan A a96c6bbbf815
context-size is a command published in the GitHub repository atuljha23/holocron (2 stars, last pushed 4mo ago), licensed MIT. It adds 36 tokens to every session and 601 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
learn
Learn Claude Code best practices and capture lessons into persistent memory.
wiki
Build, query, and maintain long-lived knowledge bases. Each wiki = markdown folder + SQLite FTS5 shadow index. Survives sessions, indexes auto-load on SessionStart.
replay
Automatically find and surface relevant learnings from your pro-workflow database before you start working. Like muscle memory for your coding sessions.
context-optimizer
Diagnose and fix context window problems.
learn-rule
Capture a lesson from this session into permanent memory.
compact-guard
Smart context compaction with state preservation — saves critical state before compact and restores after.