agentleFS
ManojDevHub1ManojDevHub1/visual-engineering-suite/skills/visual-regression-triage/SKILL.md

visual-regression-triage

Skill1 starsChanged 26 days agoMITView on GitHub

Compare reference mockups against rendered screenshots at matching viewport dimensions, calculate quantitative pixel difference metrics, isolate bounding boxes, filter rendering noise, and triage discrepancies by severity.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to perform automated visual comparison between a reference image and a rendered implementation, isolate the discrepancy …

    line 9
  2. Very specific:

    Quantitative Metrics: Run diff.js to compute mismatched pixel count, diff percentage, and coordinate bounding boxes.

    line 14
  3. Distinctive:

    Ensure both images share identical dimensions:

    line 23
  4. Distinctive:

    If dimensions differ, do not proceed with pixel diffing.

    line 27
  5. Distinctive:

    Run the regression comparison with visual diff output:

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Visual Regression Triage Skill

Use this skill to perform automated visual comparison between a reference image and a rendered implementation, isolate the discrepancy regions, filter out rendering noise, and produce prioritized remediation guidance.

Core Responsibilities

  1. Dimension Verification: Assert identical viewport dimensions using bin/ves-dimension.js before diffing.
  2. Quantitative Metrics: Run diff.js to compute mismatched pixel count, diff percentage, and coordinate bounding boxes.
  3. Noise Filtering: Distinguish subpixel antialiasing and font smoothing noise from layout, color, and structural defects using Triage Taxonomy.
  4. Severity Prioritization: Rank findings (Critical, Major, Minor) and recommend specific code corrections.

Step-by-Step Procedure

1. Verify Image Dimensions

Ensure both images share identical dimensions:

node bin/ves-dimension.js <reference-png> <rendered-png>

If dimensions differ, do not proceed with pixel diffing. Resize the browser viewport or crop the candidate image to match the reference.

2. Execute Visual Diff

Run the regression comparison with visual diff output:

node skills/visual-regression-triage/scripts/diff.js <reference-png> <rendered-png> --diff ./output/diff.png --json

3. Analyze Findings & Discrepancy Bounding Boxes

Inspect the resulting bounding box and metrics:

  • boundingBox: Coordinate region [minX..maxX, minY..maxY] identifying exactly where the mismatch occurred.
  • diffPercentage: Quantitative mismatch ratio.
  • Cross-reference with the Triage Taxonomy to classify:
    • Is it a layout shift? (e.g. element moved 20px down)
    • Is it a color mismatch? (e.g. wrong hex code on CTA)
    • Is it missing elements or truncated text?
    • Is it harmless antialiasing noise?

4. Produce Structured Triage Report

Format the report with concrete code fixes:

### Visual Regression Triage Report

- **Reference Image**: `fixtures/landing-hero-ref.png` (1280x800px)
- **Rendered Image**: `output/rendered-desktop.png` (1280x800px)
- **Status**: FAILED (Diff: 1,420 pixels, 0.138%)
- **Discrepancy Region**: Bounding Box `x: 96..280, y: 340..396` (Primary CTA Button)

#### Triaged Issues:
1. **[Major] CTA Button Background Color Mismatch**:
   - *Observation*: Button rendered in `#2563EB` (Tailwind blue-600) instead of reference `#1D4ED8` (blue-700).
   - *Remediation*: Update `className="bg-blue-600"` to `className="bg-blue-700"` in `src/components/Hero.tsx`.
2. **[Minor] Heading Margin-Bottom**:
   - *Observation*: Spacing between headline and subtitle is 16px instead of 24px.
   - *Remediation*: Update `mb-4` to `mb-6`.

5. Loop Back to Frontend Implementation

Apply the corrections, re-render, and repeat diffing until the visual test passes cleanly.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.