PR

prompt-caching

Optimizes LLM performance using prompt, response, and semantic caching patterns.

Install

mkdir -p .claude/skills/prompt-caching && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/888" && unzip -o skill.zip -d .claude/skills/prompt-caching && rm skill.zip

Installs to .claude/skills/prompt-caching

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

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.
203 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Implements prefix caching for repetitive prompt segments
  • Categorizes cache targets by semantic similarity vs exact match
  • Manages invalidation logic for volatile prompt data
  • Architects Cache Augmented Generation (CAG) pipelines
  • Monitors cache hit rates to identify performance bottlenecks

How it works

Maintains an indexing layer between the user input and the LLM API to serve prefix blocks or cached responses directly.

Inputs & outputs

You give it
LLM prompt or data stream
You get back
Cached prompt configuration or optimized retrieval strategy

When to use prompt-caching

  • Cache expensive LLM prompts
  • Reduce API latency for repetitive queries
  • Implement semantic cache for RAG systems

About this skill

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

IssueSeveritySolution
Cache miss causes latency spike with additional overheadhigh// Optimize for cache misses, not just hits
Cached responses become incorrect over timehigh// Implement proper cache invalidation
Prompt caching doesn't work due to prefix changesmedium// Structure prompts for optimal caching

Related Skills

Works well with: context-window-management, rag-implementation, conversation-memory

When not to use it

  • Applications with extremely high variance in prompt structure
  • Low-frequency tasks where caching overhead exceeds API latency

Limitations

  • High temperature settings invalidate cached results
  • Risk of serving stale data if invalidation logic is flawed

How it compares

Treats prompt engineering as a stateful optimization problem, focusing on cache-miss reduction and prefix structure.

Compared to similar skills

prompt-caching side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
prompt-caching (this skill)146moNo flagsIntermediate
dspy47moReviewIntermediate
critic-judge-design04moNo flagsAdvanced
prompt-engineering03moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

software-architecture

davila7

Guide for quality focused software architecture. This skill should be used when users want to write code, design architecture, analyze code, in any case that relates to software development.

333868

planning-with-files

davila7

Implements Manus-style file-based planning for complex tasks. Creates task_plan.md, findings.md, and progress.md. Use when starting complex multi-step tasks, research projects, or any task requiring >5 tool calls.

233106

telegram-bot-builder

davila7

Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.

106130

scroll-experience

davila7

Expert in building immersive scroll-driven experiences - parallax storytelling, scroll animations, interactive narratives, and cinematic web experiences. Like NY Times interactives, Apple product pages, and award-winning web experiences. Makes websites feel like experiences, not just pages. Use when: scroll animation, parallax, scroll storytelling, interactive story, cinematic website.

101142

humanizer

davila7

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases. Credits: Original skill by @blader - https://github.com/blader/humanizer

90175

game-development

davila7

Game development orchestrator. Routes to platform-specific skills based on project needs.

70195

You might also like

dspy

davila7

Build complex AI systems with declarative programming, optimize prompts automatically, create modular RAG systems and agents with DSPy - Stanford NLP's framework for systematic LM programming

430

critic-judge-design

Victoriakaey

Use when designing any LLM-as-Judge, Critic, or Evaluator node. Covers input structure, output schema, chain-of-thought ordering, single-pass vs multi-stage tradeoffs, and known failure modes. Prevents the most common design mistakes that cause Critic nodes to be unreliable.

00

prompt-engineering

iletai

Use when "writing prompts", "prompt optimization", "few-shot learning", "chain of thought", or asking about "RAG systems", "agent workflows", "LLM integration", "prompt templates

00

senior-prompt-engineer

CidLucas

World-class prompt engineering skill for LLM optimization, prompt patterns, structured outputs, and AI product development. Expertise in Claude, GPT-4, prompt design patterns, few-shot learning, chain-of-thought, and AI evaluation. Includes RAG optimization, agent design, and LLM system architecture

00

skill-creator

anthropics

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

128200

langchain

zechenzhangAGI

Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+ integrations, ReAct agents, tool calling, memory management, and vector store retrieval. Use for building chatbots, question-answering systems, autonomous agents, or RAG applications. Best for rapid prototyping and production deployments.

26138

Search skills

Search the agent skills registry