rc-context-budget

Solid

Audits what consumes the agent's context window — installed agents, skills, rules, MCP tool schemas, and CLAUDE.md/AGENTS.md — estimates token cost, classifies each as always/sometimes/rarely needed, and recommends the highest-impact reductions. Use when sessions compact too early, when MCP/tooling feels heavy, or before adding more agents/skills. Do not use for application performance profiling or runtime memory analysis.

AI & Automation 19 stars 1 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
43
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Context Budget The context window is a budget, not free space. Every always-loaded agent description, skill, rule, MCP tool schema, and `CLAUDE.md` line is spent on *every* turn — a 200k window can effectively start at 70k once enough tooling is enabled, forcing early compaction and degrading reasoning. This skill inventories that fixed overhead, estimates its token cost, and tells you what to trim. Read-only: recommend, do not disable servers, edit configs, or delete skills yourself. ## What to inventory Discover and measure each contributor (skip what does not exist): - **Always-loaded prose**: `CLAUDE.md`, `AGENTS.md`, and any always-on rules/`.cursor/rules` injected globally. - **Agents**: `.claude/agents/**`, `.opencode/agent/**`, and plugin-bundled `agents/**` — every agent's `description` is loaded whenever the orchestrator considers delegating (Task tool). Long descriptions cost on every invocation. - **Skills**: bundled + installed `*/SKILL.md`. The `description` frontmatter is what loads for routing; the body loads only when the skill activates. - **MCP servers**: each enabled server's tool schemas load up front. Estimate **~400–600 tokens per tool**; a server exposing 20 tools is ~10k tokens always-on. - **Slash commands**: their `description`/`argument-hint`. ## Estimating tokens - Prose/markdown: `tokens ≈ words × 1.3`. Count words with `wc -w`. - MCP: `tokens ≈ tool_count × 500`. Count tools from the server's manifest/inspect output, or estimate from its...

Details

Author
rodolfochicone
Repository
rodolfochicone/rc-project
Created
1 months ago
Last Updated
2 weeks ago
Language
JavaScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category