Context Optimization
Strategies for stretching limited context windows through compaction, observation masking, KV-cache reuse, and partitioning.
- CCM score
- 54 of 100
- skills.sh installs
- 561
- GitHub stars
- 50.5K
- last updated
- Jul 14, 2026
Own this skill? Claim it
What it does
- Covers compaction, observation masking, KV-cache optimization, and context partitioning, with budget allocation and trigger-based optimization
- Explains which content to summarize, mask, or never compress, such as tool outputs, old turns, and the system prompt
- Enforces preservation boundaries so authorization, user constraints, unresolved blockers, and failed checks survive summarization
- Designed for long-running agent systems and production workloads where token cost, latency, or context limits constrain tasks
Install
$ npx -y skills add sickn33/agentic-awesome-skills --skill context-optimization -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Context Optimization Techniques
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. Effectiveness depends on task/workload and must be measured; compression can lose critical information.
When to Use
Activate this skill when:
- Context limits constrain task complexity
- Optimizing for cost reduction (fewer tokens = lower costs)
- Reducing latency for long conversations
- Implementing long-running agent systems
- Needing to handle larger documents or conversations
- Building production systems at scale
Core Concepts
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).
Details
- Repository
- github.com/sickn33/agentic-awesome-skills
- Categories
- Memory & Context, AI Agents & LLM Apps
- First seen
- Jun 3, 2026
More from sickn33/agentic-awesome-skills
All 682- Codex Review560
- Memory Systems559
- Email Sequence557
- Subagent Driven Development557
- Cpp Pro556
- Frontend Slides553
- Customer Support547
- Cc Skill Continuous Learning544
- Code Review Excellence543
- Skill Seekers543
- Trigger Dev539
- Avalonia Viewmodels Zafiro538
- Network Engineer536
- Onboarding Cro535
- Programmatic Seo535
- Using Git Worktrees535
- Obsidian Clipper Template Creator534
- Verification Before Completion534
- Form Cro530
- Avalonia Zafiro Development529
- Documentation Generation Doc Generate528
- Moodle External Api Development526
- Theme Factory526
- Launch Strategy522
Similar to Context Optimization
More Memory & Contextcontext-compressionSkillsickn33/agentic-awesome-skills1.4K installsStructured context compression strategies that keep file trails and decisions intact across long agent sessions.
context-window-managementSkillsickn33/agentic-awesome-skills1.6K installsStrategies for managing LLM context windows through tiered selection, summarization, trimming, and position-aware prompt layout.
context-engineeringSkillmrgoonie/claudekit-skills514 installsCurated context engineering playbook for agent systems covering compaction, memory, multi-agent patterns, and evaluation.
pm-tokensPluginmohitagw15856/pm-claude-skills1.6K starsToken optimization for every stage of the agent journey: crush tool outputs before they enter context, navigate code by map instead of reading files, diet the o
session-compressionSkillbobmatnyc/claude-mpm-skills680 installsCompression techniques for long multi-turn AI conversations, from progressive summarization to prompt caching.
token-optimizerSkilld4kooo/openclaw-token-memory-optimizer510 installsOptimization suite that isolates background tasks and summarizes context to prevent OpenClaw token bloat.