context-budget

Enforce preloaded skill count and SKILL.md line limits per agent tier.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/monktui/git-review --skill context-budget-monktui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-budget
Source: https://github.com/monktui/git-review/tree/main/.claude/skills/context-budget
Command: npx skills add https://github.com/monktui/git-review --skill context-budget-monktui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Context budgeting prevents agents from loading too many instructions and tool descriptions, which causes degraded reasoning, repetition, and inconsistent outputs when the prompt becomes too large.

Core Features & Use Cases

  • Skill preloading limits: Enforces maximum numbers of preloaded skills and a maximum total line count of preloaded skill content per agent to keep prompts focused.
  • Per-agent tier budgets: Applies different context thresholds for Haiku, Sonnet, and Opus so smaller models stay efficient while larger models get more capacity.
  • Bloat detection and optimization loop: Uses measurable signals (like repetition, ignored instructions, and longer runtimes) and logs outcomes to claude-mem for periodic optimizer review.
  • MCP overhead accounting: Incorporates baseline token usage from MCP tool descriptions into the budget so the skill limits reflect real runtime context pressure.

Quick Start

Use context-budget when configuring or spawning an agent by counting preloaded skills and summing their SKILL.md line counts, then trimming to stay under the recommended line limits for that agent tier.

Frequently Asked Questions about context-budget

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

FAQPage Schema
How do I prevent agent prompt context bloat from too many preloaded skills?

You can prevent agent prompt context bloat by enforcing maximum preloaded skill counts and total SKILL.md line limits per session, which keeps prompts focused and prevents degraded reasoning.

Why does my agent ignore instructions or repeat itself during multi-tool MCP workflows?

Agents ignore instructions or repeat themselves during MCP workflows because the prompt context is too large, causing degraded reasoning that context budgeting solves by enforcing skill preloading limits and MCP overhead accounting.

How do I set context budgets for different agent tiers like Haiku, Sonnet, and Opus?

Set context budgets for Haiku, Sonnet, and Opus tiers by applying per-agent tier thresholds so smaller models stay efficient with lower limits while larger models get more preloaded skill capacity.

Does baseline token usage from MCP tool descriptions affect context budgeting?

Baseline token usage from MCP tool descriptions does affect context budgeting; incorporating MCP overhead accounting into the budget ensures skill limits reflect real runtime context pressure and prevents bloat.

What is the best way to optimize agent prompts when runtime gets longer and outputs become inconsistent?

The best way to optimize agent prompts with longer runtimes and inconsistent outputs is using a bloat detection loop that logs measurable signals and per-task outcomes to claude-mem for iterative improvement.

When should I not use context budgeting for agent spawning?

You should not use context budgeting for agent spawning when workflows involve very few preloaded skills or minimal MCP tool descriptions, as the baseline overhead is too low to cause the targeted prompt bloat.