{"id":"8dd01b25-9bd1-49f9-9831-a41eaa63b44a","shortId":"8kDEBf","kind":"skill","title":"cache-sweep-activation-fallback","tagline":"Sweep stale extension caches before activation, then fall back to a sticky manual-refresh flag if the live refresh fails.","description":"# SKILL: Cache Sweep Activation Fallback\n**Domain:** extensions-mcp  \n**Trigger:** Apply when newly materialized extension sources must be activated immediately, but the live refresh can fail and needs a recoverable fallback.\n**Source Pattern:** Distilled from reviewed extension lifecycle and source-reconciliation patterns.\n\n## Core Method\nTreat installation and activation as separate phases. After a background reconcile changes what is on disk, clear the marketplace cache, attempt a full activation refresh, and degrade gracefully if that refresh throws. The fallback path should clear plugin caches again, log the failure, and set a sticky manual-refresh bit so the system admits that runtime state is stale instead of pretending activation succeeded.\n\n## Key Rules\n- Only attempt automatic activation after a materialized change that needs live components to catch up; steady-state or metadata-only work should not enter this path.\n- Clear upstream caches before activation so the refresh reads fresh marketplace and plugin state rather than replaying stale memoized data.\n- Wrap the activation step in a catch boundary that logs the error and preserves the newly materialized state on disk.\n- If activation fails, clear the plugin cache with a specific reason string and raise an idempotent manual-refresh flag instead of retrying blindly.\n- Keep the fallback sticky until a deliberate refresh consumes it; repeated failures should not thrash the state tree with duplicate writes.\n\n## Example Application\nIf a background extension installer clones a new command marketplace during startup, clear the source cache, try a full runtime reload, and if the reload fails mark the UI with a single “reload extensions” prompt while preserving the newly cloned files for recovery.\n\n## Anti-Patterns (What NOT to do)\n- Do not swallow activation failures after install; users will assume the new extension is live while the runtime still points at stale caches.\n- Do not skip cache clearing before the activation attempt or the refresh may rehydrate old data and fail in harder-to-debug ways.\n- Do not loop automatic retries without a user-visible fallback; repeated refresh crashes should turn into a manual recovery prompt.","tags":["cache","sweep","activation","fallback","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents","context-engineering"],"capabilities":["skill","source-ychampion","skill-cache-sweep-activation-fallback","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/cache-sweep-activation-fallback","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,223 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-22T06:56:46.364Z","embedding":null,"createdAt":"2026-04-18T22:19:58.415Z","updatedAt":"2026-04-22T06:56:46.364Z","lastSeenAt":"2026-04-22T06:56:46.364Z","tsv":"'activ':4,11,30,45,75,95,135,142,171,189,208,307,334 'admit':126 'anti':298 'anti-pattern':297 'appli':37 'applic':253 'assum':313 'attempt':92,140,335 'automat':141,354 'back':14 'background':81,256 'bit':122 'blind':230 'boundari':194 'cach':2,9,28,91,110,169,213,269,326,330 'cache-sweep-activation-fallback':1 'catch':152,193 'chang':83,146 'clear':88,108,167,210,266,331 'clone':259,293 'command':262 'compon':150 'consum':239 'core':70 'crash':364 'data':186,342 'debug':349 'degrad':98 'deliber':237 'disk':87,206 'distil':60 'domain':32 'duplic':250 'enter':164 'error':198 'exampl':252 'extens':8,34,41,63,257,287,316 'extensions-mcp':33 'fail':26,52,209,279,344 'failur':114,242,308 'fall':13 'fallback':5,31,57,105,233,361 'file':294 'flag':21,226 'fresh':176 'full':94,272 'grace':99 'harder':347 'harder-to-debug':346 'idempot':222 'immedi':46 'instal':73,258,310 'instead':132,227 'keep':231 'key':137 'lifecycl':64 'live':24,49,149,318 'log':112,196 'loop':353 'manual':19,120,224,369 'manual-refresh':18,119,223 'mark':280 'marketplac':90,177,263 'materi':40,145,203 'may':339 'mcp':35 'memoiz':185 'metadata':159 'metadata-on':158 'method':71 'must':43 'need':54,148 'new':261,315 'newli':39,202,292 'old':341 'path':106,166 'pattern':59,69,299 'phase':78 'plugin':109,179,212 'point':323 'preserv':200,290 'pretend':134 'prompt':288,371 'rais':220 'rather':181 'read':175 'reason':217 'reconcil':82 'reconcili':68 'recover':56 'recoveri':296,370 'refresh':20,25,50,96,102,121,174,225,238,338,363 'rehydr':340 'reload':274,278,286 'repeat':241,362 'replay':183 'retri':229,355 'review':62 'rule':138 'runtim':128,273,321 'separ':77 'set':116 'singl':285 'skill':27 'skill-cache-sweep-activation-fallback' 'skip':329 'sourc':42,58,67,268 'source-reconcili':66 'source-ychampion' 'specif':216 'stale':7,131,184,325 'startup':265 'state':129,156,180,204,247 'steadi':155 'steady-st':154 'step':190 'sticki':17,118,234 'still':322 'string':218 'succeed':136 'swallow':306 'sweep':3,6,29 'system':125 'thrash':245 'throw':103 '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':72 'tree':248 'tri':270 'trigger':36 'turn':366 'ui':282 'upstream':168 'user':311,359 'user-vis':358 'visibl':360 'way':350 'without':356 'work':161 'wrap':187 'write':251","prices":[{"id":"af392edd-b850-4bfd-aa21-eae2e887dc78","listingId":"8dd01b25-9bd1-49f9-9831-a41eaa63b44a","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:19:58.415Z"}],"sources":[{"listingId":"8dd01b25-9bd1-49f9-9831-a41eaa63b44a","source":"github","sourceId":"ychampion/cskill-agents/cache-sweep-activation-fallback","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/cache-sweep-activation-fallback","isPrimary":false,"firstSeenAt":"2026-04-18T22:19:58.415Z","lastSeenAt":"2026-04-22T06:56:46.364Z"}],"details":{"listingId":"8dd01b25-9bd1-49f9-9831-a41eaa63b44a","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"cache-sweep-activation-fallback","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":"aff359c9cb80961b4d938cd2255ba8c59a7cebc1","skill_md_path":"skills/cache-sweep-activation-fallback/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/cache-sweep-activation-fallback"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"cache-sweep-activation-fallback","description":"Sweep stale extension caches before activation, then fall back to a sticky manual-refresh flag if the live refresh fails."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/cache-sweep-activation-fallback"},"updatedAt":"2026-04-22T06:56:46.364Z"}}