prompt-caching

Implement multi-level prompt caching for prefixes, responses, and semantic matches.

Updated Jan 26, 2026
One-click install
npx skills add https://github.com/TwuanMinn/fadelab --skill prompt-caching-twuanminn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prompt-caching
Source: https://github.com/TwuanMinn/fadelab/tree/main/.agent/skills/skills/prompt-caching
Command: npx skills add https://github.com/TwuanMinn/fadelab --skill prompt-caching-twuanminn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

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.

Core Features & Use Cases

  • prompt-cache
  • response-cache
  • kv-cache
  • cag-patterns
  • cache-invalidation

Quick Start

Use the prompt-caching skill to implement caching for common prompts and enable response caching to reduce latency and costs.

Frequently Asked Questions about prompt-caching

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

FAQPage Schema
How do I reduce LLM costs and latency with prompt caching?

You can reduce LLM costs and latency with prompt caching by implementing multi-level caching for prefixes, responses, and semantic matches across iterative conversations and RAG-like workflows. This avoids redundant token processing for common prompts.

What is Cache Augmented Generation (CAG) and how does it differ from standard retrieval?

Cache Augmented Generation (CAG) is a pattern that uses cached context for faster retrieval instead of standard dynamic retrieval. It leverages prompt caching to provide pre-loaded context, reducing retrieval overhead and latency in LLM workflows.

How do I handle cache invalidation for LLM response caches in iterative conversations?

You handle cache invalidation for LLM response caches by applying cache invalidation patterns that detect semantic changes in queries. This ensures outdated responses are cleared while preserving valid prefix caches for ongoing iterative conversations.

Can I apply Anthropic prompt caching to both response caches and semantic matches?

Yes, you can apply Anthropic prompt caching alongside response caches and semantic matches. The approach supports multi-level caching to manage common prefixes, exact responses, and semantically similar queries within your LLM application.

What are the limitations of using prompt caching for RAG-like workflows?

A key limitation of prompt caching in RAG-like workflows is managing cache invalidation when underlying context changes. If semantic matches are not invalidated properly, the LLM may retrieve outdated cached responses instead of current information.