Audits Claude Code context window consumption across agents, skills, MCP servers, and rules. Identifies bloat, redundant components, and produces prioritized token-savings recommendations.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Context Budget
Analyze token overhead across every loaded component in a Claude Code session and surface actionable optimizations to reclaim context space.
## When to Use
- Session performance feels sluggish or output quality is degrading
- You've recently added many skills, agents, or MCP servers
- You want to know how much context headroom you actually have
- Planning to add more components and need to know if there's room
- Running `/context-budget` command (this skill backs it)
## How It Works
### Phase 1: Inventory
Scan all component directories and estimate token consumption:
**Agents** (`agents/*.md`)
- Count lines and tokens per file (words × 1.3)
- Extract `description` frontmatter length
- Flag: files >200 lines (heavy), description >30 words (bloated frontmatter)
**Skills** (`skills/*/SKILL.md`)
- Count tokens per SKILL.md
- Flag: files >400 lines
- Check for duplicate copies in `.agents/skills/` — skip identical copies to avoid double-counting
**Rules** (`rules/**/*.md`)
- Count tokens per file
- Flag: files >100 lines
- Detect content overlap between rule files in the same language module
**MCP Servers** (`.mcp.json` or active MCP config)
…
The line at the top of this page pins the label git:20261028.f3bf4f5, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_v7td4u3e7enusmct
GET https://markdownregistry.com/api/v1/resolve?ref=andrewdongminyoo/cc-agents-kit/context-budget
GET https://markdownregistry.com/api/v1/blob/47081afce86f391ecab68cd44e12200373bf23ed0f128f244008c60fb390e533
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
andrewdongminyoo/cc-agents-kit · plugins/context-handoff/skills/handoff/SKILL.md · Use when a session's context is getting long or degrading and you need a detailed, self-contained summary to manually…
andrewdongminyoo/cc-agents-kit · plugins/context-handoff/skills/log-it/SKILL.md · Use when the user asks to record what a session discovered or learned ("기록해줘", "로그 남겨줘", "log this", "/log-it"), when a…
andrewdongminyoo/cc-agents-kit · plugins/context-handoff/skills/session-export/SKILL.md · Export a Claude Code session as Markdown, HTML, or JSON. Use when the user wants to save, archive, share, or re-read a…
andrewdongminyoo/cc-agents-kit · plugins/context-handoff/skills/wayfinder/SKILL.md · Chart an effort too big for one session as a map of decision tickets under docs/plans/, then resolve one ticket per…
andrewdongminyoo/cc-agents-kit · plugins/repo-gate/skills/ci-babysit/SKILL.md · Use after pushing a branch or opening a PR when CI needs monitoring or authorized make-green work. Keeps watch-only…
andrewdongminyoo/cc-agents-kit · plugins/repo-gate/skills/cspell-triage/SKILL.md · Use when cspell reports unknown words or forbidden words in a repository, when adding entries to a cspell dictionary…
andrewdongminyoo/cc-agents-kit · plugins/repo-gate/skills/fix-osv-vulnerabilities/SKILL.md · Use when osv-scanner or trunk check reports dependency vulnerabilities (GHSA-*) in a pnpm/npm/yarn or Bundler project…
andrewdongminyoo/cc-agents-kit · plugins/repo-gate/skills/markdownlint-triage/SKILL.md · Use when summarizing Markdownlint logs, selecting useful Markdown rules, or fixing an existing Markdownlint backlog…
andrewdongminyoo/cc-agents-kit · plugins/repo-gate/skills/semantic-commit/SKILL.md · Use when staged/unstaged changes mix multiple unrelated concerns and need splitting into clean conventional commits, or…
andrewdongminyoo/cc-agents-kit · plugins/repo-gate/skills/setup-trunk/SKILL.md · Use when integrating trunk.io into a repository for the first time, or when configuring trunk linters, git hooks, and…
ericrisco/rsc-harness · skills/context-budget/SKILL.md · Use when a long-horizon task is filling the context window and you must decide what to keep, offload, drop, or hand off…
onewave-ai/claude-skills · context-budget/SKILL.md · Use when a coding session is burning context fast, output is drowning in noise, the model keeps forgetting earlier…
frankxai/claude-skills-library · absorbed/harness/context-budget/SKILL.md · Count what a session loads before adding another skill or MCP server. Use when the default prompt is heavy, a new…
drayline/rootnode-skills · plugins/rootnode-projects/skills/context-budget/SKILL.md · Analyzes Claude Project context budget under the automatic-RAG-by-window model: knowledge files vs. threshold-exempt…
univers42/claude-deal-with-the-devil · skills/context-budget/SKILL.md · Measure and cut what a config costs in context every session: always-on rules, invocable descriptions, skills that…