# Diff First Progress Projection

> Project marketplace installation progress by diffing declared sources before kickoff so the UI shows pending spinners without waiting on the clone.

- **Type:** Skill
- **Install:** `agentstack add skill-ychampion-cskill-agents-diff-first-progress-projection`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ychampion](https://agentstack.voostack.com/s/ychampion)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ychampion](https://github.com/ychampion)
- **Source:** https://github.com/ychampion/cskill-agents/tree/main/agents/claude-code/skills/diff-first-progress-projection
- **Website:** https://x.com/YashasGunderia/status/2039990540016693692?s=20

## Install

```sh
agentstack add skill-ychampion-cskill-agents-diff-first-progress-projection
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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
- Compute `declared` and `materialized` marketplaces and pass them through `diffMarketplaces` once, capturing `missing` plus `sourceChanged.map(c => c.name)` for the pending set.
- Initialize `installationStatus.marketplaces` with the pending list; leave `installationStatus.plugins` empty unless a plugin-level hook has more granular progress.
- Write the pending state before `reconcileMarketplaces` so that any UI watching `plugins.installationStatus.marketplaces` can render spinners before the expensive work begins.
- Keep the `status` field locked to `'pending'` until the `onProgress` bridge reports a transition; do not assume any installs succeeded until they emit events.

## 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)
- 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.
- Do not skip seeding `installationStatus.marketplaces` in `setAppState`, or the UI will never show any pending state and users will assume nothing is happening.
- 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.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ychampion](https://github.com/ychampion)
- **Source:** [ychampion/cskill-agents](https://github.com/ychampion/cskill-agents)
- **License:** MIT
- **Homepage:** https://x.com/YashasGunderia/status/2039990540016693692?s=20

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-ychampion-cskill-agents-diff-first-progress-projection
- Seller: https://agentstack.voostack.com/s/ychampion
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
