
Context Optimization
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.
- skills.sh installs
- 234
- GitHub stars
- 24
- last updated
- Jun 3, 2026
Install
$ npx -y skills add shipshitdev/library --skill context-optimization --agent claude-codeInstalls into .claude/skills of the current project.
Files
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.
Browse the repository on GitHubSponsors
Details
- Repository
- github.com/shipshitdev/library
- First seen
- Jun 3, 2026
More from shipshitdev/library
All 56- Expo Architect233
- Funnel Architect227
- Brand Architect222
- Nestjs Queue Architect201
- Mvp Architect197
- Design Consistency Auditor192
- Landing Page Vercel188
- Email Finder186
- Execution Accelerator180
- Business Model Auditor166
- Outbound Optimizer166
- Playwright E2e Init166
- Analytics Expert164
- Business Operator160
- Fundraise Advisor153
- Memory Systems152
- Plasmo Extension Architect152
- Aws Infrastructure151
- Content Creator147
- Leads Researcher145
- Agent Browser141
- Html Style141
- Security Expert141
- Qa Reviewer137