What problem does it solve? Long-running agents and extended conversations exhaust limited context windows, driving up token costs, latency, and response degradation. This Skill provides concrete techniques to reduce token usage while preserving the information that matters. ## Core Features & Use Cases - Compaction Strategies: Summarize tool outputs, old conversation turns, and retrieved documents when context approaches limits, targeting 50-70% token reduction with minimal quality loss. - Observation Masking: Replace verbose tool outputs (often 80%+ of agent token usage) with compact references that remain retrievable on demand. - KV-Cache Optimization: Order context elements with stable content first to maximize prefix cache hits and reduce cost and latency. - Context Partitioning: Split work across sub-agents with isolated contexts, then aggregate validated results. - Use Case: A production agent system hits 80% context utilization mid-task. Apply trigger-based compaction to summarize early turns, mask stale tool outputs, and continue the task without losing critical decisions. ## Quick Start Use the context-optimization skill to reduce token usage in my long-running agent conversation that is approaching its context limit.