Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Optimize token usage through prompt caching and compression
.claude/skills/miosa-osa-prompt-cache-optimizer/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-15 | ✗→✓ | ▲ Improved | -22% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -28% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -30% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -18% | 0% |
Reduces token costs by 50-90% through intelligent caching and compression.
Query → Embedding → Similarity Search → Cache Hit/Miss
↓ ↓
Vector Store Return cached or call LLMCache hits provide 100% token savings with near-instant response.
Mitigate "lost in the middle" problem:
Working Memory (registers) → Always in context
FIFO Queue (L1/L2 cache) → Recent exchanges
Archival Memory (disk) → Semantic search only| Context Size | Latency Need | Accuracy Need | Strategy | |--------------|--------------|---------------|----------| | <10K tokens | Any | Any | No compression | | 10K-50K | Low | High | Light (2-3x) | | 10K-50K | High | Medium | Moderate (5-7x) | | 50K-100K | Any | Medium | Aggressive (10-20x) | | >100K | Any | Any | Hierarchical + Aggressive |
For streaming/long sessions, preserve first 4 tokens as attention sinks:
[attention_sinks (4 tokens)] + [rolling_window (window - 4)]This maintains model coherence over infinite context.
Hybrid = Dense (semantic) + Sparse (BM25)
Fusion = Reciprocal Rank Fusion (RRF)Achieves 50-100x document reduction with maintained relevance.
Based on LLMLingua, GPTCache, MemGPT, and StreamingLLM research
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-05 | pass→pass | 18,242 | 19,968 | +9% | 1 | 1 | 0% | 3,174 | 4,135 | +30% | 0 | 0 | — |
case-06 | fail→fail | 21,524 | 20,383 | -5% | 1 | 1 | 0% | 3,640 | 4,111 | +13% | 0 | 0 | — |
case-15 | fail→pass | 9,610 | 2,617 | -73% | 1 | 1 | 0% | 1,415 | 1,100 | -22% | 0 | 0 | — |
case-01 | fail→fail | 19,970 | 21,586 | +8% | 1 | 1 | 0% | 3,192 | 3,748 | +17% | 0 | 0 | — |
case-02 | fail→pass | 25,119 | 30,096 | +20% | 1 | 1 | 0% | 3,832 | 5,061 | +32% | 0 | 0 | — |
case-03 | fail→fail | 18,174 | 23,801 | +31% | 1 | 1 | 0% | 3,020 | 4,185 | +39% | 0 | 0 | — |
case-04 | fail→fail | 24,312 | 24,863 | +2% | 1 | 1 | 0% | 3,379 | 4,106 | +22% | 0 | 0 | — |
case-07 | fail→pass | 13,618 | 6,771 | -50% | 1 | 1 | 0% | 2,313 | 1,659 | -28% | 0 | 0 | — |
case-08 | fail→pass | 15,331 | 5,728 | -63% | 1 | 1 | 0% | 2,264 | 1,575 | -30% | 0 | 0 | — |
case-09 | fail→pass | 11,322 | 4,005 | -65% | 1 | 1 | 0% | 1,579 | 1,292 | -18% | 0 | 0 | — |
case-10 | pass→pass | 14,193 | 3,727 | -74% | 1 | 1 | 0% | 2,184 | 1,242 | -43% | 0 | 0 | — |
case-11 | pass→pass | 16,277 | 13,299 | -18% | 1 | 1 | 0% | 2,632 | 3,076 | +17% | 0 | 0 | — |
case-12 | pass→pass | 10,481 | 8,061 | -23% | 1 | 1 | 0% | 1,535 | 1,936 | +26% | 0 | 0 | — |
case-13 | pass→pass | 16,008 | 4,919 | -69% | 1 | 1 | 0% | 2,527 | 1,591 | -37% | 0 | 0 | — |
case-14 | pass→pass | 15,432 | 7,897 | -49% | 1 | 1 | 0% | 2,440 | 1,757 | -28% | 0 | 0 | — |
case-16 | pass→pass | 16,689 | 8,344 | -50% | 1 | 1 | 0% | 2,077 | 2,116 | +2% | 0 | 0 | — |
case-17 | fail→pass | 13,906 | 2,346 | -83% | 1 | 1 | 0% | 2,126 | 1,035 | -51% | 0 | 0 | — |
case-18 | pass→pass | 13,478 | 6,367 | -53% | 1 | 1 | 0% | 2,133 | 1,594 | -25% | 0 | 0 | — |
case-19 | fail→pass | 14,720 | 2,245 | -85% | 1 | 1 | 0% | 2,283 | 1,059 | -54% | 0 | 0 | — |
case-20 | pass→pass | 16,442 | 4,212 | -74% | 1 | 1 | 0% | 2,735 | 1,277 | -53% | 0 | 0 | — |
case-21 | pass→pass | 20,520 | 2,566 | -87% | 1 | 1 | 0% | 1,657 | 977 | -41% | 0 | 0 | — |
case-22 | fail→pass | 5,890 | 2,454 | -58% | 1 | 1 | 0% | 911 | 1,075 | +18% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +36 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.