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 skills add claude-hangar/claude-hangar --skill context-budgetgit clone --depth 1 https://github.com/claude-hangar/claude-hangarWrote 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/skills/claude-hangar/claude-hangar/context-budget)<a href="https://agentmods.dev/skills/claude-hangar/claude-hangar/context-budget"><img src="https://agentmods.dev/badge/skills/claude-hangar/claude-hangar/context-budget/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/claude-hangar/claude-hangar/context-budget"><img src="https://agentmods.dev/badge/skills/claude-hangar/claude-hangar/context-budget.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00027 | $0.00588 |
| Opus 5 | $0.00014 | $0.00294 |
| Sonnet 5 | $0.00005 | $0.00118 |
| Haiku 4.5 | $0.00003 | $0.00059 |
Grade A, and why
context-budget 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/context-budget — Token Spending Analysis
Audits your current context window to show where tokens are being consumed and identifies opportunities to reduce waste.
Usage
/context-budget # Full analysis
/context-budget quick # Summary only
What It Analyzes
1. System Prompt Weight
Estimate token cost of loaded context:
- CLAUDE.md content (project instructions)
- Active skills loaded into context
- MCP server tool schemas (each server adds 200-800 tokens)
- Rules loaded from ~/.claude/rules/
2. Conversation History
- Total messages in current conversation
- Average tokens per message
- Large tool results consuming disproportionate context
3. Tool Schema Overhead
- Count of available tools and their schema weight
- MCP servers contributing the most overhead
- Unused tools that could be removed
4. Optimization Opportunities
| Opportunity | Typical Savings | How |
|---|---|---|
| Compact after planning | 30-50% | /compact removes exploration clutter |
| Remove unused MCP servers | 200-800 tokens each | Uninstall servers you're not using |
| Trim CLAUDE.md | 500-2000 tokens | Remove outdated instructions |
| Use subagents for research | 60-80% of results | Agent tool isolates large outputs |
| Avoid re-reading large files | 1000+ tokens each | Read once, reference by line numbers |
Output Format
## Context Budget Analysis
### Current Allocation (estimated)
| Component | Tokens | % |
|-----------|--------|---|
| System prompt | ~4,000 | 2% |
| CLAUDE.md | ~2,500 | 1.3% |
| MCP schemas (5 servers) | ~3,000 | 1.5% |
| Conversation history | ~45,000 | 22.5% |
| Available budget | ~145,500 | 72.7% |
### Top Optimizations
1. Consider /compact — conversation history is 22.5% of context
2. MCP server "sequential-thinking" adds ~800 tokens but hasn't been used this session
3. 3 large file reads (>500 lines each) in history could be replaced with targeted reads
When to Use
- When you notice Claude Code getting slower or less accurate
- Before starting a large implementation task
- After a long research/exploration phase
- When token-warning hook fires (70%+ usage)
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 11d ago First seen · 78 lines · 27 tokens per session scan A dd5d4d0553d7
context-budget is a skill published in the GitHub repository claude-hangar/claude-hangar (1 stars, last pushed 2mo ago), licensed MIT. It adds 27 tokens to every session and 588 once invoked, about $0.0001 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 skills, from other repositories
memory-distill
A tool that turns accumulated observations from past coding sessions into organised Markdown notes. It groups similar lessons, removes duplicates and contradictions, and can rebuild existing notes.
project-gotchas
A project memory system that records recurring mistakes and successful patterns in shared notes for coding tools. It keeps separate global notes and project-specific notes.
mnemo
A file-based memory system for saving conversations, tool activity, and handoff notes between coding sessions. It keeps project memory separate from Claude’s built-in personal memory.
codex-mnemo
A long-term memory tool for searching earlier Codex conversations and saving useful conversation details for later sessions.
memory-compact
A maintenance tool for checking and shortening an oversized MEMORY.md file used to store project notes. It moves detailed notes into separate files and leaves a smaller index.
grok-mnemo
A long-term memory system for Grok Build, an AI coding tool. It saves conversations between sessions and lets the tool search past discussions and project guidance.