{"id":"2ef749f5-3478-48a2-9a33-205216c396bd","shortId":"vqTfeG","kind":"skill","title":"time-gap-cache-expiry-microcompact","tagline":"When a long idle gap means the server cache is cold, clear old tool-result content before the next request instead of attempting warm-cache cache edits.","description":"# SKILL: Time-Gap Cache-Expiry Microcompact\n**Domain:** compaction\n**Trigger:** Apply when a long gap since the last assistant response implies the prompt cache has expired and cache-editing no longer makes sense.\n**Source Pattern:** Distilled from reviewed session memory, compaction, and context-budgeting implementations.\n\n## Core Method\nDetect when the cache is effectively cold by comparing the idle gap against a time-based microcompact threshold. If the gap is too large, skip cache-editing entirely and proactively clear old tool-result content before the next request, because the full prefix will be rewritten anyway. Reset any cached microcompact state and suppress false-positive cache-break warnings so the cold-cache rewrite is treated as an intentional maintenance step.\n\n## Key Rules\n- Evaluate the idle gap only for explicit main-thread requests; analysis-only calls without a real query source should not trigger time-based compaction.\n- Short-circuit before cache-editing when the gap exceeds the configured threshold, because cache edits assume a warm server cache.\n- Reset shared cached-microcompact state after the content clear so stale registered tool IDs do not leak into later turns.\n- Notify cache-break detection that the upcoming drop in cache reads is expected, not a genuine regression.\n- Suppress compact warnings on successful time-gap cleanup so users do not get duplicate noise for the intentional clear.\n\n## Example Application\nIf a user leaves a conversation idle for long enough that the server prompt cache is gone, clear old read/shell tool results before the next turn rather than trying to attach cache-edit instructions. The next request pays one clean rewrite cost and starts from a consistent compacted state.\n\n## Anti-Patterns (What NOT to do)\n- Do not attempt cache edits after a long idle gap; those edits assume cached server state that no longer exists.\n- Do not leave cached microcompact state intact after a time-gap clear; stale tool registrations will poison the next edit cycle.","tags":["time","gap","cache","expiry","microcompact","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents"],"capabilities":["skill","source-ychampion","skill-time-gap-cache-expiry-microcompact","topic-agent-skills","topic-ai-agents","topic-cli","topic-coding-agents","topic-context-engineering","topic-developer-tools","topic-mcp","topic-multi-agent","topic-terminal-ui"],"categories":["cskill-agents"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/ychampion/cskill-agents/time-gap-cache-expiry-microcompact","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add ychampion/cskill-agents","source_repo":"https://github.com/ychampion/cskill-agents","install_from":"skills.sh"}},"qualityScore":"0.467","qualityRationale":"deterministic score 0.47 from registry signals: · indexed on github topic:agent-skills · 34 github stars · SKILL.md body (2,033 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-22T00:56:57.711Z","embedding":null,"createdAt":"2026-04-18T22:21:30.060Z","updatedAt":"2026-04-22T00:56:57.711Z","lastSeenAt":"2026-04-22T00:56:57.711Z","tsv":"'analysi':177 'analysis-on':176 'anti':326 'anti-pattern':325 'anyway':135 'appli':47 'applic':274 'assist':55 'assum':209,344 'attach':305 'attempt':30,334 'base':102,190 'break':148,238 'budget':82 'cach':4,15,33,34,41,60,65,89,113,138,147,154,197,207,213,217,237,245,289,307,335,345,355 'cache-break':146,236 'cache-edit':64,112,196,306 'cache-expiri':40 'cached-microcompact':216 'call':179 'circuit':194 'clean':315 'cleanup':261 'clear':18,118,223,272,292,364 'cold':17,92,153 'cold-cach':152 'compact':45,78,191,254,323 'compar':94 'configur':204 'consist':322 'content':23,123,222 'context':81 'context-budget':80 'convers':280 'core':84 'cost':317 'cycl':373 'detect':86,239 'distil':73 'domain':44 'drop':243 'duplic':267 'edit':35,66,114,198,208,308,336,343,372 'effect':91 'enough':284 'entir':115 'evalu':165 'exampl':273 'exceed':202 'exist':351 'expect':248 'expir':62 'expiri':5,42 'explicit':171 'fals':144 'false-posit':143 'full':130 'gap':3,11,39,51,97,107,168,201,260,341,363 'genuin':251 'get':266 'gone':291 'id':228 'idl':10,96,167,281,340 'implement':83 'impli':57 'instead':28 'instruct':309 'intact':358 'intent':160,271 'key':163 'larg':110 'last':54 'later':233 'leak':231 'leav':278,354 'long':9,50,283,339 'longer':68,350 'main':173 'main-thread':172 'mainten':161 'make':69 'mean':12 'memori':77 'method':85 'microcompact':6,43,103,139,218,356 'next':26,126,299,311,371 'nois':268 'notifi':235 'old':19,119,293 'one':314 'pattern':72,327 'pay':313 'poison':369 'posit':145 'prefix':131 'proactiv':117 'prompt':59,288 'queri':183 'rather':301 'read':246 'read/shell':294 'real':182 'regist':226 'registr':367 'regress':252 'request':27,127,175,312 'reset':136,214 'respons':56 'result':22,122,296 'review':75 'rewrit':155,316 'rewritten':134 'rule':164 'sens':70 'server':14,212,287,346 'session':76 'share':215 'short':193 'short-circuit':192 'sinc':52 'skill':36 'skill-time-gap-cache-expiry-microcompact' 'skip':111 'sourc':71,184 'source-ychampion' 'stale':225,365 'start':319 'state':140,219,324,347,357 'step':162 'success':257 'suppress':142,253 'thread':174 'threshold':104,205 'time':2,38,101,189,259,362 'time-bas':100,188 'time-gap':37,258,361 'time-gap-cache-expiry-microcompact':1 'tool':21,121,227,295,366 'tool-result':20,120 'topic-agent-skills' 'topic-ai-agents' 'topic-cli' 'topic-coding-agents' 'topic-context-engineering' 'topic-developer-tools' 'topic-mcp' 'topic-multi-agent' 'topic-terminal-ui' 'treat':157 'tri':303 'trigger':46,187 'turn':234,300 'upcom':242 'user':263,277 'warm':32,211 'warm-cach':31 'warn':149,255 'without':180","prices":[{"id":"c19c0118-b49d-4504-b92a-021d9ca3f787","listingId":"2ef749f5-3478-48a2-9a33-205216c396bd","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"ychampion","category":"cskill-agents","install_from":"skills.sh"},"createdAt":"2026-04-18T22:21:30.060Z"}],"sources":[{"listingId":"2ef749f5-3478-48a2-9a33-205216c396bd","source":"github","sourceId":"ychampion/cskill-agents/time-gap-cache-expiry-microcompact","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/time-gap-cache-expiry-microcompact","isPrimary":false,"firstSeenAt":"2026-04-18T22:21:30.060Z","lastSeenAt":"2026-04-22T00:56:57.711Z"}],"details":{"listingId":"2ef749f5-3478-48a2-9a33-205216c396bd","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"time-gap-cache-expiry-microcompact","github":{"repo":"ychampion/cskill-agents","stars":34,"topics":["agent-skills","ai-agents","cli","coding-agents","context-engineering","developer-tools","mcp","multi-agent","terminal-ui"],"license":"mit","html_url":"https://github.com/ychampion/cskill-agents","pushed_at":"2026-04-04T14:13:23Z","description":"Agent skills for coding CLIs, multi-agent runtimes, context engines, MCP extensions, and terminal tooling. Instead of using claude code's source code, give your agent skills to create your own!","skill_md_sha":"333dbd43a58c67b4d5d60807ecea349de92e1e27","skill_md_path":"skills/time-gap-cache-expiry-microcompact/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/time-gap-cache-expiry-microcompact"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"time-gap-cache-expiry-microcompact","description":"When a long idle gap means the server cache is cold, clear old tool-result content before the next request instead of attempting warm-cache cache edits."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/time-gap-cache-expiry-microcompact"},"updatedAt":"2026-04-22T00:56:57.711Z"}}