Skip to content
/skills
/ui-diff

UI diff

Run it on a pull request that changes UI and it posts one comment with before, after and highlighted-diff screenshots. Reviewers see the change before they approve it.

npx skills add imuratalpay/skills
Installs every skill here, for Claude Code, Cursor, Codex and more. ui-diff needs git and Node.js 20.10+, and the GitHub CLI only to post. For the standalone CLI, clone imuratalpay/ui-diff and run ./install.sh.
By Murat Alpay · Updated · Source
Landing page at the base commit: the headline “Analytics for product teams” and a blue Start free trial button.
Landing page at the head commit: the headline “Analytics your whole team will actually use” on two lines and a violet pill button.
Point at the screenshot, or drag it, to compare

What it does

  • Works out which routes your changed files affect, using ui-diff.config.json, the framework’s routing and the import graph.
  • Runs the PR’s base and head in temporary git worktrees and captures each route with Playwright. It seeds randomness and waits for fonts and animations first, so the same page gives the same pixels.
  • Diffs the screenshots with pixelmatch and builds before | after | diff images, plus zoomed crops of the largest changed areas.
  • Writes a short UX summary for a designer or PM and shows it to you before it posts anything.
  • Creates or updates one sticky PR comment. The images go to an orphan branch of the same repository, so only people who can read the repo can see them.

When to use it

When a pull request changes components, styles or pages and reviewers would otherwise approve it from the code. You can run it on your branch before you open the PR. Nothing gets posted until you publish.

It also puts design variants side by side (?hero=1..4), records hover and transition clips, reports new accessibility issues, and flags colors and spacing that match no design token.

What the skill changed

One landing page from the ui-diff repo’s verified example, at commits 6737326 and 09cdd81.

Run the ui-diff skill on PR #123 and update the sticky PR comment.
Landing page at the base commit: the headline “Analytics for product teams” and a blue Start free trial button.
Base 6737326. A blue button and a one-line headline.

Example prompts

Plain English works. Tap or click a card to copy it.