playwright-ux-ui-capture

Capture Playwright screenshots and request JSON artifacts for Next.js routes across three viewports.

2.1k|244|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/raphaelmansuy/edgequake --skill playwright-ux-ui-capture-raphaelmansuy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-ux-ui-capture
Source: https://github.com/raphaelmansuy/edgequake/tree/main/.github/skills/playwright-ux-ui-capture
Command: npx skills add https://github.com/raphaelmansuy/edgequake --skill playwright-ux-ui-capture-raphaelmansuy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @playwright/test, and includes scripts (resource) components.

What problem does it solve? Manually screenshotting every page of a Next.js web UI at multiple viewport sizes is slow and error-prone, and teams often lose track of which routes were captured and whether they succeeded. This Skill automates Playwright E2E capture so every route produces screenshots, per-page request JSON, and an auditable capture index written immediately to disk. ## Core Features & Use Cases - Automated Route Discovery: Derives concrete routes from Next.js App Router page.tsx files, skipping route groups and dynamic segments that cannot be captured without fixture data. - Multi-Viewport Screenshots: Captures desktop (1440px), tablet (768px), and mobile (375px) screenshots per route into ux_ui_map/screenshots/. - Immediate Artifact Write-Out: Writes per-page request JSON and appends a JSONL line to capture-index.jsonl for every route, including failure states with ok:false. - Use Case: When updating the EdgeQuake WebUI, run the capture spec to regenerate a complete visual map of all pages at three breakpoints, then review the capture index to spot 404s or auth-blocked routes. ## Quick Start Ask the AI to run the Playwright UX/UI capture for the EdgeQuake WebUI routes and write screenshots plus the capture index to the ux_ui_map directory.

Frequently Asked Questions about playwright-ux-ui-capture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I capture screenshots of all Next.js pages with Playwright?

Enumerate concrete routes from page.tsx files under the App Router directory, then run a Playwright spec that visits each route and writes screenshots per viewport. The included derive_routes.mjs script outputs the route list as JSON or JSONL.

How to run a single Playwright E2E spec instead of the full suite?

Run npx playwright test e2e/<spec>.spec.ts from the edgequake_webui directory to execute one spec file. This is the preferred approach while iterating on capture logic before running the full npm run test:e2e suite.

Can Playwright capture Next.js dynamic routes like [id] pages?

Dynamic segments such as [param], [...param], and [[...param]] cannot be captured without fixture data, so the route discovery script skips them. Only concrete static routes derived from page.tsx files are included.

Why should I avoid waitForLoadState networkidle in Playwright tests?

networkidle is unreliable as a primary sync because long-polling or background requests can prevent the network from ever going idle. Prefer Playwright auto-waits plus a stable page-ready signal such as a visible main or h1 element.

What happens when a route returns 404 during screenshot capture?

The capture still writes a line to capture-index.jsonl with ok set to false and stores a screenshot of the error state. This keeps the artifact record complete so failures are visible during review.