When your agent conversations start hitting token limits or your API bills spike from long contexts, this skill gives you the playbook for squeezing more out of what you have. It covers four main techniques: compaction (summarizing old conversation turns), observation masking (replacing verbose tool outputs with compact references), KV-cache optimization (structuring prompts to maximize prefix caching), and context partitioning (splitting work across sub-agents). The practical breakdown is solid, with specific guidance on when to mask versus summarize and how to measure if your optimizations actually work. Best for production systems where context management directly impacts cost and performance, not one-off scripts.
npx skills add https://github.com/shipshitdev/library --skill context-optimization