visual-regression-testing
/visual-regression-testing
Catch unintended UI changes by diffing rendered screenshots against approved baselines with tuned thresholds and flake control. Use when protecting a component or page from visual drift across code changes.
- Author
- Amey-Thakur ↗
- Repository
- AI-SKILLS ↗
- Licence
- MIT
- Last repository change
- 05.09.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 05.09.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Catch unintended UI changes by diffing rendered screenshots against approved baselines with tuned thresholds and flake control. Use when protecting a component or page from visual drift across code changes.
Original author description
Catch unintended UI changes by diffing rendered screenshots against approved baselines with tuned thresholds and flake control. Use when protecting a component or page from visual drift across code changes.
How it works
- Method
- Checks
- Boundaries
SKILL.md preview
--- name: visual-regression-testing description: Catch unintended UI changes by diffing rendered screenshots against approved baselines with tuned thresholds and flake control. Use when protecting a component or page from visual drift across code changes. --- # Visual regression testing Functional tests pass while a stylesheet change quietly shoves a button off screen or turns label text the same color as its background. Pixels are the only thing that catches pixels. Screenshot diffing works, but done naively it buries you in false positives from fonts, animation, and antialiasing, so the real craft here is controlling that flake rather than taking the picture. ## Method 1. **Freeze everything nondeterministic before capture.** Disable CSS animations and transitions, stop videos, pin the clock, and stub any live data. A blinking cursor or a relative timestamp will diff on every run and train people to ignore diffs. 2. **Pin the rendering environment.** Run captures in a fixed container with one browser version and a set viewport and device pixel ratio. Fonts and subpixel rendering differ across operating systems, so a baseline shot on a laptop will fail in CI. Playwright and Docker together make this repeatable. 3. **Snapshot components, not just whole pages.** Capture a button, a card, a modal in isolation with a tool like Storybook plus a runner. A component diff points straight at the culprit; a full-page diff lights up on any unrelated change above it. 4. **Set a per-pixel and total-difference threshold.** Allow a small antialiasing tolerance per pixel and a maximum changed-pixel fraction, for example fail above 0.1% of pixels. Zero tolerance flakes constantly; a loose threshold hides real one-pixel shifts. Tune it per component. 5. **Review diffs as approvals.** When a shot changes, open the side-by-side in Percy, Chromatic, or reg-suit and decide whether the change is intended before promoting it to the new baseline. Rubber-stamping the update is how a regression becomes the reference image. 6. **Mask known-dynamic regions.** Blackout or ignore areas that legitimately vary, such as an avatar, an ad slot, or a live counter, so the rest of the frame stays assertable instead of the whole shot being written off. 7. **Fail the build and publish the diff image.** Wire the check into CI so a drift blocks merge, and attach the highlighted diff to the run so the reviewer sees what moved without reproducing it locally. ## Checks - Does re-running the suite with no code change produce zero diffs, every time? - When a diff appears, can a reviewer see exactly which pixels moved and approve or reject in one click? - Are baseline images committed and their changes reviewed like code, not silently overwritten? ## Boundaries Screenshot diffing proves the UI looks unchanged, not that it works or is accessible: pair it with functional tests and an accessibility review. The approve-or-reject workflow is shared with approval-testing, which handles text output the same way. Whether a rendered result looks right in the first place remains a design judgment.
Versions
The database has no other skills named visual-regression-testing.
Database snapshot: 13.11.2026 · package version 417d9b38bdec (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90visual-regression
Detect unintended UI changes with reproducible rendered screenshots and reviewed baselines. Use when adding screenshot checks or investigating layout/theme regressions; do not approve a changed image merely to make the test green. - 100testing-visual-regression
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". - 100testing-visual-regression
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". - 100visual-regression
Catch unintended visual changes by comparing screenshots against a baseline. Use after any change to a web UI, before calling it done, and whenever a change claims to be visual-only. Web UI only; needs a browser. Only invoke via the orcinus router. - 100test-visual-regression
Set up Playwright screenshot baselines and CI diffing so UI changes fail pixel by pixel instead of by eye. Use when "add visual regression tests" or "catch UI regressions". Functional clicks → test-playwright. - 100visual-regression-testing-playwright-percy
Use this skill when detecting unintended UI visual regressions and pixel shifts across browser viewports automatically.