From loopkit
Caches stable prompt prefixes (system prompt, tool defs, reference docs) across long-running loops to reduce input costs by ~90% on cached reads.
How this skill is triggered — by the user, by Claude, or both
Slash command
/loopkit:prompt-cachingWhen to use
long session, repeated large context, cost climbing, system prompt >1024 tokens, unchanged tool definitions across turns
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Every turn of a Plan→Act→Verify loop resends the same system prompt, the same tool definitions, and (usually) the same reference docs. Without cache breakpoints you pay full input price on all of it, every turn. With them, cached reads cost ~10% of the write.
Every turn of a Plan→Act→Verify loop resends the same system prompt, the same tool definitions, and (usually) the same reference docs. Without cache breakpoints you pay full input price on all of it, every turn. With them, cached reads cost ~10% of the write.
Cache from the top of the prompt down. The cache is prefix-matched — a break in the middle invalidates everything after it.
Everything past the last breakpoint is billed fresh every turn. That's fine — that's where the changing content goes.
Pick 5m unless you know turns are minutes apart.
If cost isn't dropping, log the cache-hit metric. Do not assume.
Cache write ≈ 1.25× normal input. Cache read ≈ 0.1× normal input. So a stable 20K-token prefix hit N times: N=1 costs more than no-cache; N=2 breaks even; N=10 costs ~15% of no-cache. Long loops win big; short chats lose.
Cache is the single biggest cost lever on a long-running agent. Set it once at the start of the loop, verify hits, forget it.
npx claudepluginhub archive228/loopkit --plugin loopkitPreserves prompt-prefix stability to maximize KV cache hits, reducing cost and latency in long LLM sessions. Use when structuring system prompts, memory files, or tool definitions.
Implements caching strategies for LLM prompts: Anthropic prompt caching, response caching, and CAG (Cache Augmented Generation). Reduces LLM costs through strategic caching.
Provides caching strategies for LLM prompts including Anthropic prompt caching, response caching, and Cache Augmented Generation (CAG).