diff

Scaffold Playwright visual regression test suites with toHaveScreenshot.

4|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/Dragoon0x/dragoon-skills --skill diff-dragoon0x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diff
Source: https://github.com/Dragoon0x/dragoon-skills/tree/main/skills/diff
Command: npx skills add https://github.com/Dragoon0x/dragoon-skills --skill diff-dragoon0x

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Manually setting up visual regression test suites for web applications is time-consuming and error-prone, requiring careful configuration of screenshot capture, baseline management, and pixel diffing logic. This Skill automates the entire scaffolding process so you can focus on testing your UI instead of writing test infrastructure from scratch.

Core Features & Use Cases

  • Automated Test Harness Generation: Creates a Playwright config tuned for snapshot tests, a routes file to define pages to capture, and a spec that loops through routes to run screenshot comparisons.
  • Flexible Route Configuration: Supports custom route lists via the --routes flag to capture specific pages of your application.
  • Use Case: Before launching a major UI refactor, use this Skill to quickly set up visual regression coverage that will catch unintended design changes, layout shifts, or broken components across all key pages.

Quick Start

Use the diff skill to scaffold a Playwright visual regression test suite for your project's key routes.

Frequently Asked Questions about diff

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

FAQPage Schema
How do I scaffold Playwright visual regression tests for my web application?

You can scaffold Playwright visual regression tests by automatically generating the required test configuration, route list, and spec file that leverages toHaveScreenshot for pixel-level diffing against committed baselines.

What is visual regression testing and how does it catch UI drift?

Visual regression testing captures full-page screenshots of specified routes and compares them against committed baselines to detect unintended UI drift, layout shifts, or broken components across key pages.

Can I specify custom routes for Playwright screenshot comparisons?

Yes, you can specify custom route lists for Playwright screenshot comparisons using the --routes flag to capture specific pages and generate a spec file that loops through the defined routes.

Do I need to manually configure baseline management for Playwright visual regression?

No, you do not need to manually configure baseline management. The Skill eliminates the time-consuming setup of screenshot capture and pixel diffing logic by automating the test harness generation.

What's the best way to set up automated UI testing for a major UI refactor?

The best way to set up automated UI testing for a major UI refactor is to automatically scaffold a Playwright visual regression suite that catches unintended design changes across all key pages by comparing full-page screenshots against committed baselines.