agentleFS
imMamdouhaboammarimMamdouhaboammar/Mimera/.agents/skills/visual-verification/SKILL.md

visual-verification

Skill1 starsChanged 32 days agoMITView on GitHub

Automated Playwright computer-vision inspection and verification skill for Mimera. Captures side-by-side screenshots between reference URL and local build, calculates structural edge similarity (Sobel MSE), color histogram correlation, and pixel diffs, generates heatmap overlays, and enforces the strict +90% parity gate.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 3

    Distinctive

    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:

    Before capturing, execute DOM opacity normalization to prevent false positives from asynchronous video frames or canvas animations:

    line 18
  2. Distinctive:

    Update CSS with exact extracted values.

    line 49
  3. Very specific:

    Check element bounding boxes using MCP tool visual.measure_geometry.

    line 51
  4. Distinctive:

    Ensure semi-transparent background text or infinite keyframe marquees are present.

    line 54

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “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 Verification Skill

This skill governs the automated computer-vision inspection phase of the Mimera reference engineering loop.

Core Mandates

  1. Side-by-Side Dual Viewport Capture:
    • Capture reference URL and target URL under identical coordinates:
      • Desktop: 1440 x 900
      • Mobile: 390 x 844
    • Capture increments: 0px (Hero/Navbar), 700px, 1400px, 2100px, 2800px, 3500px, 4200px.
  2. Dynamic Noise Normalization:
    • Before capturing, execute DOM opacity normalization to prevent false positives from asynchronous video frames or canvas animations:
      document.querySelectorAll('iframe, video, canvas').forEach(el => el.style.opacity = '0.3');
  3. Triple-Metric Parity Scoring:
    • Structural Edge Score (65% weight): Sobel gradient filtering and edge MSE calculation.
    • Pixel Match Score (25% weight): Raw RGBA pixel difference matching.
    • Color Histogram Score (10% weight): 48-bin RGB color distribution correlation.
  4. Veto Gates:
    • Max element displacement > 50px = AUTOMATIC VETO (LAYOUT_DISPLACEMENT_EXCEEDED).
    • Missing critical element = AUTOMATIC VETO (CRITICAL_ELEMENT_MISSING).
    • Overall score < 90.0% = FAILED BUILD (NEEDS_REVISION).

CLI Execution

# Execute full multi-viewport audit
bun mimera simulate --reference <reference-url> --target <target-url> --threshold 90

# Or execute with custom output directory
bun mimera simulate --reference <reference-url> --target http://localhost:5173/ --output .mimera/visual-audit --threshold 90

Refinement Action Plan When Score < 90%

  1. Check Font Sizes & Line Heights:
    • Inspect the live DOM computed style:
      const s = window.getComputedStyle(element);
      console.log(s.fontSize, s.lineHeight, s.fontWeight);
    • Update CSS with exact extracted values.
  2. Check Margin & Padding:
    • Check element bounding boxes using MCP tool visual.measure_geometry.
    • Correct padding/margin in CSS tokens.
  3. Check Background Marquees & Watermarks:
    • Ensure semi-transparent background text or infinite keyframe marquees are present.
  4. Re-run Audit:
    • Re-run bun mimera simulate until overall score >= 90.0%.

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.