context-budget

Analyze Gemini CLI token consumption across agents, skills, rules, and MCP servers.

Updated Sep 13, 2025
One-click install
npx skills add https://github.com/llmh333/employee_management_spring --skill context-budget-llmh333
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-budget
Source: https://github.com/llmh333/employee_management_spring/tree/main/.gemini/skills/context-budget
Command: npx skills add https://github.com/llmh333/employee_management_spring --skill context-budget-llmh333

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Context-budgeting prevents Gemini CLI sessions from degrading due to excessive prompt overhead by identifying which agents, skills, rules, MCP servers, and GEMINI.md components consume the most tokens.

Core Features & Use Cases

  • Context overhead inventory: Estimates token consumption across loaded components and flags likely-heavy files and bloated frontmatter.
  • Redundancy and overlap detection: Identifies duplicate skill copies and overlapping rule content that inflates repeated context.
  • MCP tool schema sizing: Estimates overhead from MCP servers and flags servers that wrap tools available for free.
  • Actionable ranked recommendations: Produces a prioritized report of changes that yield the greatest context savings, including an optional verbose per-file breakdown.

Quick Start

Run /egc-context-budget when you want to see a prioritized report of the largest contributors to your Gemini CLI context usage.

Frequently Asked Questions about context-budget

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

FAQPage Schema
How do I reduce Gemini CLI token consumption and optimize prompt overhead?

To reduce Gemini CLI token consumption, audit context bloat across agents, skills, rules, MCP servers, and GEMINI.md files. This identifies redundant content and flags heavy components, producing a prioritized report of token-savings recommendations to reclaim space.

What is the best way to audit MCP server overhead and bloated context in Gemini CLI?

The best way to audit MCP server overhead is to estimate tool schema sizing and detect servers wrapping tools available for free. An inventory scan flags bloated frontmatter and overlapping rule content, generating actionable recommendations to reduce repeated context inflation.

Why does my Gemini CLI session slow down during post-expansion bloat?

Gemini CLI sessions slow down during post-expansion bloat due to excessive prompt overhead from loaded components. Analyzing token consumption across agents, skills, and MCP servers identifies duplicate skill copies and redundant rules causing the degradation.

Can I detect duplicate skills and overlapping rules inflating my context budget?

Yes, you can detect duplicate skills and overlapping rules by performing a context overhead inventory. This heuristic token estimation flags bloated frontmatter and redundant content, allowing you to eliminate repeated context and optimize the configuration.

When do I need to run a context budget audit for Gemini CLI configurations?

You need to run a context budget audit during session slowdowns, after post-expansion bloat, or pre-planning when adding new agents, skills, or MCP servers. This prevents configuration degradation by identifying heavy files before they impact performance.