Skip to content

Multi-level LLM caching guide covering prompt prefixes, full responses, and cache-augmented generation patterns.

CCM score
53 of 100
skills.sh installs
441
GitHub stars
34.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers Anthropic prompt caching for repeated prefixes, full response caching for identical or similar queries, and CAG as an alternative to retrieval
  • Includes anti-patterns such as caching at high temperature, skipping cache invalidation, and caching everything indiscriminately
  • Flags sharp edges including latency spikes on cache misses, stale cached responses, and prefix changes that silently defeat prompt caching
  • Designed for teams reducing LLM token costs and works alongside context-window-management, rag-implementation, and conversation-memory

Install

$ npx -y skills add davila7/claude-code-templates --skill prompt-caching -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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:

  1. Cache at the right level—prefix, response, or both
  2. 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

Details

Repository
github.com/davila7/claude-code-templates
Category
AI Agents & LLM Apps
First seen
Jun 3, 2026

Questions

What does the prompt-caching skill do?

The prompt-caching skill covers caching strategies for LLM prompts, including Anthropic prompt caching for repeated prefixes, full response caching for identical or similar queries, and Cache Augmented Generation that pre-caches documents in the prompt instead of using retrieval. It also flags pitfalls such as caching with high temperature and missing cache invalidation.

How do I install the prompt-caching skill?

Run npx -y skills add davila7/claude-code-templates --skill prompt-caching -y in your project. This installs the prompt-caching skill so your agent can apply LLM prompt caching strategies.

Where does prompt-caching stand in the AI Agents & LLM Apps category?

On Claude Marketplaces, prompt-caching is listed in the AI Agents & LLM Apps category, alongside microsoft-foundry, azure-ai and several google-agents-cli skills. It stands apart by focusing on caching at the prompt prefix, response and document level for LLM cost and latency reduction.

Which related skills work well alongside prompt-caching?

The SKILL.md names context-window-management, rag-implementation and conversation-memory as skills that work well with prompt-caching. Pairing them lets an agent manage context, retrieval and memory alongside its caching strategy.

More from davila7/claude-code-templates

All 398

Similar to Prompt Caching

More AI Agents & LLM Apps