{"id":"7bfca500-097c-4171-a925-d9df1647de4b","shortId":"SVUzQ3","kind":"skill","title":"diff-first-progress-projection","tagline":"Project marketplace installation progress by diffing declared sources before kickoff so the UI shows pending spinners without waiting on the clone.","description":"# SKILL: Diff-First Progress Projection\n**Domain:** extensions-mcp  \n**Trigger:** Background marketplace reconciliation needs to show progress before the clone/install work begins (before `reconcileMarketplaces`).\n**Source Pattern:** Distilled from reviewed extension lifecycle and source-reconciliation patterns.\n\n## Core Method\nRun 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.\n\n## Key Rules\n- Compute `declared` and `materialized` marketplaces and pass them through `diffMarketplaces` once, capturing `missing` plus `sourceChanged.map(c => c.name)` for the pending set.\n- Initialize `installationStatus.marketplaces` with the pending list; leave `installationStatus.plugins` empty unless a plugin-level hook has more granular progress.\n- Write the pending state before `reconcileMarketplaces` so that any UI watching `plugins.installationStatus.marketplaces` can render spinners before the expensive work begins.\n- Keep the `status` field locked to `'pending'` until the `onProgress` bridge reports a transition; do not assume any installs succeeded until they emit events.\n\n## Example Application\n`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.\n\n## Anti-Patterns (What NOT to do)\n- Do not call `reconcileMarketplaces` before the diff – you lose the chance to know how many spinners the UI must draw and the install list might appear empty during the initial load.\n- Do not skip seeding `installationStatus.marketplaces` in `setAppState`, or the UI will never show any pending state and users will assume nothing is happening.\n- Do not mix plugin-level progress into `installationStatus.plugins` until you actually collect plugin-specific events; that list is for instrumentation that doesn't exist in this path.","tags":["diff","first","progress","projection","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents","context-engineering"],"capabilities":["skill","source-ychampion","skill-diff-first-progress-projection","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/diff-first-progress-projection","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,386 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:48.231Z","embedding":null,"createdAt":"2026-04-18T22:20:17.187Z","updatedAt":"2026-04-22T06:56:48.231Z","lastSeenAt":"2026-04-22T06:56:48.231Z","tsv":"'actual':320 'anti':249 'anti-pattern':248 'appear':280 'applic':208 'appstat':215 'assum':199,305 'background':38 'begin':49,182 'bridg':193,246 'c':138 'c.name':139 'call':101,257 'captur':134 'chanc':265 'clone':26,117,226 'clone/install':47 'collaps':85 'collect':321 'comput':123,210 'core':64 'declar':12,124 'dif':11 'diff':2,29,69,261 'diff-first':28 'diff-first-progress-project':1 'diffmarketplac':70,132 'distil':54 'doesn':332 'domain':33 'draw':274 'echo':238 'emit':205 'empti':152,281 'entri':84 'enumer':80 'even':114,222 'event':206,325 'exampl':207 'exist':334 'expens':180 'extens':35,57 'extensions-mcp':34 'field':186 'fire':247 'first':3,30 'git':116,225 'granular':161 'happen':227,308 'hook':158 'immedi':91,213 'initi':144,284 'instal':8,201,240,241,277 'installationstatus.marketplaces':145,290 'installationstatus.plugins':151,317 'instrument':330 'keep':183 'key':121 'kickoff':15 'know':267 'later':237 'leav':150 'level':157,314 'lifecycl':58,242 'line':231 'list':149,278,327 'load':285 'lock':187 'long':74 'long-run':73 'lose':263 'make':104 'mani':269 'marketplac':7,39,68,127,221,229 'materi':126 'mcp':36 'method':65 'might':279 'miss':81,135 'mix':311 'must':273 'name':87,96,97 'need':41 'never':297 'noth':306 'number':110 'onprogress':192,245 'pass':129 'path':337 'pattern':53,63,250 'pend':20,99,112,142,148,165,189,220,300 'pendingnam':89,211 'pendingnames.map':95 'performbackgroundplugininstal':209 'plugin':156,313,323 'plugin-level':155,312 'plugin-specif':322 'plugins.installationstatus.marketplaces':94,174 'plus':136 'progress':4,9,31,44,162,315 'project':5,6,32 'queue':218 'reconcilemarketplac':51,102,168,258 'reconcili':40,62 'render':176,232 'report':194 'review':56 'right':109 'rule':122 'run':66,75 'seed':289 'set':143 'setappst':92,292 'show':19,43,107,298 'skill':27 'skill-diff-first-progress-projection' 'skip':288 'sourc':13,52,61 'source-reconcili':60 'source-ychampion' 'sourcechang':83 'sourcechanged.map':137 'specif':324 'spinner':21,113,177,235,270 'start':120 'state':166,301 'status':98,185,230 'still':119 'succeed':202 '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' 'transit':196 'trigger':37 'ui':18,106,172,272,295 'unless':153 'updat':214 'user':303 'wait':23 'watch':173 'without':22 'work':48,76,181 'write':163","prices":[{"id":"6892f1ba-1ac3-43d8-b570-1eb429f7ac16","listingId":"7bfca500-097c-4171-a925-d9df1647de4b","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:20:17.187Z"}],"sources":[{"listingId":"7bfca500-097c-4171-a925-d9df1647de4b","source":"github","sourceId":"ychampion/cskill-agents/diff-first-progress-projection","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/diff-first-progress-projection","isPrimary":false,"firstSeenAt":"2026-04-18T22:20:17.187Z","lastSeenAt":"2026-04-22T06:56:48.231Z"}],"details":{"listingId":"7bfca500-097c-4171-a925-d9df1647de4b","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"diff-first-progress-projection","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":"9f7d560ee1b0dd5a9c383d09f3a8a0879a1c97a0","skill_md_path":"skills/diff-first-progress-projection/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/diff-first-progress-projection"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"diff-first-progress-projection","description":"Project marketplace installation progress by diffing declared sources before kickoff so the UI shows pending spinners without waiting on the clone."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/diff-first-progress-projection"},"updatedAt":"2026-04-22T06:56:48.231Z"}}