jpskill.com
🛠️ 開発・MCP コミュニティ

visual-regression-testing

Detect unintended visual changes in UI by comparing screenshots across versions. Use for visual regression, screenshot diff, Percy, Chromatic, UI testing, and visual validation.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o visual-regression-testing.zip https://jpskill.com/download/21561.zip && unzip -o visual-regression-testing.zip && rm visual-regression-testing.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/21561.zip -OutFile "$d\visual-regression-testing.zip"; Expand-Archive "$d\visual-regression-testing.zip" -DestinationPath $d -Force; ri "$d\visual-regression-testing.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して visual-regression-testing.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → visual-regression-testing フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
8
📖 Claude が読む原文 SKILL.md(中身を展開)

この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。

Visual Regression Testing

Table of Contents

Overview

Visual regression testing captures screenshots of UI components and pages, then compares them across versions to detect unintended visual changes. This automated approach catches CSS bugs, layout issues, and design regressions that traditional functional tests miss.

When to Use

  • Detecting CSS regression bugs
  • Validating responsive design across viewports
  • Testing across different browsers
  • Verifying component visual consistency
  • Catching layout shifts and overlaps
  • Testing theme changes
  • Validating design system components
  • Reviewing visual changes in PRs

Quick Start

Minimal working example:

// tests/visual/homepage.spec.ts
import { test, expect } from "@playwright/test";

test.describe("Homepage Visual Tests", () => {
  test("homepage matches baseline", async ({ page }) => {
    await page.goto("/");

    // Wait for images to load
    await page.waitForLoadState("networkidle");

    // Full page screenshot
    await expect(page).toHaveScreenshot("homepage-full.png", {
      fullPage: true,
      maxDiffPixels: 100, // Allow small differences
    });
  });

  test("responsive design - mobile", async ({ page }) => {
    await page.setViewportSize({ width: 375, height: 667 }); // iPhone SE
    await page.goto("/");

    await expect(page).toHaveScreenshot("homepage-mobile.png");
  });

  test("responsive design - tablet", async ({ page }) => {
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

Guide Contents
Playwright Visual Testing Playwright Visual Testing
Percy Visual Testing Percy Visual Testing
Chromatic for Storybook Chromatic for Storybook
Cypress Visual Testing Cypress Visual Testing
BackstopJS Configuration BackstopJS Configuration
Handling Dynamic Content Handling Dynamic Content
Testing Responsive Components Testing Responsive Components

Best Practices

✅ DO

  • Hide or mock dynamic content (timestamps, ads)
  • Test across multiple viewports
  • Wait for animations and images to load
  • Use consistent viewport sizes
  • Disable animations during capture
  • Test interactive states (hover, focus)
  • Review diffs carefully before approving
  • Store baselines in version control

❌ DON'T

  • Test pages with constantly changing content
  • Ignore small legitimate differences
  • Skip responsive testing
  • Forget to update baselines after design changes
  • Test pages with random data
  • Use overly strict thresholds (0% diff)
  • Skip browser/device variations
  • Commit unapproved diffs

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。