New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Caching strategies for LLM prompts covering Anthropic prompt caching, response caching, and cache-augmented generation.

skills.sh installs
760
GitHub stars
50.1K
last updated
Jul 14, 2026
View on GitHub

What it does

  • Covers Anthropic native prompt caching, exact and semantic response caching, and CAG as an alternative to RAG retrieval
  • Includes TypeScript examples using cache_control blocks, SHA-256 prompt hashing, and Redis via ioredis or @upstash/redis
  • Guides the choice between CAG and RAG by corpus size, update frequency, latency needs, and query specificity
  • Designed for LLM applications with stable prompts or documents, and flags cache-miss latency overhead as a sharp edge

Install

$ npx -y skills add sickn33/agentic-awesome-skills --skill prompt-caching -y

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

Files

Prompt Caching

Caching strategies for LLM prompts including Anthropic prompt caching, response caching, and CAG (Cache Augmented Generation)

Capabilities

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

Prerequisites

  • Knowledge: Caching fundamentals, LLM API usage, Hash functions
  • Skills_recommended: context-window-management

Scope

  • Does_not_cover: CDN caching, Database query caching, Static asset caching
  • Boundaries: Focus is LLM-specific caching, Covers prompt and response caching

Ecosystem

Primary_tools

  • Anthropic Prompt Caching - Native prompt caching in Claude API
  • Redis - In-memory cache for responses (ioredis on servers; @upstash/redis over HTTP on serverless, see upstash-redis)
  • OpenAI Caching - Automatic caching in OpenAI API

Patterns

Anthropic Prompt Caching

Use Claude's native prompt caching for repeated prefixes

When to use: Using Claude API with stable system prompts or context

import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic();

Details

Repository
github.com/sickn33/agentic-awesome-skills
Categories
AI Agents & LLM Apps, Memory & Context, Backend & APIs
First seen
May 16, 2026

More from sickn33/agentic-awesome-skills

All 682

Similar to Prompt Caching

More AI Agents & LLM Apps