context-budget

Audit token consumption across Gemini Code components and produce prioritized token-savings reports.

1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/riftzen-bit/gemini-setup --skill context-budget-riftzen-bit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-budget
Source: https://github.com/riftzen-bit/gemini-setup/tree/main/skills/context-budget
Command: npx skills add https://github.com/riftzen-bit/gemini-setup --skill context-budget-riftzen-bit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a systematic audit of token consumption across Gemini Code components to identify bloat, redundancy, and opportunities to reclaim context window space so sessions run faster and outputs remain high quality.

Core Features & Use Cases

  • Inventory and Estimation: Scans agents, skills, rules, MCP server configs, and GEMINI.md to estimate per-file and per-tool token usage using heuristics like words × 1.3 and chars/4 for code.
  • Classification & Triage: Buckets components into Always needed, Sometimes needed, and Rarely needed to guide removal or lazy-loading decisions.
  • Issue Detection & Reporting: Flags heavy agents, bloated frontmatter, redundant content, and MCP over-subscription, then produces a ranked, prioritized token-savings report and optional verbose per-file breakdown for deep analysis.

Quick Start

Run the context-budget audit on your repository to produce a prioritized token-savings report.

Frequently Asked Questions about context-budget

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit token consumption across Gemini Code components?

To audit token consumption, scan agents, skills, rules, and MCP server configs to estimate per-file usage using heuristics like words × 1.3. This identifies bloat and produces a prioritized token-savings report for your Gemini setup.

What is the best way to reduce context window overhead in multi-agent Gemini sessions?

Reducing context window overhead requires classifying components into Always, Sometimes, and Rarely needed buckets. This triage approach flags heavy agents and redundant content, enabling targeted removal or lazy-loading to reclaim space.

Can I estimate per-file token usage for MCP servers and GEMINI.md files?

Yes, you can estimate per-file token usage for MCP servers and GEMINI.md files by applying code and text heuristics like chars/4. This process calculates individual tool footprints to diagnose MCP over-subscription and bloated frontmatter.

Why does my Gemini Code session performance degrade when adding more agents?

Session performance degrades when token consumption bloats the context window with heavy agents and redundant content. Diagnosing this degradation involves scanning components to estimate usage and flagging bloat for removal or lazy-loading.

Does context budget auditing work for large multi-agent setups?

Yes, context budget auditing is designed for large multi-agent Gemini setups. It assesses performance during expansion planning by generating ranked token-savings recommendations and optional verbose per-file breakdowns for deep analysis.