Prompt Cache Optimizer

Restructure an LLM call to maximize prompt-cache hit rate and add response/semantic caching — move the stable prefix (system prompt, instructions, few-shot, context) to the front and variable input to the end, set cache breakpoints, and measure the hit rate and savings. Use when repeated calls share large common context and token cost or latency is too high.

imtiazrayhan 1c6edba 4.0 KB Updated

File contents

imtiazrayhan/agentscamp-library/tree/main/skills/prompt-cache-optimizer commit 1c6edba592

Frequently asked questions

npx skillmds@latest add imtiazrayhan/prompt-cache-optimizer