prompt-caching

Implements LLM caching strategies for prompt prefixes, responses, and cache-augmented generation.

2|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/Shubh2310-developer/ENGUNITYCORE --skill prompt-caching-shubh2310-developer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prompt-caching
Source: https://github.com/Shubh2310-developer/ENGUNITYCORE/tree/main/.claude/skills/prompt-caching
Command: npx skills add https://github.com/Shubh2310-developer/ENGUNITYCORE --skill prompt-caching-shubh2310-developer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? LLM API calls are expensive and slow when the same prompts, prefixes, or documents are sent repeatedly. This Skill provides guidance on caching at multiple levels—prompt prefixes, full responses, and pre-cached documents—to reduce latency and API costs. ## Core Features & Use Cases - Anthropic Prompt Caching: Structure prompts so repeated prefixes are cached by Claude's native prompt caching, cutting cost on long system prompts and shared context. - Response Caching: Cache full LLM responses for identical or semantically similar queries to avoid redundant generation. - Cache Augmented Generation (CAG): Pre-cache documents directly in the prompt as an alternative to runtime RAG retrieval. - Use Case: A chatbot sends the same 10,000-token knowledge base with every user question. By caching that prefix, each request only pays for the new user turn, dramatically lowering cost and time-to-first-token. ## Quick Start Ask the AI to design a caching strategy for your LLM application that uses Anthropic prompt caching for the system prompt and response caching for repeated user queries.

Frequently Asked Questions about prompt-caching

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use Anthropic prompt caching to reduce LLM costs?

Anthropic prompt caching stores repeated prompt prefixes so subsequent requests only process new tokens. Structure your prompt so stable content like system instructions and documents comes first, then mark the cache breakpoint on that prefix.

What is cache augmented generation (CAG) vs RAG?

Cache augmented generation pre-loads documents into the cached prompt instead of retrieving them at query time like RAG. CAG works well when the document set is small and stable, avoiding retrieval latency and embedding infrastructure.

When should I cache full LLM responses?

Cache full responses when queries repeat exactly or are semantically similar, such as FAQ-style chatbots. Avoid response caching with high temperature settings or time-sensitive answers, since cached output can become stale or incorrect.

Why does prompt caching not work on my requests?

Prompt caching fails when the prefix changes between requests, since the cache matches on exact prefix content. Keep dynamic content like timestamps and user data at the end of the prompt so the shared prefix stays stable.

How do I handle cache invalidation for LLM responses?

Cache invalidation requires TTLs or event-based purging tied to when underlying data changes. Without invalidation, cached responses become incorrect over time, so pair every cache entry with an explicit expiration or update trigger.