Skill Detail

Puppeteer Screenshot Diff Engine

Visual regression testing using Puppeteer page.screenshot() with pixelmatch comparison. Leverages CDP sessions via page.createCDPSession() for precise viewport emulation and network throttling.

Browser AutomationClaude Code
Browser Automation Claude Code Security Reviewed
Tool match: puppeteer โญ 94.1k GitHub stars โฌ‡ 40.2M/wk npm Apache-2.0 license
INSTALL WITH ANY AGENT
npx skills add agentskillexchange/skills --skill puppeteer-screenshot-diff-engine Copy
Works best when you want a reusable capability, not another fragile one-off prompt.
At a glance
Author
Puppeteer
Last updated
Mar 24, 2026
Quick brief

The Puppeteer Screenshot Diff Engine automates visual regression testing by capturing page screenshots through Puppeteer’s page.screenshot({ fullPage: true }) API and comparing them pixel-by-pixel using the pixelmatch library with configurable threshold values.

How it works

What this skill actually does

It establishes Chrome DevTools Protocol sessions via page.createCDPSession() to precisely control device emulation through Emulation.setDeviceMetricsOverride and simulate network conditions with Network.emulateNetworkConditions. This ensures screenshots are captured under reproducible conditions across CI runs.

The engine supports baseline management with automatic golden image updates, generates HTML diff reports highlighting changed regions with bounding boxes, and integrates with page.waitForSelector() and page.waitForNetworkIdle() to ensure pages are fully rendered before capture. It handles dynamic content by masking regions through CSS injection via page.addStyleTag().