This covers three caching layers for LLM applications: Anthropic's native prompt caching for stable prefixes (90% token cost reduction), response caching with Redis for repeated queries, and Cache Augmented Generation where you pre-load entire document sets into cached prompts instead of doing RAG retrieval. The CAG approach is smart when your corpus is under 100K tokens and rarely changes, since you skip the retrieval step entirely. The sharp edges section is honest about when caching hurts more than helps, like when your cache hit rate is below 50% and the overhead of cache checks actually slows things down. Includes a decision matrix comparing CAG versus RAG based on corpus size and update frequency.

skills.sh installs
760
GitHub stars
43.1K
last updated
Jul 14, 2026

Install

$ npx -y skills add sickn33/antigravity-awesome-skills --skill prompt-caching --agent claude-code

Installs into .claude/skills of the current project.

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();

Sponsors

Details

Repository
github.com/sickn33/antigravity-awesome-skills
Category
AI & Agent Building
First seen
May 16, 2026

More from sickn33/antigravity-awesome-skills

All 708
1sickn33 avatarrag-implementationsickn33/antigravity-awesome-skillsrag implementation739skills.sh installs
2boshu2 avataropenai-docsboshu2/agentopsUse official OpenAI docs.733skills.sh installs
3ruvnet avatarvector-embedruvnet/rufloGenerate embeddings via npx ruvector@0.2.25 embed text (ONNX all-MiniLM-L6-v2, 384-dim), normalize, and store in HNSW index732skills.sh installs
4aradotso avatarphantom-ai-coworkeraradotso/trending-skillsphantom ai coworker729skills.sh installs
5aradotso avatarmarketing-pipeline-share-ai-content-automationaradotso/marketing-skillsmarketing pipeline share ai content automation726skills.sh installs
6aradotso avatarmarketing-pipeline-share-ai-contentaradotso/marketing-skillsmarketing pipeline share ai content722skills.sh installs