Skip to content
Skillpedia
Testing81k · #1582

browser-screenshot-diff

What it does

This skill compares two recorded browser sessions, pairing steps by ID and checking screenshots and page structure. It is for testers who need to spot visual or content changes between runs.

When to use it

  • ✓When a UI change should not have altered how the page looks.
  • ✓When you want to confirm a replayed run matches the original.
  • ✓When you want to compare two versions of the same form flow.

Skill link

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-browser/skills/browser-screenshot-diff/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-browser/skills/browser-screenshot-diff/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Compare the recording from before the redesign with the one after it, and show me where the pages differ.”

5 new skills a week. 1 minute to read.

How it works

The agent pairs the steps of both sessions, compares the screenshots and the page structure at each step, and reports the first difference and an overall similarity score.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Browser Screenshot Diff

Compare two recorded sessions step-by-step. Pairs each step in session A to the same step-id in session B, diffs the captured screenshot and accessibility snapshot, reports the first divergence and an aggregate similarity score.

When to use

  • Visual regression after a UI change (record before, record after, diff).
  • Verifying a browser-replay run matches the parent session within tolerance.
  • Comparing two A/B variants of the same form flow.

Steps

  1. Locate both RVF containers:
    npx -y ruvector@0.2.27 rvf status <session-id-a>.rvf
    npx -y ruvector@0.2.27 rvf status <session-id-b>.rvf
    
  2. Load both trajectories from trajectory.ndjson. Build a step-id → (screenshot_path, snapshot_path) map for each.
  3. Pair steps by step-id. Steps that exist on only one side are flagged as unmatched and contribute to the divergence score.
  4. Pixel diff (--mode pixel|both): compare the two PNGs at each step. Report mse, psnr, and the bounding box of the largest diff cluster. Threshold default 0.02 (2% of pixels).
  5. DOM diff (--mode dom|both): compare the accessibility snapshots node-by-node. Report added / removed / changed nodes with their accessible names.
  6. Aggregate similarity: weighted average across matched steps, weighted by step duration. Verdict goes into a new findings.md under a fresh RVF container so the diff itself is replayable.
  7. Persist the diff verdict in browser-sessions under both source ids' tags so future searches surface "ran a diff against session X".

Caveats

  • Pixel diff is sensitive to font hinting, antialiasing, and scrollbar position. Keep viewport pinned across both sessions.
  • DOM diff over Playwright's accessibility tree is more stable than HTML diff. Prefer it.
  • This skill does not handle dynamic content (clocks, ads); add ignore regions to the field map or pre-process snapshots before diffing.
  • The browser_screenshot_diff MCP tool is not planned (ADR-0001 §7); the skill operates against locally-saved RVF artifacts and uses browser_eval only for live verification.
FAQ

What does it compare?

It compares screenshots pixel by pixel and the page structure node by node.

What if a step exists in only one session?

The skill flags it as unmatched and counts it against the similarity score.

Where does the result go?

The skill writes a findings report inside the session container.

Details

Original description by the author

Visual + DOM diff between two recorded sessions at matching trajectory step ids; used for visual regression and replay verification

repo: ruvnet/ruflo

Popularity

GitHub stars
81k
Ranking position
#1582
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills