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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
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-replayrun matches the parent session within tolerance. - Comparing two A/B variants of the same form flow.
Steps
- 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 - Load both trajectories from
trajectory.ndjson. Build astep-id → (screenshot_path, snapshot_path)map for each. - Pair steps by
step-id. Steps that exist on only one side are flagged asunmatchedand contribute to the divergence score. - Pixel diff (
--mode pixel|both): compare the two PNGs at each step. Reportmse,psnr, and the bounding box of the largest diff cluster. Threshold default0.02(2% of pixels). - DOM diff (
--mode dom|both): compare the accessibility snapshots node-by-node. Report added / removed / changed nodes with their accessible names. - Aggregate similarity: weighted average across matched steps, weighted by step duration. Verdict goes into a new
findings.mdunder a fresh RVF container so the diff itself is replayable. - Persist the diff verdict in
browser-sessionsunder 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_diffMCP tool is not planned (ADR-0001 §7); the skill operates against locally-saved RVF artifacts and usesbrowser_evalonly 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
Comments
- …
More skills from this repository
agent-adaptive-coordinator
81kHelps your agent split and rebalance a group of AI agents as the workload changes, choosing a layout that fits the task.
agent-agent
81kTeaches your agent to turn a big goal into an ordered plan of actions, and to replan when conditions change.
agent-agentic-payments
81kHelps your agent manage spending mandates for AI shopping, with spend caps, time windows, merchant rules and signed approvals.
agent-analyze-code-quality
81kHelps your agent review code for quality, finding code smells, technical debt and refactoring ideas without changing the files.
Similar skills
test-driven-development
311kTeaches your agent to write a failing test first, watch it fail, then write the smallest code that passes, before building any feature or fix.
verification-before-completion
311kTeaches your agent to run real checks and read their output before claiming that a task, fix, or build is complete or passing.
migrate-to-shoehorn
310kReplaces risky type casts in your test files with the shoehorn library, so tests can use partial data and still pass type checks.