Skip to content
Skills Library
Programming · Testing

visual-regression-baseline

/visual-regression-baseline

Use when a known-good render and candidate captures must be compared reproducibly: lock viewport, scale, theme, locale, and time; mask declared dynamic regions; produce tolerance-bounded pixel/perceptual deltas; and classify each delta before replacing the reference set.

Licence
MIT
Last repository change
20.09.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 20.09.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when a known-good render and candidate captures must be compared reproducibly: lock viewport, scale, theme, locale, and time; mask declared dynamic regions; produce tolerance-bounded pixel/perceptual deltas; and classify each delta before replacing the reference set.

Original author description

Use when a known-good render and candidate captures must be compared reproducibly: lock viewport, scale, theme, locale, and time; mask declared dynamic regions; produce tolerance-bounded pixel/perceptual deltas; and classify each delta before replacing the reference set.

How it works

  1. Steps
  2. What counts as a regression FAIL
  3. Acceptance
  4. When to invoke
  5. When NOT to invoke
Original SKILL.md headings · 51 lines, 492 words
SKILL.md preview
---
name: visual-regression-baseline
audience: specialist
description: "Use when a known-good render and candidate captures must be compared reproducibly: lock viewport, scale, theme, locale, and time; mask declared dynamic regions; produce tolerance-bounded pixel/perceptual deltas; and classify each delta before replacing the reference set."
type: skill
---

# Visual Regression Baseline

Capture stable, comparable visual references so a UI/render change can be judged as intended design movement
vs. accidental drift — a deterministic diff, not a screenshot glance.

## Steps
1. **Define the capture set.** Enumerate the states that must be verified: routes/screens, key components,
   breakpoints (mobile/tablet/desktop), theme variants (light/dark), and salient interaction states
   (hover/focus/error/empty/loading). Each entry is one named, reproducible capture.
2. **Establish the baseline.** On the known-good build, capture each entry to an immutable, named reference
   (via `chrome-devtools`/`playwright` `take_screenshot`/`browser_take_screenshot`, fresh Chrome). Record the
   capture conditions with it: viewport size, device-scale factor, color scheme, locale, and the app
   build/commit. A baseline without its conditions is not a baseline.
3. **Neutralize non-determinism BEFORE diffing.** Freeze or mask sources of pixel noise that are not the
   change under test: fixed clock/seeded RNG, disabled animations/transitions, stable fonts (wait for
   webfont load), and masked dynamic regions (timestamps, avatars, ads, carousels, generated IDs). Masks are
   declared per-entry and versioned with the baseline — an unmasked dynamic region is a false FAIL.
4. **Re-capture deterministically.** On the candidate build, re-capture the SAME set under the SAME recorded
   conditions. Any condition mismatch (viewport, scale, theme, locale) invalidates the comparison — re-capture,
   do not diff across conditions.
5. **Diff and compare.** Compare candidate vs. baseline per entry. Use a pixel/perceptual diff with a declared
   tolerance (anti-aliasing/sub-pixel threshold) and the entry's masks applied. Produce a diff artifact
   (highlighted delta image) for every non-identical entry.
6. **Human/`view_image` review of diffs.** A non-zero diff is a SIGNAL, not a verdict. Review each diff image
   (`view_image` on the codex lane, or a lane image-read) and classify: **intended** (accept → promote to the
   new baseline, with a note on what changed and why), or **regression** (reject). Never auto-accept a diff to
   silence it.

## What counts as a regression FAIL
- A visual delta outside tolerance in an UNmasked region that was NOT an intended, reviewed change.
- A capture that could not be produced under the recorded conditions (broken render, crash, missing state).
- A diff accepted without human/`view_image` classification (an unreviewed baseline promotion is itself a FAIL).

## Acceptance
- Every verified state has a named baseline WITH its recorded capture conditions and declared masks.
- Candidate captures are produced under identical conditions; cross-condition diffs are rejected, not tolerated.
- Every non-identical entry has a diff artifact AND a human/`view_image` classification (intended vs regression).
- Baseline promotion is explicit and attributed; dynamic-region masking is versioned with the baseline.
- The tool's numeric diff is never the sole verdict — an out-of-tolerance unmasked delta blocks acceptance
  until reviewed, and a masked/tolerated delta is documented, not hidden.

## When to invoke
- The S4 required visual-verify gate of `project/web-app` and `project/game-production` (and any card that must
  judge a UI/render change).

## When NOT to invoke
- No visual surface under test (headless/backend-only work).
- As a substitute for accessibility (`wcag-conformance-audit`) or functional e2e — it verifies *looks-right*, not
  *works-right* or *accessible*.

Versions

The database has no other skills named visual-regression-baseline.

Identical content appears in 2 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version 2461f885c932 (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

  • 100arn-spark-visual-strategy
    This skill should be used when the user says "visual strategy", "arn visual strategy", "visual testing", "visual regression", "screenshot testing", "compare to prototype", "visual validation", "how do I test visuals", "set up visual tests", "baseline images", "screenshot…
  • 100running-visual-regression-tests
    Sets up and maintains visual regression testing: what to snapshot, baseline strategy, masking dynamic regions, threshold tuning, containerized baselines, and the review-and-update workflow. Use when styling regressions escape to production, when snapshots fail on every machine…
  • 90visual-baseline-conventions
    Reference catalog for visual regression coverage decisions - which Storybook stories or pages get baselines, how to choose breakpoints, when to mask vs adjust threshold, when to add or remove a baseline, and a decision matrix for picking among Percy / Chromatic / Playwright /…
  • 100visual-regression
    When the user wants to design, integrate, or operate visual regression testing — pixel diffs, DOM snapshots, AI-powered visual diffs, baseline management, dynamic-content masking. Use when the user mentions "visual regression," "visual testing," "screenshot testing," "Percy,"…
  • 100visual-testing
    Implement visual regression testing with Playwright screenshots, Chromatic, Percy, and Argos CI. Covers baseline management, diff threshold tuning, dynamic content masking, responsive viewport testing, and review/approval workflows. Use when: "visual test," "screenshot," "visual…
  • 100quality-engineering-visual-baseline
    Captures, masks, compares, and updates screenshot baselines for web and mobile suites, with per-region thresholds and a reviewed-diff rule for every baseline change. Use when a screenshot assertion fails, a baseline needs updating, or visual checks are being added; not for deciding what to verify.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.