--- name: visual-view-diff description: Render the VS Code extension's webview panels headlessly and detect which ones changed visually, producing before/after/diff screenshots for review. Use when a change touches webview UI (src/webview/**, view HTML in extension.ts, shared CSS) and you want to see and show what it looks like, or to check that a refactor changed nothing visually. --- # Visual View Diff Skill Renders the extension's webview panels **headlessly**, screenshots them, and reports which views changed compared to a baseline commit. The screenshots are the deliverable. **Posting them anywhere — a PR comment, a job summary, an artifact upload — is deliberately not part of this skill.** It answers exactly one question: *what changed visually, and what does it look like?* Whoever wants to publish that answer reads `report.md` and the PNGs. The publisher for pull requests is the `ui-checks` job in `.github/workflows/ci.yml`: it runs this diff against the PR's merge base and posts the before/after/diff images as one comment on the PR (replaced on every push) through `gh pr comment --attach`, rendered by `.github/workflows/scripts/visual-diff-comment.js`. An agent opening a UI PR does not have to attach screenshots by hand — it has to make sure the change is *visible* to this harness (see "States" below) and say in the PR body which views it expects to change. ## When to use it - A change touches `vscode-extension/src/webview/**`, the shared webview CSS, or a `get*Html` method in `extension.ts`. - A refactor is supposed to be visually neutral and you want proof. - You want before/after images of a UI change for a human to look at. ## Why this exists (and why it does not open VS Code) The repo forbids agents from launching a real editor window — see "Never Launch a Real Editor/IDE Instance" in `.github/copilot-instructions.md`. That rules out the Extension Development Host, and with it the existing `aiEngineeringFluency.runLocalViewRegression` command, which only a human can run and which checks DOM *metrics* (node counts, text length) rather than appearance. This skill covers the gap: it renders the **real webview bundles** outside VS Code. Every panel's HTML shell in `extension.ts` is the same four ingredients — a `