/playwright-plugin:visual-guardfrom playwright-plugin
Use this skill whenever the user asks for visual regression, screenshot-based UI protection, layout drift detection, or PR-level visual quality checks with Playwright. This skill creates and maintains robust toHaveScreenshot-based tests with deterministic setup and review-friendly outputs. Trigger it for screenshot diff triage, baseline strategy, and deterministic visual test setup.
Ships in playwright-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Purpose: add reliable visual regression coverage using modern Playwright patterns.
For on-the-fly runs without generated test code, always write an evidence report under docs/visual and always create or compare against a baseline under docs/visual/baseline.
Evidence must always be embedded in the report as inline Markdown images, including baseline generation runs.
Evidence basis:
dashboard-overview).Install dependencies before using the import examples in this file:
npm install -D @playwright/test@latest
Do not finish a run without a report that includes embedded screenshots.
expect(page).toHaveScreenshot(...)..png extension and the scope prefix.docs/visual for manual or exploratory visual validation runs.OK, NOK, or NO BASELINE.docs/visual/baseline using a stable prefix that identifies the page or component plus a date-time suffix, for example home-2026-07-29-2215.png or dashboard-overview-2026-07-29-2215.png.1920x1080 and prefer fullPage: true for the screenshot assertion.NO BASELINE, embed at least the new capture and clearly mark it as the first baseline reference.OK or NOK, embed at least:
docs/visual.docs/visual/visual-evidence-<scope>-<timestamp>.mddocs/visual/runs/<scope>/<timestamp>/docs/visual/baseline/<scope>-<timestamp>.pngReference: references/baseline-comparison-reporting.md.
playwright-cli open <url> --browser=chrome).--browser=chromium).npx playwright test visual runs for baseline and comparison over ad hoc scripts.Reference: references/preflight-and-recovery.md.
import { test, expect } from '@playwright/test';
test('dashboard visual baseline @visual', async ({ page }) => {
await page.setViewportSize({ width: 1920, height: 1080 });
await page.goto('/dashboard');
await expect(page.getByRole('heading', { name: 'Dashboard' })).toBeVisible();
await expect(page).toHaveScreenshot('dashboard.png', {
fullPage: true,
});
});
1920x1080.Reference: references/assertions-waiting.md for concrete waiting strategies. Reference: references/request-mocking.md for stable mocked fixture data.
When a visual test fails:
When execution fails before comparison:
Reference: references/preflight-and-recovery.md.
tests/data/*.json or typed fixture modules).tests/types/*.ts) and import them across tests/fixtures.npx playwright test --grep @visual
Provide:
docs/visual.docs/visual/baseline when applicable.NO BASELINE, OK, NOK).| Task | Reference |
|---|---|
| Concrete waiting strategies for UI readiness | references/assertions-waiting.md |
| Stable mocked fixture data for determinism | references/request-mocking.md |
| Suite config, @visual tag, and CI setup | references/test-suite-structure.md |
| Page Object Model for reusable setup steps | references/page-object-model.md |
| Locator strategy and anti-patterns | references/locators.md |
| Trace captures for failure debugging | references/tracing.md |
| Plan -> generate -> heal workflow for robust tests | references/test-generation.md |
| Reusable test data and shared type organization | references/test-data-and-types.md |
| Baseline/current/diff reporting contract with embedded screenshots | references/baseline-comparison-reporting.md |
| Playwright-native screenshot comparison and naming rules | references/playwright-native-comparison.md |
| Preflight checks and failure recovery checklist for visual runs | references/preflight-and-recovery.md |
references/assertions-waiting.md (opens in a new tab)references/baseline-comparison-reporting.md (opens in a new tab)references/locators.md (opens in a new tab)references/page-object-model.md (opens in a new tab)references/playwright-native-comparison.md (opens in a new tab)references/preflight-and-recovery.md (opens in a new tab)references/request-mocking.md (opens in a new tab)references/test-data-and-types.md (opens in a new tab)references/test-generation.md (opens in a new tab)references/test-suite-structure.md (opens in a new tab)references/tracing.md (opens in a new tab)references/visual-evidence.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
5 skills in this plugin
/a11y-sentinelUse this skill whenever the user asks for accessibility testing, a11y audits in pull requests, semantic locator hardening, or prevention of usability regressions in frontend flows. This skill implements Playwright-based accessibility checks and integrates automated axe-core audits into repeatable tests. Trigger it for any request mentioning WCAG concerns, keyboard navigation, aria issues, or CI accessibility gates./dynamic-mockerUse this skill whenever the user needs frontend testing without a ready backend, intent-based API stubbing, dynamic test data generation, request interception, or reproducible network scenarios with Playwright. This skill designs and implements route-level mocking using page.route and route.fulfill patterns and validates mocked behavior with Playwright tests. Trigger this skill for any request to intercept APIs, fake responses, force error states, or make flaky network behavior deterministic./exploratory-testgenUse this skill whenever the user asks for exploratory functional testing, browser-based discovery, UI flow validation, fast health checks before automation, or a test plan proposal for a frontend. This skill performs non-invasive discovery, proposes a plan for approval, executes approved exploratory flows with Playwright (Chrome preferred, Chromium fallback), captures flow evidence screenshots, and writes a final report in docs/testing. Trigger it for rapid product health checks before formal automation.Generated from the plugin's indexed repository (charlyautomatiza/playwright-plugin) — no native marketplace selected
npx claudepluginhub p/charlyautomatiza-playwright-plugin