Diff first progress projection

From ychampion/cskill-agents · View interactive version

Diff first progress projection is an AI agent skill from the GitHub repository ychampion/cskill-agents. Project marketplace installation progress by diffing declared sources before kickoff so the UI shows pending spinners without waiting on the clone.

How to use this skill

Skill file

SKILL: Diff-First Progress Projection

Domain: extensions-mcp

Trigger: Background marketplace reconciliation needs to show progress before the clone/install work begins (before reconcileMarketplaces).

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

Core Method

Run the marketplace diff (diffMarketplaces) before any long-running work so you can enumerate missing and sourceChanged entries. Collapse those names into pendingNames and immediately setAppState with plugins.installationStatus.marketplaces = pendingNames.map(name => ({ name, status: 'pending' })) before calling reconcileMarketplaces. That makes the UI show the right number of pending spinners even while git clones are still starting.

Key Rules

Example Application

performBackgroundPluginInstallations computes pendingNames and immediately updates AppState with a queue of 'pending' marketplaces. Even before any git clones happen, a marketplace status line renders with a spinner, which later echos the installing/installed lifecycle when the onProgress bridge fires.

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.