← ClaudeAtlas

prompt-caching-advisorlisted

Analyzes a prompt or conversation structure and identifies the highest-value cache breakpoints — where to insert cache_control checkpoints to minimize repeated token processing. Use when designing or optimizing a Claude API integration that uses prompt caching, when input costs are dominated by a static system prompt or few-shot block, or when a multi-turn conversation reprocesses the same context on every turn.
sananthanarayan/skilldrop · ★ 2 · AI & Automation · score 65
Install: claude install-skill sananthanarayan/skilldrop
# prompt-caching-advisor Identifies where to place `cache_control` checkpoints in a Claude API prompt or conversation structure to minimize repeated token processing. The savings are real — a cache hit on a 10,000-token system prompt costs ~90% less than re-processing it — but the placement matters. Wrong breakpoints waste the minimum cacheable block size or cache dynamic content that never hits. ## How to respond ### Step 1 — Understand the structure Ask the user to share (or describe) their prompt structure. You need: - The system prompt (or a description of what's in it and roughly how long) - Any few-shot examples passed in messages - The shape of the variable user turn (what changes per request) - Whether this is single-turn or multi-turn If they share code, read the messages array. The cache breakpoint goes at the end of the block you want cached — a `cache_control: {"type": "ephemeral"}` on the **last content block** of a message causes everything up to and including that block to be cached. ### Step 2 — Classify each block For each distinct block, classify it: | Class | Characteristics | Cache? | |---|---|---| | **Static** | Same on every request (system instructions, reference docs, few-shot examples) | Yes — put breakpoint at the end | | **Quasi-static** | Same for a session or user, different across users (user profile, project context) | Yes, with session-scope awareness | | **Dynamic** | Changes every request (current user message, real-time data, timesta