browser-screenshot-diff
できること
このスキルは、2つの記録済みセッションをステップIDで対応付け、スクリーンショットとページの構造を比較します。実行の間で、見た目や内容の変化を見つけたいテスター向けです。
使う場面
- ✓UIの変更で、ページの見た目が変わるはずでないとき。
- ✓再生した実行が元の記録と一致するか確認したいとき。
- ✓同じフォームのフローの2つのバージョンを比べたいとき。
スキルのリンク
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-browser/skills/browser-screenshot-diff/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“リニューアル前の記録と後の記録を比較して、ページがどこで異なるかを見せてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは両方のセッションの手順を対応付け、各ステップのスクリーンショットとページの構造を比べます。最初の違いと、全体の類似度スコアを報告します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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.
よくある質問
何を比較しますか?
スクリーンショットはピクセル単位で、ページの構造はノードごとに比較します。
片方のセッションにしかないステップはどうなりますか?
スキルは対応しないステップとして印を付け、類似度スコアに減点として加えます。
結果はどこに保存されますか?
スキルは、セッションのコンテナー内に検証結果のレポートを書き出します。
詳細
作者による元の説明
Visual + DOM diff between two recorded sessions at matching trajectory step ids; used for visual regression and replay verification
repo: ruvnet/ruflo
人気
- GitHubのスター
- 81k
- ランキング
- #1582
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
agent-adaptive-coordinator
81k作業量の変化に合わせて、エージェントのグループを分割し、再配分する手助けをします。作業に合った配置を選びます。
agent-agent
81k大きな目標を順番に並んだ行動計画にし、状況が変わったときに計画を立て直す方法をエージェントに教えます。
agent-agentic-payments
81kAIの買い物のために、支出の上限、期間、販売店のルール、署名付きの承認を含む支出の委任を管理する手助けをします。
agent-analyze-code-quality
81kコードの品質を確認し、コードの臭い、技術的負債、リファクタリングの案を見つける手助けをします。ファイルは変更しません。
似ているスキル
test-driven-development
311k機能や修正を作る前に、まず失敗するテストを書き、それが失敗するのを確認してから、合格させる最小のコードを書くようエージェントに教えます。
verification-before-completion
311kタスク、修正、ビルドが完了した、または合格したと主張する前に、実際のチェックを実行し、その出力を読むようエージェントに教えます。
migrate-to-shoehorn
310kテストファイル内の危険な型キャストを、shoehornライブラリに置き換え、テストが部分的なデータを使いつつ型チェックを通るようにします。