What problem does it solve? Long-running agents and LLM applications hit context window limits, driving up token costs, latency, and quality degradation. This Skill provides concrete techniques and Python utilities to extend effective context capacity without larger models. ## Core Features & Use Cases - Compaction & Summarization: Category-aware summarization of tool outputs, conversation turns, and retrieved documents, triggered at 70-80% utilization thresholds. - Observation Masking: Replace verbose tool outputs with compact retrievable references via the ObservationStore class, targeting 60-80% reduction in masked content. - KV-Cache Optimization: Stabilize prompt prefixes by removing timestamps and session IDs to maximize cache hit rates and cut cost and latency. - Context Budgeting & Partitioning: Allocate token budgets per category with ContextBudget, detect optimization triggers, and partition work across sub-agents when a single window cannot hold the task. - Use Case: An agent processing dozens of tool calls per session exceeds 80% context utilization; apply masking to old tool outputs, compact history, and stabilize the system prompt to continue without quality loss. ## Quick Start Ask the AI to optimize the context of a long agent conversation by masking old tool outputs and compacting history when utilization exceeds 80%.