本文へ移動
cccskills
無料GitHub で公開日本語紹介

before-and-after

Webページや画像の変更前後を同じ条件で撮影し、画面の差を比べるためのスクリーンショットと、必要に応じて共有用Markdownを作成します。

原文原文の説明を見る

Captures before/after screenshots of web pages or elements for visual comparison. Use when user says "take before and after", "screenshot comparison", "visual diff", "PR screenshots", "compare old and new", or needs to document UI changes. Accepts two URLs (file://, http://, https://) or two image paths.

michaelshimeles/rstackスター 1,392(GitHub 1,392 + cccskills 0)
連携ツールGitHubVercel

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • UI変更の前後を比較したいとき
  • PR用の画面比較資料を作りたいとき
  • 特定のページ要素だけ撮影したいとき
  • モバイル表示の変更を確認したいとき

日本語での紹介

できること

WebページのURLを2つ指定して、変更前と変更後のスクリーンショットを撮影し、画面の変化を確認できます。手元にある画像ファイル2つから比較することもできます。CSSセレクターを指定して特定の要素だけを撮影したり、モバイル・タブレット・任意サイズの表示領域で比べたりできます。必要に応じて画像をアップロードし、比較結果をMarkdownの表にまとめます。PRへの追記が作業に含まれる場合は、その本文に比較結果を加えます。

こんなときに便利

UIの変更をレビュー担当者に見せたいときや、修正前後の表示を記録したいときに向いています。デプロイ済みページ同士の比較に加え、すでに撮影した画像ペアの整理にも使えます。画面全体ではなく、対象箇所に絞った比較にも対応します。

使い方の例

  • 「この2つのURLを比較してスクリーンショットを撮ってください」
  • 「変更前後の画像から、PRに貼れるMarkdownを作ってください」
  • 「このページのヒーロー部分をモバイル表示で比較してください」

注意点

@vercel/before-and-after パッケージのCLIまたは npx が必要です。画像アップロードやPRへの追記にはネットワーク接続と、対象に応じた gh CLIなどが必要です。保護されたVercel URLへのアクセスにはCLIによる認証が必要になる場合があります。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(5)

  • SKILL.md4.4 KB
  • LICENSE1.2 KB
  • scripts/adapters/0x0st.sh728 B
  • scripts/adapters/blob.sh1.3 KB
  • scripts/upload-and-copy.sh3.4 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Before-After Screenshot Skill

Package: @vercel/before-and-after Never use before-and-after (wrong package).

Agent Behavior Rules

DO NOT:

  • Switch branches or stash another task's changes. Use an isolated worktree for any baseline server already authorized by the task.
  • Use --full unless user explicitly asks for full page / full scroll capture

DO:

  • Use --markdown when user wants PR integration or markdown output
  • Use --mobile / --tablet if user mentions phone, mobile, tablet, responsive, etc.
  • Reuse before captures, baseline URLs, and revision information already established in the task. Confirm that they show the relevant behavior and match the after capture's viewport and starting state.
  • Treat the current state as after only when the task context establishes it. If the before state remains ambiguous after checking available context, ask for the missing baseline. Do not ask again for a URL when a valid image pair or earlier baseline is already available.

Capture and delivery

  1. Use an installed before-and-after CLI or npx @vercel/before-and-after.
  2. For remote URLs, check access when needed. A 401/403 indicates protection. Existing image pairs do not require a URL or deployment access check.
  3. Capture missing images with before-and-after "<before-url>" "<after-url>".
  4. When the task calls for uploaded evidence or PR markdown, run before-and-after before.png after.png --markdown once. For local capture requests, deliver the files without uploading them.
  5. Append the markdown to the PR when PR integration is part of the task.

Resolve bundled script paths relative to this skill's directory, not the project working directory. Reuse earlier evidence instead of recapturing it.

Quick Reference

# Basic usage
before-and-after <before-url> <after-url>

# With selector
before-and-after url1 url2 ".hero-section"

# Different selectors for each
before-and-after url1 url2 ".old-card" ".new-card"

# Viewports
before-and-after url1 url2 --mobile    # 375x812
before-and-after url1 url2 --tablet    # 768x1024
before-and-after url1 url2 --full      # full scroll

# From existing images
before-and-after before.png after.png --markdown

# Via npx (use full package name!)
npx @vercel/before-and-after url1 url2
FlagDescription
-m, --mobileMobile viewport (375x812)
-t, --tabletTablet viewport (768x1024)
--size <WxH>Custom viewport
-f, --fullFull scrollable page
-s, --selectorCSS selector to capture
-o, --outputOutput directory (default: ~/Downloads)
--markdownUpload images & output markdown table
--upload-url <url>Custom upload endpoint (default: 0x0.st)

Image Upload

# Default (0x0.st - no signup needed)
./scripts/upload-and-copy.sh before.png after.png --markdown

Vercel Deployment Protection

If .vercel.app URL returns 401/403:

  1. Check Vercel CLI: which vercel && vercel whoami
  2. If available: vercel inspect <url> to get bypass token
  3. If not: Tell user to provide bypass token, take manual screenshots, or disable protection

PR Integration

# Check for gh CLI
which gh

# Get current PR
gh pr view --json number,body

# Write the existing body plus the comparison to a temporary file, then:
gh pr edit <number> --body-file /path/to/pr-body.md

If no gh CLI: output markdown and tell user to paste manually.

Error Reference

ErrorFix
command not foundnpm install -g @vercel/before-and-after
could not determine executableUse npx @vercel/before-and-after (full name)
401/403 on .vercel.appSee Vercel protection section
Element not foundVerify selector exists on page

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

code-structure

無料概要あり

複数の機能で重複する処理を整理し、業務ルールを担うアクションと再利用できる処理を担うサービスの分け方や移行手順を示します。

  • 重複した処理を共通化すべきか判断したいとき
  • 業務ルールと共通処理の置き場所を整理したいとき
  • 複数の呼び出し元を段階的にリファクタリングしたいとき
michaelshimeles/rstack1,3922026年10月26日 更新

evidence-driven-testing

無料概要あり

アプリの操作や変更後の動作を確かめ、画面録画やスクリーンショット、測定結果などの証拠をまとめて、指定先に結果を届けます。

  • UI操作を録画して動作を示したいとき
  • GUIなしで画面の状態を検証したいとき
  • APIや性能の変更を数値で確かめたいとき
michaelshimeles/rstack1,3922026年10月26日 更新

greploop

無料概要あり

PRやMRに寄せられたGreptileの指摘を確認し、対象を絞った修正と再レビューを繰り返して、現行リビジョンの評価と未対応事項を整理します。

  • PRのGreptile指摘を修正したいとき
  • MRのレビューを再依頼して確認したいとき
  • Perforceの変更をレビューしたいとき
michaelshimeles/rstack1,3922026年10月26日 更新

greploop-apps

無料概要あり

通常のトリガーで大きなPRを処理できない場合に、`greploop` のワークフローを `@greptile-apps` トリガーで実行する互換用エントリーポイントです。

  • 大きなPRをGreptile Appsで処理したいとき
  • 通常のトリガーで扱えないPRをレビューしたいとき
  • 既存のgreploopワークフローを指定トリガーで実行
michaelshimeles/rstack1,3922026年10月26日 更新

new-feature

無料概要あり

機能追加や修正に着手する前に、作業ごとのGit worktreeとブランチを用意し、既存の担当作業や変更範囲を確認して安全に編集を進めます。

  • 機能追加を専用ブランチで始めたいとき
  • 共有チェックアウトを保って修正したいとき
  • 既存PRとの変更範囲を確認したいとき
michaelshimeles/rstack1,3922026年10月26日 更新

unslop

無料概要あり

コミット文やPR、ドキュメント、返信など、人が読む文章からAIらしい定型表現を取り除き、意味と口調を保ちながら具体的で自然な文に整えます。

  • PR本文を自然な文に整えたいとき
  • コミットメッセージを推敲したいとき
  • ドキュメントの定型表現を減らしたいとき
michaelshimeles/rstack1,3922026年10月26日 更新

michaelshimeles のスキルをすべて見る

このスキルの問題を報告する