Cache sweep activation fallback

From ychampion/cskill-agents · View interactive version

Cache sweep activation fallback is an AI agent skill from the GitHub repository ychampion/cskill-agents. Sweep stale extension caches before activation, then fall back to a sticky manual-refresh flag if the live refresh fails.

How to use this skill

Skill file

SKILL: Cache Sweep Activation Fallback

Domain: extensions-mcp

Trigger: Apply when newly materialized extension sources must be activated immediately, but the live refresh can fail and needs a recoverable fallback.

Source Pattern: Distilled from reviewed extension lifecycle and source-reconciliation patterns.

Core Method

Treat 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.

Key Rules

Example Application

If 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.

Anti-Patterns (What NOT to do)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.