Chuyển đến nội dung
Skillpedia
Kiểm thử81k · #1582

browser-screenshot-diff

Skill này làm gì

Skill này so sánh hai phiên trình duyệt đã ghi, ghép các bước theo ID và kiểm tra ảnh màn hình cùng cấu trúc trang. Phù hợp với người kiểm thử cần tìm thay đổi về giao diện hoặc nội dung giữa các lần chạy.

Khi nào nên dùng

  • ✓Khi một thay đổi giao diện không được làm thay đổi cách trang trông.
  • ✓Khi bạn muốn xác nhận một lần chạy đã phát lại khớp với bản gốc.
  • ✓Khi bạn muốn so sánh hai phiên bản của cùng một luồng biểu mẫu.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-browser/skills/browser-screenshot-diff/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“So sánh bản ghi trước khi thiết kế lại với bản sau khi thiết kế lại, và cho tôi biết các trang khác nhau ở đâu.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent ghép các bước của cả hai phiên, so sánh ảnh màn hình và cấu trúc trang ở từng bước, rồi báo cáo khác biệt đầu tiên và điểm tương đồng tổng thể.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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.
Câu hỏi thường gặp

Nó so sánh những gì?

Skill so sánh ảnh màn hình theo từng điểm ảnh và cấu trúc trang theo từng nút.

Nếu một bước chỉ có trong một phiên thì sao?

Skill đánh dấu nó là không khớp và tính vào điểm tương đồng.

Kết quả được lưu ở đâu?

Skill ghi báo cáo phát hiện bên trong container của phiên.

Chi tiết

Mô tả gốc của tác giả

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

repo: ruvnet/ruflo

Độ phổ biến

Sao GitHub
81k
Vị trí xếp hạng
#1582
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự