What problem does it solve? Long-running agent sessions overflow limited context windows, driving up token costs, latency, and quality degradation. This Skill provides concrete techniques and utilities to extend effective context capacity without lowering answer quality. ## Core Features & Use Cases - Observation Masking: Replace verbose tool outputs with compact retrievable references, achieving 60-80% reduction in masked observations. - Compaction & Budgeting: Trigger summarization at 70-80% utilization with category-aware strategies and explicit token budget allocation via the ContextBudget class. - KV-Cache Optimization: Structure prompts with stable prefixes to reach 70%+ cache hit rates and cut cost and latency. - Use Case: An agent loop where tool outputs consume over half the context window uses ObservationStore to mask stale outputs and ContextBudget to trigger compaction before quality degrades. ## Quick Start Ask the AI to analyze your agent's context usage and apply observation masking and budget-triggered compaction using the provided Python utilities.