Agent skill

Visual Diff Screenshot Comparison

by keybase in keybase/client

Captures baseline and current screenshots of the Keybase desktop app and compares them with ImageMagick to find pixel-level regressions between branches or edits.

BSD-3-ClauseAuto-check passedTesting & QA

Install Visual Diff Screenshot Comparison

skills CLI
$ npx skills add keybase/client --skill visual-diff -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install keybase/client visual-diff --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/keybase/client.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skill/visual-diff .claude/skills/visual-diff && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
visual-diff
GitHub stars
9.3k
Token cost
~740 tokens
SKILL.md length
290 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Captures baseline and current screenshots of the Keybase desktop app and compares them with ImageMagick to find pixel-level regressions between branches or edits.

  • Works in 4 steps: Attach and select the main app tab as… → Navigate to each tab (People, Chat,… → Save each with playwright-cli screenshot… → …
  • Checking a UI change for visual regressions before merging
  • SKILL.md covers Workflow, Viewing Results, Interpreting Diffs and Typical Session
  • Calls node, yarn and brew

What it does

This skill runs a visual regression test on the desktop app. With the app started using `KB_ENABLE_REMOTE_DEBUG=1 yarn desktop:start:hot` and ImageMagick installed, the agent captures baseline screenshots on the base branch and current ones after your change, then compares them. The preferred route is the scripts under `shared/perf`; the manual route attaches playwright-cli to the app over its debug port and screenshots each tab: People, Chat, Files, Crypto, Teams, Git, Devices and Settings.

Diff images mark differences in red, and the skill explains how to read them. Faint scattered dots under 200 pixels are font antialiasing, and changing avatars, timestamps and badges are dynamic content; both can be ignored. Solid red icons or text areas point to a color regression, red outlines or doubled shapes to a size or position shift. Images are resized with sips before reading to save tokens, and a typical session is take baseline, change code, compare, then summarize which tabs changed.

When your agent uses it

  • Checking a UI change for visual regressions before merging
  • Comparing the desktop app's appearance between two branches
  • Taking a baseline before a refactor of shared components
  • Deciding whether red pixels in a diff are noise or a real bug

Example prompts

  • “Take baseline screenshots of the desktop app, then compare them after my changes.”
  • “Did the UI change between this branch and main? Compare current screenshots to the baseline.”
  • “Show me the diff images for the Chat and Settings tabs and tell me whether the red pixels are noise.”

Requirements

  • The desktop app running with `KB_ENABLE_REMOTE_DEBUG=1`
  • ImageMagick
  • Node and yarn to run the capture scripts

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Attach and select the main app tab as described in the playwright-cli skill ("Connecting to the Electron App")…
  2. Navigate to each tab (People, Chat, Files, Crypto, Teams, Git, Devices, Settings) with playwright-cli click or eval. snapshot reads the…
  3. Save each with playwright-cli screenshot --filename=/tmp/visual-diff//.png.
  4. Run cd shared && ./perf/visual-diff-compare.sh.

What it can do on your machine

Read from SKILL.md and the folder at commit 81e93d6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node
    • yarn
    • brew

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use yarn, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Visual Diff Screenshot Comparison loads about 740 tokens when it runs. Until then it costs about 87 tokens; SKILL.md has 290 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~740

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from keybase/client at commit 81e93d6, republished under its BSD-3-Clause licence (© keybase). 290 words, ~740 tokens.

Download SKILL.mdSave it as .claude/skills/visual-diff/SKILL.md (or your agent's skills folder).
name
visual-diff
description
This skill should be used when the user asks to "compare screenshots", "visual diff", "check for visual regressions", "before and after screenshots", "did the UI change", or mentions comparing the desktop app UI between branches or before/after a change. Also triggered by "take baseline", "take current", or "compare against baseline".

Run a visual regression test by capturing baseline and current screenshots of the app, then comparing them with ImageMagick to find pixel-level differences.

Workflow

Prerequisites
  • App running with KB_ENABLE_REMOTE_DEBUG=1 yarn desktop:start:hot
  • ImageMagick installed (brew install imagemagick)
Option A: Automated Scripts (preferred)
bash
# Baseline (on base branch, app running)
cd shared && node perf/visual-diff-take.js baseline

# Current (on feature branch, app restarted)
cd shared && node perf/visual-diff-take.js current

# Compare
cd shared && ./perf/visual-diff-compare.sh
Option B: playwright-cli (manual)
  1. Attach and select the main app tab as described in the playwright-cli skill ("Connecting to the Electron App"): PLAYWRIGHT_MCP_CDP_ENDPOINT=http://localhost:9222 playwright-cli open --persistent, then tab-list and tab-select the row whose URL contains main.html.
  2. Navigate to each tab (People, Chat, Files, Crypto, Teams, Git, Devices, Settings) with playwright-cli click or eval. snapshot reads the first CDP page (usually the menubar), not the selected tab, so locate elements with eval.
  3. Save each with playwright-cli screenshot --filename=/tmp/visual-diff/<baseline|current>/<tab>.png.
  4. Run cd shared && ./perf/visual-diff-compare.sh.

Viewing Results

After comparison, read the diff images to evaluate:

  1. Resize each diff image for token efficiency:
    sips -Z 800 /tmp/visual-diff/diff/<tab>.png --out /tmp/visual-diff-resized/<tab>.png
  2. Use the Read tool to display each resized diff image.

Interpreting Diffs

Red pixels indicate differences between baseline and current screenshots.

  • Subpixel noise (<200px): Scattered faint red dots from font antialiasing. Safe to ignore.
  • Dynamic content: Avatars, timestamps, badges change between runs. Safe to ignore.
  • COLOR REGRESSION: Entire icons or text areas are solid red — colors changed (e.g. icon went blue → gray). Investigate.
  • SIZE/POSITION REGRESSION: Red outlines or doubled shapes — something shifted. Common cause: Box2 adding alignSelf: 'center' where old code used <div>.
  • Rule of thumb: Clean text labels + solid red icons = real bug, not noise.

Typical Session

  1. User says "take baseline" → run the baseline capture step.
  2. User makes code changes and restarts app.
  3. User says "compare" or "take current" → run the current capture + comparison.
  4. Display diff images and summarize findings: which tabs changed, whether changes look intentional or are regressions.

© keybase, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skill/visual-diff of keybase/client.

Open the folder on GitHubat commit 81e93d6

Compare with similar skills

Visual Diff Screenshot Comparison next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Visual Diff Screenshot Comparison compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Visual Diff Screenshot Comparison this skillkeybase/client9.3k—~740Automated safety check: PassBSD-3-Clause
Handsontable Visual Test Demoshandsontable/handsontable22k—~1.3kAutomated safety check: PassCustom licence
Kc Screenshotimran31415/kube-coder388—~870Automated safety check: NotesMIT
Handsontable Visual Testinghandsontable/handsontable22k—~2.3kAutomated safety check: PassCustom licence
Visual Testing Advancedproffesor-for-testing/agentic-qe494—~2kAutomated safety check: PassMIT
UI Visual DebuggingNangoHQ/nango13k—~1.3kAutomated safety check: PassCustom licence

Similar skills

  • Handsontable Visual Test Demos

    handsontable/handsontable

    Explains how to add or change the demo pages that Handsontable's visual regression suite photographs, including per-feature routes in the js demo and the shared grid.

    22k GitHub stars~1.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Kc Screenshot

    imran31415/kube-coder

    Capture desktop + mobile, dark + light screenshots of the kube-coder dashboard SPA for visual QA of a UI change.

    388 GitHub stars~870 tokensUpdated 4 days ago
    Testing & QAAuto-check: notes
  • Handsontable Visual Testing

    handsontable/handsontable

    Guide to Playwright visual regression tests in Handsontable: when a screenshot is justified, the tablePage fixture, naming, reg-suit comparison and demo routes.

    22k GitHub stars~2.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Visual Testing Advanced

    proffesor-for-testing/agentic-qe

    Advanced visual regression testing with pixel-perfect comparison, AI-powered diff analysis, responsive design validation, and cross-browser visual consistency.

    494 GitHub stars~2k tokensUpdated 3 days ago
    Testing & QAAuto-check passed
  • UI Visual Debugging

    NangoHQ/nango

    A skill your agent uses when modifying or visually debugging Nango frontend UI, including packages/webapp, packages/connect-ui, browser interactions, screenshots, and visual regressions.

    13k GitHub stars~1.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Computed Styles

    bitovi/ai-enablement-prompts

    Extract and compare computed CSS styles between a baseline URL and a dev/Storybook URL using Playwright MCP evaluate calls.

    121 GitHub stars~2.4k tokensUpdated 26 days ago
    Testing & QAAuto-check passed

More from keybase/client

All 14 skills in this repo
  • Analyzes V8, Chrome and Electron .heapsnapshot files with Node scripts to find memory leaks, detached DOM nodes and the retainer paths that keep objects alive.

    9.3k GitHub stars~875 tokensUpdated today
    Auto-check passed
  • Analyzes Chrome or Electron DevTools Performance trace exports with Python scripts to find where render time actually goes, without opening DevTools.

    9.3k GitHub stars~809 tokensUpdated today
    Auto-check passed
  • Captures a clean Keybase service log and analyzes it for redundant, duplicated or looping RPCs, then checks whether a caching fix reduced the calls.

    9.3k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Parses a React DevTools Profiler JSON export with Python scripts to find re-render storms, commit fan-out and why a component rendered, without opening the DevTools UI.

    9.3k GitHub stars~978 tokensUpdated today
    Auto-check passed
  • Address PR Feedback

    keybase/client

    Fetches GitHub Copilot review feedback from inline threads and review bodies, checks each finding against the code and fixes the valid ones.

    9.3k GitHub stars~657 tokensUpdated today
    Auto-check passed
  • Takes a screenshot of a running Electron desktop app through playwright-cli over remote debugging, shrinks it and shows it so you can check the UI visually.

    9.3k GitHub stars~476 tokensUpdated today
    Auto-check passed

Works with

Questions about Visual Diff Screenshot Comparison

What does Visual Diff Screenshot Comparison do?

Captures baseline and current screenshots of the Keybase desktop app and compares them with ImageMagick to find pixel-level regressions between branches or edits. This skill runs a visual regression test on the desktop app. With the app started using `KB_ENABLE_REMOTE_DEBUG=1 yarn desktop:start:hot` and ImageMagick installed, the agent captures baseline screenshots on the base branch and current ones after your change, then compares them.

When should I use Visual Diff Screenshot Comparison?

Visual Diff Screenshot Comparison fits situations like: checking a UI change for visual regressions before merging; comparing the desktop app's appearance between two branches; taking a baseline before a refactor of shared components; deciding whether red pixels in a diff are noise or a real bug.

How do I install Visual Diff Screenshot Comparison in Claude Code?

Run `npx skills add keybase/client --skill visual-diff -a claude-code`. Or copy the skill folder (skill/visual-diff in keybase/client) into .claude/skills/visual-diff in your project. Claude Code loads it when a task matches its description.

How do I install Visual Diff Screenshot Comparison in Codex?

Run `npx skills add keybase/client --skill visual-diff -a codex`. Or copy the skill folder (skill/visual-diff in keybase/client) into .agents/skills/visual-diff in your project. Codex loads it when a task matches its description.

Can I use Visual Diff Screenshot Comparison in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add keybase/client --skill visual-diff -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/visual-diff, .gemini/skills/visual-diff, .github/skills/visual-diff and .opencode/skills/visual-diff in your project.

What does Visual Diff Screenshot Comparison need to run?

Going by SKILL.md and its folder, Visual Diff Screenshot Comparison needs the command-line tools its instructions call (node, yarn and brew). Our summary lists: The desktop app running with `KB_ENABLE_REMOTE_DEBUG=1`; ImageMagick; Node and yarn to run the capture scripts.

Does Visual Diff Screenshot Comparison access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Visual Diff Screenshot Comparison safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Visual Diff Screenshot Comparison use?

Visual Diff Screenshot Comparison is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Visual Diff Screenshot Comparison use?

About 740 tokens (SKILL.md is roughly 3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Visual Diff Screenshot Comparison?

Skills that share tags, products or a category with Visual Diff Screenshot Comparison: Handsontable Visual Test Demos (handsontable/handsontable, 22k stars), Kc Screenshot (imran31415/kube-coder, 388 stars), Handsontable Visual Testing (handsontable/handsontable, 22k stars) and Visual Testing Advanced (proffesor-for-testing/agentic-qe, 494 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Visual Diff Screenshot Comparison?

keybase (a GitHub organization) maintains it in keybase/client, which has 9,257 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 7, 2026.

Source: keybase/client on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.