Visual + DOM diff between two recorded sessions at matching trajectory step ids; used for visual regression and replay verification
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-browser-screenshot-diff-c1c4bba3ce31 ,按照其中的说明把「browser-screenshot-diff」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
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.
browser-replay run matches the parent session within tolerance.npx -y ruvector@0.2.25 rvf status <session-id-a>.rvf
npx -y ruvector@0.2.25 rvf status <session-id-b>.rvf
trajectory.ndjson. Build a step-id → (screenshot_path, snapshot_path) map for each.step-id. Steps that exist on only one side are flagged as unmatched and contribute to the divergence score.--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).--mode dom|both): compare the accessibility snapshots node-by-node. Report added / removed / changed nodes with their accessible names.findings.md under a fresh RVF container so the diff itself is replayable.browser-sessions under both source ids' tags so future searches surface "ran a diff against session X".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.