
Prompt Caching
This tackles LLM caching at three levels: Anthropic's native prompt caching for repeated prefixes, full response caching for identical queries, and CAG (Cache Augmented Generation) where you pre-cache documents in the prompt instead of doing RAG retrieval. The claim is 90% cost reduction, which tracks if you're hitting the same prompt structures repeatedly. Watch out for cache misses adding latency overhead and stale cached responses becoming wrong over time. The key insight here is that LLM caching isn't like HTTP caching because you need to think about prompt prefix structure, temperature settings, and semantic similarity rather than exact matches.
- skills.sh installs
- 437
- GitHub stars
- 33.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add davila7/claude-code-templates --skill prompt-caching --agent claude-codeInstalls into .claude/skills of the current project.
Files
Prompt Caching
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:
- Cache at the right level—prefix, response, or both
- K
Capabilities
- prompt-cache
- response-cache
- kv-cache
- cag-patterns
- cache-invalidation
Patterns
Anthropic Prompt Caching
Use Claude's native prompt caching for repeated prefixes
Response Caching
Cache full LLM responses for identical or similar queries
Cache Augmented Generation (CAG)
Pre-cache documents in prompt instead of RAG retrieval
Anti-Patterns
❌ Caching with High Temperature
❌ No Cache Invalidation
❌ Caching Everything
⚠️ Sharp Edges
Sponsors
Details
- Repository
- github.com/davila7/claude-code-templates
- Category
- AI & Agent Building
- First seen
- Jun 3, 2026
More from davila7/claude-code-templates
All 618- Commit435
- Vercel Deployment433
- C4 Architecture430
- Information Security Manager Iso27001428
- Mlflow427
- Statsmodels426
- Prompt Library423
- Chroma421
- Telegram Mini App420
- Pricing Strategy419
- Seo419
- Evaluating Llms Harness418
- Ml Paper Writing416
- Openalex Database416
- Workflow Automation416
- Backend To Frontend Handoff Docs413
- Shopify Development411
- Nextjs Supabase Auth410
- Clinicaltrials Database409
- Writing Plans408
- Geopandas407
- Bash Linux405
- App Store Optimization404
- Telegram Bot Builder403