Agent skill

Testing Visual Regression

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Detect visual changes in UI components using screenshot comparison.

MITAuto-check passedTesting & QA

Install Testing Visual Regression

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill testing-visual-regression -a claude-code

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

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace testing-visual-regression --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/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/testing-visual-regression .claude/skills/testing-visual-regression && 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
testing-visual-regression
GitHub stars
2.8k
Token cost
~1.3k tokens
SKILL.md length
465 words
Files
11 (incl. scripts, references, assets)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Detect visual changes in UI components using screenshot comparison.

  • Works in 7 steps: Identify all UI components and pages… → Create a visual test file for each… → Capture screenshots with deterministic… → …
  • Detecting unintended UI changes
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 3 more sections
  • Runs Python and JavaScript scripts from its folder

What it does

Testing Visual Regression is an agent skill from jeremylongshore/tons-of-skills-marketplace. Detect visual changes in UI components using screenshot comparison. Use when detecting unintended UI changes or pixel differences. Trigger with phrases like "test visual changes", "compare screenshots", or "detect UI regressions".

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including scripts, reference files and assets (for example `assets/README.md`, `assets/example_backstop_config.js` and `assets/example_chromatic_config.yml`). Compatibility notes: Designed for Claude Code

It sits in Testing & QA, covering Visual regression testing. It works with Playwright. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Detecting unintended UI changes
  • Pixel differences
  • With phrases like test visual changes
  • Compare screenshots

Example prompts

  • “test visual changes”
  • “compare screenshots”
  • “detect UI regressions”
  • “/testing-visual-regression”

Requirements

  • Python 3
  • Node.js
  • Docker
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Glob, Bash(test:visual-*)

Workflow steps

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

  1. Identify all UI components and pages requiring visual coverage using Glob to scan component directories and route definitions.
  2. Create a visual test file for each component or page
  3. Capture screenshots with deterministic settings
  4. Compare captured screenshots against baselines
  5. For responsive testing, capture at multiple breakpoints
  6. Review diff images for each failure and classify as
  7. Integrate into CI so visual tests run on every pull request with diff images uploaded as artifacts.

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • Bash(test:visual-*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 4 files in scripts/ (Python and JavaScript), which the agent can run.

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

  • Network

    Links to these hosts (documentation or services it may open):

    • playwright.dev
    • percy.io
    • chromatic.com
    • github.com
    • reg-viz.github.io

    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.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Testing Visual Regression loads about 1.3k tokens when it runs, and up to ~1.3k if it reads all its reference files. Until then it costs about 64 tokens; SKILL.md has 465 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.3k

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); the scripts in this folder are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 80f86df, republished under its MIT licence (© jeremylongshore). 465 words, ~1,296 tokens.

Download SKILL.mdSave it as .claude/skills/testing-visual-regression/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
testing-visual-regression
description
Detect visual changes in UI components using screenshot comparison. Use when detecting unintended UI changes or pixel differences. Trigger with phrases like "test visual changes", "compare screenshots", or "detect UI regressions".
allowed-tools
Read, Write, Edit, Grep, Glob, Bash(test:visual-*)
compatibility
Designed for Claude Code
version
1.25.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
testing, testing-visual

Visual Regression Tester

Overview

Detect unintended visual changes in UI components by capturing screenshots and comparing them pixel-by-pixel against approved baselines. Supports Playwright visual comparisons, Percy, Chromatic, BackstopJS, and reg-suit.

Prerequisites

  • Browser automation tool installed (Playwright, Puppeteer, or Cypress)
  • Visual regression library configured (Playwright toHaveScreenshot, Percy, Chromatic, or BackstopJS)
  • Baseline screenshots committed to version control or stored in a cloud service
  • Storybook or component playground running for isolated component captures (optional)
  • Consistent rendering environment (Docker or CI with fixed OS/fonts/GPU settings)

Instructions

  1. Identify all UI components and pages requiring visual coverage using Glob to scan component directories and route definitions.
  2. Create a visual test file for each component or page:
    • Navigate to the component URL or Storybook story.
    • Wait for all network requests, animations, and lazy-loaded images to complete.
    • Set a consistent viewport size (e.g., 1280x720 for desktop, 375x812 for mobile).
  3. Capture screenshots with deterministic settings:
    • Disable animations and transitions (* { animation: none !important; transition: none !important; }).
    • Mask dynamic content (timestamps, random avatars, ads) with CSS overlays.
    • Use fullPage: true for scrollable pages.
  4. Compare captured screenshots against baselines:
    • Configure pixel difference threshold (recommended: 0.1% for component tests, 0.5% for full-page).
    • Generate diff images highlighting changed regions.
    • Flag tests as failed when differences exceed the threshold.
  5. For responsive testing, capture at multiple breakpoints:
    • Mobile: 375px width
    • Tablet: 768px width
    • Desktop: 1280px width
    • Wide: 1920px width
  6. Review diff images for each failure and classify as:
    • Intentional change: Update the baseline with --update-snapshots.
    • Regression: File a bug with the diff image attached.
  7. Integrate into CI so visual tests run on every pull request with diff images uploaded as artifacts.
Show full SKILL.md (193 more words)Show less

Output

  • Screenshot baseline images stored in __screenshots__/ or equivalent directory
  • Diff images highlighting pixel-level changes between baseline and current
  • Visual regression test report with pass/fail status per component
  • CI artifacts containing all captured, baseline, and diff images
  • Responsive coverage matrix showing results across breakpoints

Error Handling

ErrorCauseSolution
Anti-aliasing differences across OSFont rendering varies between macOS, Linux, and WindowsRun visual tests in Docker with fixed fonts; use threshold option to allow sub-pixel variance
Flaky screenshots from animationsCSS transitions or JS animations still running at capture timeInject prefers-reduced-motion or disable animations via addStyleTag before capture
Missing baseline on first runNo previous screenshot exists to compare againstRun with --update-snapshots to create initial baselines; commit them to the repository
Viewport size mismatchBrowser chrome or scrollbar width differs between environmentsUse setViewportSize explicitly; hide scrollbars with CSS overflow: hidden
Dynamic content causes false failuresTimestamps, user avatars, or ads change between runsMask dynamic elements with mask option or replace content via page.evaluate

Examples

Playwright visual regression test:

typescript
import { test, expect } from '@playwright/test';

test('homepage matches baseline', async ({ page }) => {
  await page.goto('/');
  await page.waitForLoadState('networkidle');
  await page.addStyleTag({ content: '* { animation: none !important; }' });
  await expect(page).toHaveScreenshot('homepage.png', {
    maxDiffPixelRatio: 0.001,
    fullPage: true,
  });
});

BackstopJS scenario configuration:

json
{
  "label": "Login Page",
  "url": "http://localhost:3000/login",  # 3000: 3 seconds in ms
  "selectors": ["document"],
  "misMatchThreshold": 0.1,
  "viewports": [
    { "label": "phone", "width": 375, "height": 812 },  # 812: 375 = configured value
    { "label": "desktop", "width": 1280, "height": 720 }  # 1280: 720 = configured value
  ]
}

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (scripts, references, assets) in skills/.curated/testing-visual-regression of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • assets/README.md
  • assets/example_backstop_config.js
  • assets/example_chromatic_config.yml
  • assets/example_percy_config.yml
  • assets/html_report_template.html
  • references/README.md
  • scripts/README.md
  • scripts/analyze_diffs.py
  • scripts/run_visual_tests.py
  • scripts/update_baselines.py

Open the folder on GitHubat commit 80f86df

Compare with similar skills

Testing Visual Regression 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.

Testing Visual Regression compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Testing Visual Regression this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.3kAutomated safety check: PassMIT
Dozzle Visual Snapshot Updateramir20/dozzle15k—~797Automated safety check: PassMIT
Glance TestDebugBase/glance156—~827Automated safety check: PassMIT
Economical Visual Testsigrlk/storybook-addon-test-codegen1541 repos~1.1kAutomated safety check: PassMIT
Playwright Testingchongdashu/vibejam-starter-pack149—~2.2kAutomated safety check: PassNone
UI Visual DebuggingNangoHQ/nango13k—~1.3kAutomated safety check: PassCustom licence

Similar skills

  • Regenerates Playwright visual snapshots for Dozzle after an intentional UI change, running them through Docker Compose so filenames match the Linux CI platform.

    15k GitHub stars~797 tokensUpdated today
    Testing & QAAuto-check passed
  • Glance Test

    DebugBase/glance

    Run E2E browser tests on any web application using Glance MCP.

    156 GitHub stars~827 tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Economical Visual Tests

    igrlk/storybook-addon-test-codegen

    Author economical visual tests — full visual coverage in the fewest billable snapshots.

    154 GitHub starsUsed in 1 repo~1.1k tokens
    Testing & QAAuto-check passed
  • Playwright Testing

    chongdashu/vibejam-starter-pack

    Plan, implement, and debug frontend tests: unit/integration/E2E/visual/a11y.

    149 GitHub stars~2.2k tokensUpdated 5 mo 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
  • 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

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Testing Visual Regression

What does Testing Visual Regression do?

Detect visual changes in UI components using screenshot comparison. Testing Visual Regression is an agent skill from jeremylongshore/tons-of-skills-marketplace. Detect visual changes in UI components using screenshot comparison.

When should I use Testing Visual Regression?

Testing Visual Regression fits situations like: detecting unintended UI changes; pixel differences; with phrases like test visual changes; compare screenshots.

How do I install Testing Visual Regression in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill testing-visual-regression -a claude-code`. Or copy the skill folder (skills/.curated/testing-visual-regression in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/testing-visual-regression in your project. Claude Code loads it when a task matches its description.

How do I install Testing Visual Regression in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill testing-visual-regression -a codex`. Or copy the skill folder (skills/.curated/testing-visual-regression in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/testing-visual-regression in your project. Codex loads it when a task matches its description.

Can I use Testing Visual Regression 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 jeremylongshore/tons-of-skills-marketplace --skill testing-visual-regression -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/testing-visual-regression, .gemini/skills/testing-visual-regression, .github/skills/testing-visual-regression and .opencode/skills/testing-visual-regression in your project.

What does Testing Visual Regression need to run?

Going by SKILL.md and its folder, Testing Visual Regression needs Python and JavaScript for the scripts in its folder. Our summary lists: Python 3; Node.js; Docker. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(test:visual-*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Testing Visual Regression access the network?

SKILL.md names 5 domains. As links in the text: playwright.dev, percy.io, chromatic.com, github.com and reg-viz.github.io. This is read from the text; nothing was executed.

Is Testing Visual Regression 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Testing Visual Regression use?

Testing Visual Regression is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Testing Visual Regression use?

About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 17 tokens, read only when the agent opens those files.

What are the alternatives to Testing Visual Regression?

Skills that share tags, products or a category with Testing Visual Regression: Dozzle Visual Snapshot Updater (amir20/dozzle, 15k stars), Glance Test (DebugBase/glance, 156 stars), Economical Visual Tests (igrlk/storybook-addon-test-codegen, 154 stars) and Playwright Testing (chongdashu/vibejam-starter-pack, 149 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Testing Visual Regression?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,825 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 9, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.