context-optimization
This skill should be used for improving context efficiency: context budgeting, observation masking, prefix or KV-cache strategy, partitioning, token-cost reduction, retrieval scoping, and extending effective context capacity without lowering answer quality.
npx skills add guanyang/open-agent-hub --skill context-optimization --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Context Optimization Techniques Context optimization extends the effective capacity of limited context windows through strategic compression, masking, caching, and partitioning. Effective optimization increases useful capacity without requiring larger models or longer windows — but only when applied with measurement discipline. The techniques below are ordered by impact and risk. ## When to Activate Activate this skill when: - Context budgets or token costs constrain task complexity - Observation masking can replace verbose tool outputs with retrievable references - Prefix or KV-cache hit rate needs improvement - Retrieval scoping can reduce irrelevant loaded context - Context partitioning can extend effective capacity across agents - Budget triggers are needed for masking, compaction, or partitioning Do not activate this skill for adjacent work owned by other skills: - Explaining why attention or context windows behave this way: `context-fundamentals`. - Diagnosing active lost-in-middle, poisoning, distraction, confusion, or clash: `context-degradation`. - Designing a structured handoff summary for a long conversation: `context-compression`. - Storing large outputs, plans, or lo
- When to Activate
- Core Concepts
- Detailed Topics
- Compaction Strategies
- Observation Masking
- KV-Cache Optimization
- Context Partitioning
- Budget Management
- Practical Guidance
- Optimization Decision Framework
- Performance Targets
- Examples
- Guidelines
- Gotchas
What does the context-optimization skill do?
This skill should be used for improving context efficiency: context budgeting, observation masking, prefix or KV-cache strategy, partitioning, token-cost reduction, retrieval scoping, and extending effective context capacity without lowering answer quality.
How do I install it?
Run `npx skills add guanyang/open-agent-hub --skill context-optimization --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From guanyang/open-agent-hub, a repository with 940 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
