Context optimization extends the effective capacity of limited context windows through strategic compression, masking, caching, and partitioning. The goal is not to magically increase context windows but to make better use of available capacity. Effective optimization can double or triple effective context capacity without requiring larger models or longer contexts.
Context optimization extends effective capacity through four primary strategies: compaction (summarizing context near limits), observation masking (replacing verbose outputs with references), KV-cache optimization (reusing cached computations), and context partitioning (splitting work across isolated contexts).
The key insight is that context quality matters more than quantity. Optimization preserves signal while reducing noise. The art lies in selecting what to keep versus what to discard, and when to apply each technique.
Этот навык следует использовать, когда пользователь просит «оптимизировать контекст», «сократить стоимость токенов», «повысить эффективность контекста», «реализовать оптимизацию KV-кэша», «разделить контекст» или упоминает ограничения контекста, маскирование наблюдения, бюджетирование контекста или расширение эффективной емкости контекста. Источник: muratcankoylan/agent-skills-for-context-engineering.