{"id":"80ac73c1-20d0-40a2-9e0f-a00354b13546","shortId":"2h5WBs","kind":"skill","title":"prompt-caching","tagline":"Caching strategies for LLM prompts including Anthropic prompt","description":"# Prompt Caching\n\nCaching strategies for LLM prompts including Anthropic prompt caching, response caching, and CAG (Cache Augmented Generation)\n\n## Capabilities\n\n- prompt-cache\n- response-cache\n- kv-cache\n- cag-patterns\n- cache-invalidation\n\n## Prerequisites\n\n- Knowledge: Caching fundamentals, LLM API usage, Hash functions\n- Skills_recommended: context-window-management\n\n## Scope\n\n- Does_not_cover: CDN caching, Database query caching, Static asset caching\n- Boundaries: Focus is LLM-specific caching, Covers prompt and response caching\n\n## Ecosystem\n\n### Primary_tools\n\n- Anthropic Prompt Caching - Native prompt caching in Claude API\n- Redis - In-memory cache for responses\n- OpenAI Caching - Automatic caching in OpenAI API\n\n## Patterns\n\n### Anthropic Prompt Caching\n\nUse Claude's native prompt caching for repeated prefixes\n\n**When to use**: Using Claude API with stable system prompts or context\n\nimport Anthropic from '@anthropic-ai/sdk';\n\nconst client = new Anthropic();\n\n// Cache the stable parts of your prompt\nasync function queryWithCaching(userQuery: string) {\n    const response = await client.messages.create({\n        model: \"claude-sonnet-4-20250514\",\n        max_tokens: 1024,\n        system: [\n            {\n                type: \"text\",\n                text: LONG_SYSTEM_PROMPT,  // Your detailed instructions\n                cache_control: { type: \"ephemeral\" }  // Cache this!\n            },\n            {\n                type: \"text\",\n                text: KNOWLEDGE_BASE,  // Large static context\n                cache_control: { type: \"ephemeral\" }\n            }\n        ],\n        messages: [\n            { role: \"user\", content: userQuery }  // Dynamic part\n        ]\n    });\n\n    // Check cache usage\n    console.log(`Cache read: ${response.usage.cache_read_input_tokens}`);\n    console.log(`Cache write: ${response.usage.cache_creation_input_tokens}`);\n\n    return response;\n}\n\n// Cost savings: 90% reduction on cached tokens\n// Latency savings: Up to 2x faster\n\n### Response Caching\n\nCache full LLM responses for identical or similar queries\n\n**When to use**: Same queries asked repeatedly\n\nimport { createHash } from 'crypto';\nimport Redis from 'ioredis';\n\nconst redis = new Redis(process.env.REDIS_URL);\n\nclass ResponseCache {\n    private ttl = 3600;  // 1 hour default\n\n    // Exact match caching\n    async getCached(prompt: string): Promise<string | null> {\n        const key = this.hashPrompt(prompt);\n        return await redis.get(`response:${key}`);\n    }\n\n    async setCached(prompt: string, response: string): Promise<void> {\n        const key = this.hashPrompt(prompt);\n        await redis.set(`response:${key}`, response, 'EX', this.ttl);\n    }\n\n    private hashPrompt(prompt: string): string {\n        return createHash('sha256').update(prompt).digest('hex');\n    }\n\n    // Semantic similarity caching\n    async getSemanticallySimilar(\n        prompt: string,\n        threshold: number = 0.95\n    ): Promise<string | null> {\n        const embedding = await embed(prompt);\n        const similar = await this.vectorCache.search(embedding, 1);\n\n        if (similar.length && similar[0].similarity > threshold) {\n            return await redis.get(`response:${similar[0].id}`);\n        }\n        return null;\n    }\n\n    // Temperature-aware caching\n    async getCachedWithParams(\n        prompt: string,\n        params: { temperature: number; model: string }\n    ): Promise<string | null> {\n        // Only cache low-temperature responses\n        if (params.temperature > 0.5) return null;\n\n        const key = this.hashPrompt(\n            `${prompt}|${params.model}|${params.temperature}`\n        );\n        return await redis.get(`response:${key}`);\n    }\n}\n\n### Cache Augmented Generation (CAG)\n\nPre-cache documents in prompt instead of RAG retrieval\n\n**When to use**: Document corpus is stable and fits in context\n\n// CAG: Pre-compute document context, cache in prompt\n// Better than RAG when:\n// - Documents are stable\n// - Total fits in context window\n// - Latency is critical\n\nclass CAGSystem {\n    private cachedContext: string | null = null;\n    private lastUpdate: number = 0;\n\n    async buildCachedContext(documents: Document[]): Promise<void> {\n        // Pre-process and format documents\n        const formatted = documents.map(d =>\n            `## ${d.title}\\n${d.content}`\n        ).join('\\n\\n');\n\n        // Store with timestamp\n        this.cachedContext = formatted;\n        this.lastUpdate = Date.now();\n    }\n\n    async query(userQuery: string): Promise<string> {\n        // Use cached context directly in prompt\n        const response = await client.messages.create({\n            model: \"claude-sonnet-4-20250514\",\n            max_tokens: 1024,\n            system: [\n                {\n                    type: \"text\",\n                    text: \"You are a helpful assistant with access to the following documentation.\",\n                    cache_control: { type: \"ephemeral\" }\n                },\n                {\n                    type: \"text\",\n                    text: this.cachedContext!,  // Pre-cached docs\n                    cache_control: { type: \"ephemeral\" }\n                }\n            ],\n            messages: [{ role: \"user\", content: userQuery }]\n        });\n\n        return response.content[0].text;\n    }\n\n    // Periodic refresh\n    async refreshIfNeeded(documents: Document[]): Promise<void> {\n        const stale = Date.now() - this.lastUpdate > 3600000;  // 1 hour\n        if (stale) {\n            await this.buildCachedContext(documents);\n        }\n    }\n}\n\n// CAG vs RAG decision matrix:\n// | Factor           | CAG Better | RAG Better |\n// |------------------|------------|------------|\n// | Corpus size      | < 100K tokens | > 100K tokens |\n// | Update frequency | Low | High |\n// | Latency needs    | Critical | Flexible |\n// | Query specificity| General | Specific |\n\n## Sharp Edges\n\n### Cache miss causes latency spike with additional overhead\n\nSeverity: HIGH\n\nSituation: Slow response when cache miss, slower than no caching\n\nSymptoms:\n- Slow responses on cache miss\n- Cache hit rate below 50%\n- Higher latency than uncached\n\nWhy this breaks:\nCache check adds latency.\nCache write adds more latency.\nMiss + overhead > no caching.\n\nRecommended fix:\n\n// Optimize for cache misses, not just hits\n\nclass OptimizedCache {\n    async queryWithCache(prompt: string): Promise<string> {\n        const cacheKey = this.hash(prompt);\n\n        // Non-blocking cache check\n        const cachedPromise = this.cache.get(cacheKey);\n        const llmPromise = this.queryLLM(prompt);\n\n        // Race: use cache if available before LLM returns\n        const cached = await Promise.race([\n            cachedPromise,\n            sleep(50).then(() => null)  // 50ms cache timeout\n        ]);\n\n        if (cached) {\n            // Cancel LLM request if possible\n            return cached;\n        }\n\n        // Cache miss: continue with LLM\n        const response = await llmPromise;\n\n        // Async cache write (don't block response)\n        this.cache.set(cacheKey, response).catch(console.error);\n\n        return response;\n    }\n}\n\n// Alternative: Probabilistic caching\n// Only cache if query matches known high-frequency patterns\nclass SelectiveCache {\n    private patterns: Map<string, number> = new Map();\n\n    shouldCache(prompt: string): boolean {\n        const pattern = this.extractPattern(prompt);\n        const frequency = this.patterns.get(pattern) || 0;\n\n        // Only cache high-frequency patterns\n        return frequency > 10;\n    }\n\n    recordQuery(prompt: string): void {\n        const pattern = this.extractPattern(prompt);\n        this.patterns.set(pattern, (this.patterns.get(pattern) || 0) + 1);\n    }\n}\n\n### Cached responses become incorrect over time\n\nSeverity: HIGH\n\nSituation: Users get outdated or wrong information from cache\n\nSymptoms:\n- Users report wrong information\n- Answers don't match current data\n- Complaints about outdated responses\n\nWhy this breaks:\nSource data changed.\nNo cache invalidation.\nLong TTLs for dynamic data.\n\nRecommended fix:\n\n// Implement proper cache invalidation\n\nclass InvalidatingCache {\n    // Version-based invalidation\n    private cacheVersion = 1;\n\n    getCacheKey(prompt: string): string {\n        return `v${this.cacheVersion}:${this.hash(prompt)}`;\n    }\n\n    invalidateAll(): void {\n        this.cacheVersion++;\n        // Old keys automatically become orphaned\n    }\n\n    // Content-hash invalidation\n    async setWithContentHash(\n        key: string,\n        response: string,\n        sourceContent: string\n    ): Promise<void> {\n        const contentHash = this.hash(sourceContent);\n        await this.cache.set(key, {\n            response,\n            contentHash,\n            timestamp: Date.now()\n        });\n    }\n\n    async getIfValid(\n        key: string,\n        currentSourceContent: string\n    ): Promise<string | null> {\n        const cached = await this.cache.get(key);\n        if (!cached) return null;\n\n        // Check if source content changed\n        const currentHash = this.hash(currentSourceContent);\n        if (cached.contentHash !== currentHash) {\n            await this.cache.delete(key);\n            return null;\n        }\n\n        return cached.response;\n    }\n\n    // Event-based invalidation\n    onSourceUpdate(sourceId: string): void {\n        // Invalidate all caches that used this source\n        this.invalidateByTag(`source:${sourceId}`);\n    }\n}\n\n### Prompt caching doesn't work due to prefix changes\n\nSeverity: MEDIUM\n\nSituation: Cache misses despite similar prompts\n\nSymptoms:\n- Cache hit rate lower than expected\n- Cache creation tokens high, read low\n- Similar prompts not hitting cache\n\nWhy this breaks:\nAnthropic caching requires exact prefix match.\nTimestamps or dynamic content in prefix.\nDifferent message order.\n\nRecommended fix:\n\n// Structure prompts for optimal caching\n\nclass CacheOptimizedPrompts {\n    // WRONG: Dynamic content in cached prefix\n    buildPromptBad(query: string): SystemMessage[] {\n        return [\n            {\n                type: \"text\",\n                text: `You are helpful. Current time: ${new Date()}`,  // BREAKS CACHE!\n                cache_control: { type: \"ephemeral\" }\n            }\n        ];\n    }\n\n    // RIGHT: Static prefix, dynamic at end\n    buildPromptGood(query: string): SystemMessage[] {\n        return [\n            {\n                type: \"text\",\n                text: STATIC_SYSTEM_PROMPT,  // Never changes\n                cache_control: { type: \"ephemeral\" }\n            },\n            {\n                type: \"text\",\n                text: STATIC_KNOWLEDGE_BASE,  // Rarely changes\n                cache_control: { type: \"ephemeral\" }\n            }\n            // Dynamic content goes in messages, NOT system\n        ];\n    }\n\n    // Prefix ordering matters\n    buildWithConsistentOrder(components: string[]): SystemMessage[] {\n        // Sort components for consistent ordering\n        const sorted = [...components].sort();\n        return sorted.map((c, i) => ({\n            type: \"text\",\n            text: c,\n            cache_control: i === sorted.length - 1\n                ? { type: \"ephemeral\" }\n                : undefined  // Only cache the full prefix\n        }));\n    }\n}\n\n## Validation Checks\n\n### Caching High Temperature Responses\n\nSeverity: WARNING\n\nMessage: Caching with high temperature. Responses are non-deterministic.\n\nFix action: Only cache responses with temperature <= 0.5\n\n### Cache Without TTL\n\nSeverity: WARNING\n\nMessage: Cache without TTL. May serve stale data indefinitely.\n\nFix action: Set appropriate TTL based on data freshness requirements\n\n### Dynamic Content in Cached Prefix\n\nSeverity: WARNING\n\nMessage: Dynamic content in cached prefix. Will cause cache misses.\n\nFix action: Move dynamic content outside of cache_control blocks\n\n### No Cache Metrics\n\nSeverity: INFO\n\nMessage: Cache without hit/miss tracking. Can't measure effectiveness.\n\nFix action: Add cache hit/miss metrics and logging\n\n## Collaboration\n\n### Delegation Triggers\n\n- context window|token -> context-window-management (Need context optimization)\n- rag|retrieval -> rag-implementation (Need retrieval system)\n- memory -> conversation-memory (Need memory persistence)\n\n### High-Performance LLM System\n\nSkills: prompt-caching, context-window-management, rag-implementation\n\nWorkflow:\n\n```\n1. Analyze query patterns\n2. Implement prompt caching for stable prefixes\n3. Add response caching for frequent queries\n4. Consider CAG for stable document sets\n5. Monitor and optimize hit rates\n```\n\n## Related Skills\n\nWorks well with: `context-window-management`, `rag-implementation`, `conversation-memory`\n\n## When to Use\n- User mentions or implies: prompt caching\n- User mentions or implies: cache prompt\n- User mentions or implies: response cache\n- User mentions or implies: cag\n- User mentions or implies: cache augmented\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["prompt","caching","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows"],"capabilities":["skill","source-sickn33","skill-prompt-caching","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/prompt-caching","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34616 github stars · SKILL.md body (13,176 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-23T00:51:26.217Z","embedding":null,"createdAt":"2026-04-18T21:42:55.615Z","updatedAt":"2026-04-23T00:51:26.217Z","lastSeenAt":"2026-04-23T00:51:26.217Z","tsv":"'-20250514':168,513 '/sdk':142 '0':355,363,464,555,776,798 '0.5':391,1150 '0.95':337 '1':276,351,569,799,860,1116,1269 '10':785 '100k':588,590 '1024':171,516 '2':1273 '2x':237 '3':1280 '3600':275 '3600000':568 '4':167,512,1287 '5':1294 '50':636,704 '50ms':707 '90':228 'access':527 'action':1144,1166,1193,1217 'add':646,650,1218,1281 'addit':612 'ai':141 'altern':742 'analyz':1270 'answer':822 'anthrop':10,20,88,112,137,140,146,995 'anthropic-ai':139 'api':51,96,110,129 'appropri':1168 'ask':255,1380 'asset':71 'assist':525 'async':154,282,298,331,371,465,493,559,668,728,882,902 'augment':28,406,1346 'automat':106,875 'avail':694 'await':161,294,309,343,348,359,401,506,573,700,726,895,913,932 'awar':369 'base':192,856,941,1074,1170 'becom':802,876 'better':439,583,585 'block':679,733,1201 'boolean':767 'boundari':73,1388 'break':643,834,994,1040 'buildcachedcontext':466 'buildpromptbad':1025 'buildpromptgood':1052 'buildwithconsistentord':1091 'c':1106,1111 'cach':3,4,13,14,22,24,27,33,36,39,44,48,66,69,72,79,84,90,93,101,105,107,114,120,147,182,186,196,208,211,218,231,240,241,281,330,370,384,405,411,436,499,532,542,544,606,620,625,630,632,644,648,656,661,680,692,699,708,711,718,719,729,744,746,778,800,816,839,850,912,917,949,958,969,975,981,991,996,1016,1023,1041,1042,1065,1077,1112,1121,1127,1134,1146,1151,1157,1178,1186,1190,1199,1203,1208,1219,1260,1276,1283,1323,1328,1335,1345 'cache-invalid':43 'cached.contenthash':930 'cached.response':938 'cachedcontext':457 'cachedpromis':683,702 'cachekey':674,685,736 'cacheoptimizedprompt':1018 'cachevers':859 'cag':26,41,408,430,576,582,1289,1340 'cag-pattern':40 'cagsystem':455 'cancel':712 'capabl':30 'catch':738 'caus':608,1189 'cdn':65 'chang':837,924,965,1064,1076 'check':207,645,681,920,1126 'clarif':1382 'class':271,454,666,755,852,1017 'claud':95,116,128,165,510 'claude-sonnet':164,509 'clear':1355 'client':144 'client.messages.create':162,507 'collabor':1224 'complaint':828 'compon':1092,1096,1102 'comput':433 'consid':1288 'consist':1098 'console.error':739 'console.log':210,217 'const':143,159,265,289,305,341,346,394,476,504,564,673,682,686,698,724,768,772,790,891,911,925,1100 'content':203,551,879,923,1004,1021,1082,1176,1184,1196 'content-hash':878 'contenthash':892,899 'context':58,135,195,429,435,449,500,1227,1231,1235,1262,1306 'context-window-manag':57,1230,1261,1305 'continu':721 'control':183,197,533,545,1043,1066,1078,1113,1200 'convers':1247,1313 'conversation-memori':1246,1312 'corpus':423,586 'cost':226 'cover':64,80 'createhash':258,322 'creation':221,982 'criteria':1391 'critic':453,598 'crypto':260 'current':826,1036 'currenthash':926,931 'currentsourcecont':906,928 'd':479 'd.content':482 'd.title':480 'data':827,836,845,1163,1172 'databas':67 'date':1039 'date.now':492,566,901 'decis':579 'default':278 'deleg':1225 'describ':1359 'despit':971 'detail':180 'determinist':1142 'differ':1007 'digest':326 'direct':501 'doc':543 'document':412,422,434,443,467,468,475,531,561,562,575,1292 'documents.map':478 'doesn':959 'due':962 'dynam':205,844,1003,1020,1049,1081,1175,1183,1195 'ecosystem':85 'edg':605 'effect':1215 'emb':344 'embed':342,350 'end':1051 'environ':1371 'environment-specif':1370 'ephemer':185,199,535,547,1045,1068,1080,1118 'event':940 'event-bas':939 'ex':314 'exact':279,998 'expect':980 'expert':1376 'factor':581 'faster':238 'fit':427,447 'fix':658,847,1011,1143,1165,1192,1216 'flexibl':599 'focus':74 'follow':530 'format':474,477,490 'frequenc':593,753,773,781,784 'frequent':1285 'fresh':1173 'full':242,1123 'function':54,155 'fundament':49 'general':602 'generat':29,407 'get':810 'getcach':283 'getcachedwithparam':372 'getcachekey':861 'getifvalid':903 'getsemanticallysimilar':332 'goe':1083 'hash':53,880 'hashprompt':317 'help':524,1035 'hex':327 'high':595,615,752,780,807,984,1128,1136,1253 'high-frequ':751,779 'high-perform':1252 'higher':637 'hit':633,665,976,990,1298 'hit/miss':1210,1220 'hour':277,570 'id':364 'ident':246 'implement':848,1241,1267,1274,1311 'impli':1321,1327,1333,1339,1344 'import':136,257,261 'in-memori':98 'includ':9,19 'incorrect':803 'indefinit':1164 'info':1206 'inform':814,821 'input':215,222,1385 'instead':415 'instruct':181 'invalid':45,840,851,857,881,942,947 'invalidateal':870 'invalidatingcach':853 'ioredi':264 'join':483 'key':290,297,306,312,395,404,874,884,897,904,915,934 'knowledg':47,191,1073 'known':750 'kv':38 'kv-cach':37 'larg':193 'lastupd':462 'latenc':233,451,596,609,638,647,652 'limit':1347 'llm':7,17,50,77,243,696,713,723,1255 'llm-specif':76 'llmpromis':687,727 'log':1223 'long':176,841 'low':386,594,986 'low-temperatur':385 'lower':978 'manag':60,1233,1264,1308 'map':759,763 'match':280,749,825,1000,1356 'matrix':580 'matter':1090 'max':169,514 'may':1160 'measur':1214 'medium':967 'memori':100,1245,1248,1250,1314 'mention':1319,1325,1331,1337,1342 'messag':200,548,1008,1085,1133,1156,1182,1207 'metric':1204,1221 'miss':607,621,631,653,662,720,970,1191,1393 'model':163,378,508 'monitor':1295 'move':1194 'n':481,484,485 'nativ':91,118 'need':597,1234,1242,1249 'never':1063 'new':145,267,762,1038 'non':678,1141 'non-block':677 'non-determinist':1140 'null':288,340,366,382,393,459,460,706,910,919,936 'number':336,377,463,761 'old':873 'onsourceupd':943 'openai':104,109 'optim':659,1015,1236,1297 'optimizedcach':667 'order':1009,1089,1099 'orphan':877 'outdat':811,830 'output':1365 'outsid':1197 'overhead':613,654 'param':375 'params.model':398 'params.temperature':390,399 'part':150,206 'pattern':42,111,754,758,769,775,782,791,795,797,1272 'perform':1254 'period':557 'permiss':1386 'persist':1251 'possibl':716 'pre':410,432,471,541 'pre-cach':409,540 'pre-comput':431 'pre-process':470 'prefix':123,964,999,1006,1024,1048,1088,1124,1179,1187,1279 'prerequisit':46 'primari':86 'privat':273,316,456,461,757,858 'probabilist':743 'process':472 'process.env.redis':269 'promis':286,304,338,380,469,497,563,672,890,908 'promise.race':701 'prompt':2,8,11,12,18,21,32,81,89,92,113,119,133,153,178,284,292,300,308,318,325,333,345,373,397,414,438,503,670,676,689,765,771,787,793,862,869,957,973,988,1013,1062,1259,1275,1322,1329 'prompt-cach':1,31,1258 'proper':849 'queri':68,249,254,494,600,748,1026,1053,1271,1286 'querywithcach':156,669 'race':690 'rag':417,441,578,584,1237,1240,1266,1310 'rag-implement':1239,1265,1309 'rare':1075 'rate':634,977,1299 'read':212,214,985 'recommend':56,657,846,1010 'recordqueri':786 'redi':97,262,266,268 'redis.get':295,360,402 'redis.set':310 'reduct':229 'refresh':558 'refreshifneed':560 'relat':1300 'repeat':122,256 'report':819 'request':714 'requir':997,1174,1384 'respons':23,35,83,103,160,225,239,244,296,302,311,313,361,388,403,505,618,628,725,734,737,741,801,831,886,898,1130,1138,1147,1282,1334 'response-cach':34 'response.content':554 'response.usage.cache':213,220 'responsecach':272 'retriev':418,1238,1243 'return':224,293,321,358,365,392,400,553,697,717,740,783,865,918,935,937,1029,1056,1104 'review':1377 'right':1046 'role':201,549 'safeti':1387 'save':227,234 'scope':61,1358 'selectivecach':756 'semant':328 'serv':1161 'set':1167,1293 'setcach':299 'setwithcontenthash':883 'sever':614,806,966,1131,1154,1180,1205 'sha256':323 'sharp':604 'shouldcach':764 'similar':248,329,347,354,356,362,972,987 'similar.length':353 'situat':616,808,968 'size':587 'skill':55,1257,1301,1350 'skill-prompt-caching' 'sleep':703 'slow':617,627 'slower':622 'sonnet':166,511 'sort':1095,1101,1103 'sorted.length':1115 'sorted.map':1105 'sourc':835,922,953,955 'source-sickn33' 'sourcecont':888,894 'sourceid':944,956 'specif':78,601,603,1372 'spike':610 'stabl':131,149,425,445,1278,1291 'stale':565,572,1162 'static':70,194,1047,1060,1072 'stop':1378 'store':486 'strategi':5,15 'string':158,285,287,301,303,319,320,334,339,374,379,381,458,496,671,760,766,788,863,864,885,887,889,905,907,909,945,1027,1054,1093 'structur':1012 'substitut':1368 'success':1390 'symptom':626,817,974 'system':132,172,177,517,1061,1087,1244,1256 'systemmessag':1028,1055,1094 'task':1354 'temperatur':368,376,387,1129,1137,1149 'temperature-awar':367 'test':1374 'text':174,175,189,190,519,520,537,538,556,1031,1032,1058,1059,1070,1071,1109,1110 'this.buildcachedcontext':574 'this.cache.delete':933 'this.cache.get':684,914 'this.cache.set':735,896 'this.cachedcontext':489,539 'this.cacheversion':867,872 'this.extractpattern':770,792 'this.hash':675,868,893,927 'this.hashprompt':291,307,396 'this.invalidatebytag':954 'this.lastupdate':491,567 'this.patterns.get':774,796 'this.patterns.set':794 'this.queryllm':688 'this.ttl':315 'this.vectorcache.search':349 'threshold':335,357 'time':805,1037 'timeout':709 'timestamp':488,900,1001 'token':170,216,223,232,515,589,591,983,1229 'tool':87 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'total':446 'track':1211 'treat':1363 'trigger':1226 'ttl':274,1153,1159,1169 'ttls':842 'type':173,184,188,198,518,534,536,546,1030,1044,1057,1067,1069,1079,1108,1117 'uncach':640 'undefin':1119 'updat':324,592 'url':270 'usag':52,209 'use':115,126,127,252,421,498,691,951,1317,1348 'user':202,550,809,818,1318,1324,1330,1336,1341 'userqueri':157,204,495,552 'v':866 'valid':1125,1373 'version':855 'version-bas':854 'void':789,871,946 'vs':577 'warn':1132,1155,1181 'well':1303 'window':59,450,1228,1232,1263,1307 'without':1152,1158,1209 'work':961,1302 'workflow':1268 'write':219,649,730 'wrong':813,820,1019","prices":[{"id":"a6b3d885-0cd9-4a30-a75a-2b7165377c7e","listingId":"80ac73c1-20d0-40a2-9e0f-a00354b13546","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:42:55.615Z"}],"sources":[{"listingId":"80ac73c1-20d0-40a2-9e0f-a00354b13546","source":"github","sourceId":"sickn33/antigravity-awesome-skills/prompt-caching","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/prompt-caching","isPrimary":false,"firstSeenAt":"2026-04-18T21:42:55.615Z","lastSeenAt":"2026-04-23T00:51:26.217Z"}],"details":{"listingId":"80ac73c1-20d0-40a2-9e0f-a00354b13546","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"prompt-caching","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34616,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-22T06:40:00Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"0bed5bcc9131d35ec0ee53315b4354fc8a3f35f7","skill_md_path":"skills/prompt-caching/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/prompt-caching"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"prompt-caching","description":"Caching strategies for LLM prompts including Anthropic prompt"},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/prompt-caching"},"updatedAt":"2026-04-23T00:51:26.217Z"}}