Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Caching strategies for LLM prompts including Anthropic prompt caching, response caching, and CAG (Cache Augmented Generation) Use when: prompt caching, cache prompt, response cache, cag, cache augmented.
.claude/skills/davila7-prompt-caching/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-15 | ✗→✓ | ▲ Improved | 16% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 3% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 3% | 0% |
| case-03 | ✓→✓ | = Same ✓ | -19% | 0% |
| case-04 | ✓→✓ | = Same ✓ | -5% | 0% |
You're a caching specialist who has reduced LLM costs by 90% through strategic caching. You've implemented systems that cache at multiple levels: prompt prefixes, full responses, and semantic similarity matches.
You understand that LLM caching is different from traditional caching—prompts have prefixes that can be cached, responses vary with temperature, and semantic similarity often matters more than exact match.
Your core principles:
Use Claude's native prompt caching for repeated prefixes
Cache full LLM responses for identical or similar queries
Pre-cache documents in prompt instead of RAG retrieval
| Issue | Severity | Solution | |-------|----------|----------| | Cache miss causes latency spike with additional overhead | high | // Optimize for cache misses, not just hits | | Cached responses become incorrect over time | high | // Implement proper cache invalidation | | Prompt caching doesn't work due to prefix changes | medium | // Structure prompts for optimal caching |
Works well with: context-window-management, rag-implementation, conversation-memory
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 7,327 | 5,874 | -20% | 1 | 1 | 0% | 1,433 | 1,474 | +3% | 0 | 0 | — |
case-02 | pass→pass | 9,777 | 8,343 | -15% | 1 | 1 | 0% | 1,624 | 1,668 | +3% | 0 | 0 | — |
case-03 | pass→pass | 11,405 | 7,006 | -39% | 1 | 1 | 0% | 1,813 | 1,463 | -19% | 0 | 0 | — |
case-04 | pass→pass | 12,110 | 9,515 | -21% | 1 | 1 | 0% | 2,237 | 2,134 | -5% | 0 | 0 | — |
case-13 | pass→pass | 10,414 | 8,113 | -22% | 1 | 1 | 0% | 1,752 | 1,774 | +1% | 0 | 0 | — |
case-05 | pass→pass | 11,366 | 10,064 | -11% | 1 | 1 | 0% | 1,752 | 1,868 | +7% | 0 | 0 | — |
case-06 | pass→pass | 11,612 | 13,644 | +17% | 1 | 1 | 0% | 2,143 | 2,885 | +35% | 0 | 0 | — |
case-07 | pass→pass | 11,246 | 8,282 | -26% | 1 | 1 | 0% | 1,804 | 1,888 | +5% | 0 | 0 | — |
case-08 | pass→pass | 14,132 | 12,379 | -12% | 1 | 1 | 0% | 2,358 | 2,293 | -3% | 0 | 0 | — |
case-09 | pass→pass | 5,949 | 5,788 | -3% | 1 | 1 | 0% | 982 | 1,289 | +31% | 0 | 0 | — |
case-10 | pass→pass | 16,006 | 15,269 | -5% | 1 | 1 | 0% | 2,607 | 2,832 | +9% | 0 | 0 | — |
case-11 | pass→pass | 13,540 | 11,509 | -15% | 1 | 1 | 0% | 2,154 | 2,326 | +8% | 0 | 0 | — |
case-12 | pass→pass | 15,563 | 13,116 | -16% | 1 | 1 | 0% | 2,582 | 2,389 | -7% | 0 | 0 | — |
case-14 | pass→pass | 10,379 | 10,102 | -3% | 1 | 1 | 0% | 1,573 | 1,973 | +25% | 0 | 0 | — |
case-15 | fail→pass | 18,120 | 18,927 | +4% | 1 | 1 | 0% | 3,010 | 3,482 | +16% | 0 | 0 | — |
case-16 | pass→pass | 15,538 | 10,727 | -31% | 1 | 1 | 0% | 2,355 | 2,146 | -9% | 0 | 0 | — |
case-17 | pass→pass | 14,588 | 14,085 | -3% | 1 | 1 | 0% | 2,312 | 2,675 | +16% | 0 | 0 | — |
case-18 | pass→pass | 12,470 | 9,010 | -28% | 1 | 1 | 0% | 2,275 | 1,902 | -16% | 0 | 0 | — |
case-19 | pass→pass | 7,565 | 6,184 | -18% | 1 | 1 | 0% | 1,560 | 1,544 | -1% | 0 | 0 | — |
case-20 | pass→pass | 14,408 | 14,347 | -0% | 1 | 1 | 0% | 2,556 | 2,918 | +14% | 0 | 0 | — |
case-21 | pass→pass | 19,682 | 17,558 | -11% | 1 | 1 | 0% | 3,404 | 3,366 | -1% | 0 | 0 | — |
case-22 | pass→pass | 9,688 | 9,673 | -0% | 1 | 1 | 0% | 1,737 | 1,929 | +11% | 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 +5 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.