visual-regression

Compare rendered UI screenshots against baselines using Playwright.

2|Updated Nov 28, 2025
One-click install
npx skills add https://github.com/joshribakoff/surfsim --skill visual-regression-joshribakoff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: visual-regression
Source: https://github.com/joshribakoff/surfsim/tree/main/.claude/skills/visual-regression
Command: npx skills add https://github.com/joshribakoff/surfsim --skill visual-regression-joshribakoff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Visual regression testing helps teams detect unintended visual changes by comparing rendered UI against baselines, ensuring consistent appearance across releases.

Core Features & Use Cases

  • Pixel-perfect comparisons: Capture screenshots and compare them against baselines using Playwright to flag any visual differences.
  • Cross-state testing: Validate multiple UI states and component variants across stories and pages.
  • CI-ready workflow: Integrate with CI to fail on diffs and generate visual diff reports.

Quick Start

Run the visual regression suite to generate baselines and validate current UI against them.

Frequently Asked Questions about visual-regression

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is visual regression testing and when do I need pixel-diff checks?

Visual regression testing detects unintended UI changes by capturing rendered screenshots with Playwright and comparing them against stored baseline images to flag pixel diffs. This ensures consistent appearance across releases during development and QA.

Do I need existing baseline images to run Playwright visual regression tests?

Playwright visual regression testing supports component and page-level visuals, validating multiple UI states and component variants across stories. This cross-state testing ensures pixel-perfect comparisons for different UI configurations.

Can I use Playwright screenshots for component-level visual testing across different stories?

Yes, you need existing baseline images to perform pixel-diff comparisons, along with a configured Playwright setup. The workflow requires stored baselines to validate current rendered UI states and generate visual diff reports.

How do I fail CI workflows when a visual regression pixel diff is detected?

Integrate the visual regression suite into your CI workflow to automatically fail builds when pixel diffs are detected against baselines. This CI-ready workflow generates visual diff reports to highlight unintended visual changes.