Visual Regression on PRs is a testing workflow that chains Playwright + GitHub to automate a common task. Playwright captures screenshots of key pages on every PR and diffs them against the baseline. Regressions block merge. Once configured, it saves ~10 hours/week of manual QA clicking, plus prevention of 3-5 visual bugs per sprint and runs through Claude Code, Cursor, Windsurf or any MCP-compatible AI agent.
Playwright captures screenshots of key pages on every PR and diffs them against the baseline. Regressions block merge.
Hosted execution needs every MCP on the whitelist. Use the local CLI for this recipe until the missing MCPs are added.
Not yet hostable:
mcpizy recipe install playwright-github-visual-regressionPlaywright can headlessly screenshot every important page in your app; GitHub can hold those screenshots as artifacts and block merges when diffs exceed a threshold. Together they act as an always-on visual QA reviewer that catches unintended CSS or layout regressions before users do.
Someone manually clicks through the app after each deploy and notices a broken layout two days later from a user complaint.
Every PR automatically screenshots every key page, diffs against the baseline, and blocks merge if pixels changed beyond tolerance.
Concrete ROI — not marketing fluff.
Time saved
~10 hours/week of manual QA clicking, plus prevention of 3-5 visual bugs per sprint
This prompt is the workflow. Paste into Claude Code, Cursor, or Windsurf.
You are a visual regression agent. Runs on every PR opened or updated. Given the preview deployment URL and a list of routes (from routes.json): 1. For each route, call playwright.browser_navigate(url) then playwright.browser_take_screenshot(fullPage=true) 2. Compare each screenshot against baselines/<route>.png via pixel diff (tolerance: 0.1%) 3. If diff > threshold, upload diff image to GitHub as a workflow artifact 4. Call github.add_pr_comment with a table: route | diff% | baseline | current | diff-image 5. If any route fails, call github.create_status(state="failure", context="visual-regression") to block merge 6. On merge to main: call playwright.browser_take_screenshot for all routes and overwrite baselines Always run headless. Use device emulation for mobile routes.
How this workflow fires and what env vars you need.
POST /webhook/github (events: pull_request synchronize, pull_request merged to main)
PLAYWRIGHT_BASE_URLBase URL for previews (falls back to preview URL from PR comment)
e.g. https://pr-123.preview.example.com
Install everything — MCPs, prompt, env template — in a single call.
$ mcpizy recipe install playwright-github-visual-regression ✓ Installs all 2 MCP servers ✓ Writes prompt to ~/.mcpizy/prompts/playwright-github-visual-regression.md ✓ Generates .env.example in current directory ✓ Ready to paste into Claude Code
Requires mcpizy CLI v1.1+ — install via npm i -g mcpizy.
$ mcpizy install playwright && mcpizy install githubTests run on every push. Failures post a Slack message with the failing test name, screenshot, and a link to the run.
Run your test suite across Chrome, Firefox, Safari, and Edge on BrowserStack automatically when a PR is opened.
SonarQube analyzes every PR for code smells, coverage drops, and security hotspots. PRs below the quality gate are blocked.
Visual Regression on PRs is a testing automation that uses Playwright + GitHub together via the Model Context Protocol. Playwright captures screenshots of key pages on every PR and diffs them against the baseline. Regressions block merge.
Setup takes around 20 min setup, catches regressions on every PR. You install the required MCP servers with `mcpizy install playwright && mcpizy install github`, connect your accounts, and the workflow is ready to run.
Once running, this workflow saves ~10 hours/week of manual QA clicking, plus prevention of 3-5 visual bugs per sprint. The concrete business value: Catches 80% of CSS regressions before production — saves $2-5k per embarrassing visual bug that hits customers; Frees 1-2 QA engineers from manual click-testing to focus on complex flows and edge cases.
You need 2 MCP servers: Playwright (mcpizy install playwright), GitHub (mcpizy install github). All are installable in one command via the MCPizy CLI and configured in your `.claude.json` or `.cursor/mcp.json`.
Yes. The workflow runs with any MCP-compatible AI agent — Claude Code, Claude Desktop, Cursor, Windsurf, VS Code with Copilot, and custom agents built on the MCP SDK. The MCP servers are identical across clients; only the config file path (`.claude.json` vs `.cursor/mcp.json`) changes.
Install the required MCPs from the marketplace and automate this in 20 min setup.
$ mcpizy install playwright && mcpizy install github
Free to install. Connect your accounts and this workflow runs itself.