hoangnguyen0403/agent-skills-standard-common-common-context-optimization
Maximize context window efficiency, reduce latency, and prevent lost-in-middle issues through strategic masking and compaction. Use when token budgets are tight, tool outputs overflow the context, conversations drift from intent, or latency spikes from cache misses.
This is a copy. The original lives at hoangnguyen0403/common-context-optimization.
npx skills add https://github.com/HoangNguyen0403/agent-skills-standard --skill common-context-optimization
Problem: Large tool outputs (logs, JSON lists) overwhelm context and degrade reasoning.
Solution: Replace raw output with semantic summaries _after_ consumption.
references/masking.md for patterns.See implementation examples for masking patterns.
Problem: Long conversations drift from original intent.
Solution: Recursive summarization that preserves _State_ over _Dialogue_.
references/compaction.md for algorithms.See implementation examples for compacted state format.
Goal: Maximize pre-fill cache hits.
Take hoangnguyen0403/agent-skills-standard-common-common-context-optimization from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.