/uiverify:economical-visual-testsfrom UI Verify
Authors visual tests that maximize coverage per billable snapshot using gallery/matrix stories and data-driven states. Cuts snapshot count from N stories to one per variant matrix.
Ships in UI Verify. 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.
None: SKILL.md is the whole skill.
Every per-snapshot visual tool — UI Verify, Chromatic, Percy, Playwright screenshots — renders and bills per story. So the number of stories is the cost and the noise surface. The naive pattern (one story per variant × state × theme) multiplies both fast: a component with 5 sizes × 3 states × 2 themes is 30 snapshots the naive way. This skill collapses that to a handful while keeping full coverage.
The technique is tool-agnostic; the payoff (fewer billed shots, fewer places to flake) is the same everywhere.
Render the whole matrix together in a single story: a grid of every size/state side by side. One snapshot then covers the entire matrix.
// Button.stories.tsx — ONE story covers every size × variant
export const AllVariants = () => (
<div style={{ display: 'grid', gap: 16, gridTemplateColumns: 'repeat(3, max-content)' }}>
{(['sm', 'md', 'lg'] as const).flatMap((size) =>
(['primary', 'secondary', 'danger'] as const).map((variant) => (
<Button key={`${size}-${variant}`} size={size} variant={variant}>
{size}/{variant}
</Button>
)),
)}
</div>
);
9 buttons, 1 snapshot instead of 9.
For a component that normally fetches, don't write a story per response state. Render each state from a fixed fixture — a table of props/mock-responses — in one story. Deterministic input in, deterministic pixels out, many states, few shots.
const CASES = [
{ label: 'empty', items: [] },
{ label: 'one', items: [fixtures.one] },
{ label: 'many', items: fixtures.many },
{ label: 'error', error: 'Failed to load' },
];
export const AllStates = () => (
<div style={{ display: 'grid', gap: 24 }}>
{CASES.map((c) => (
<section key={c.label}>
<h4>{c.label}</h4>
<List items={c.items} error={c.error} />
</section>
))}
</div>
);
(If the component fetches internally rather than taking props, mock the request instead — see
storybook-visual-testing, "mock data." The point is the same: fixtures, not N stories.)
Consolidating into one snapshot is coarser granularity: a diff anywhere in the gallery flags the whole story, and you lose the per-variant baseline/accept. So this is a balance, not "merge everything":
When you refactor, state the delta so the value is legible:
This collapses 28 stories → 2 snapshots (the size×variant×theme matrix into one gallery, the four data states into one story). ~93% fewer billed shots, same coverage.
Loading, Empty, Error, Loaded as four stories) → one
data-driven story (move 2).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
visual-testing, snapshot-cost, storybook, test-optimization, chromatic, percy
npx claudepluginhub uiverify/uiverify --plugin uiverify10 skills in this plugin
/bun-visual-testingMake @uiverify/bun captures deterministic so Bun visual tests (bun test driving Chrome through Bun.WebView) stop coming back "changed" without a real change (flaky diffs). Use when setting up or debugging visual tests written with @uiverify/bun, on a real page of your running app (run() with webServer) or on a component page served by serveBundle(). Focuses only on the run-to-run variation the SDK can't neutralize from outside your app — above all live/dynamic data, the highest-value step (freeze it with fixtures or page.route and the whole content-noise class disappears), plus the clock, infinite JS animations, non-Math.random randomness, fonts a measuring component reads before they load, and the Bun-specific setup traps./check-visual-changesCheck the visual impact of an edit mid-task with `uiverify check` — render just the components you're touching on the UI Verify fleet and diff them against the real CI baseline, without opening a PR, posting a check, or moving a baseline. Works for every capture method (Storybook, Playwright, Vitest and Bun archives, and raw screenshots). Use when a coding agent has changed UI and wants a fast, authoritative "would this pass" answer before pushing — "check my visual changes", "did I break anything visually", "preview this diff", "run uiverify check". Hands off to triage-visual-changes for the pixel review./implement-figma-designImplement a Figma design (a Figma frame link or an exported PNG) in code as a Storybook story (or a Vitest browser-mode test) and converge the render to it using UI Verify as the source of truth. Declare the design as the story's baseline (`parameters.uiVerify.baselineImage`), build, upload, then converge SECTION BY SECTION from the top of the page down - reading UI Verify's localized diff and measuring the baseline/candidate pixels (never your own screenshots), fixing one section per upload until it is locked, then moving down. Stop at the minimum WITHOUT accepting - accepting rebases the baseline off the design. Use when building a page/component to match a provided design image, e.g. "implement this Figma", "build this design", "match the mockup", "reproduce this landing page and make the diff go away", "close the design-baseline diff". Not for accept/deny triage of a normal regression build (that is triage-visual-changes)./making-ui-changesRead before changing any component, page, or styles. Six moves to change UI without silently breaking another screen - pick up open review notes, reuse before you create, cover every state, check the blast radius, prove it with a visual test, kill flake at the source./playwright-visual-testingMake @uiverify/playwright (archive-replay) captures deterministic so real-page visual tests stop coming back "changed" without a real change (flaky diffs). Use when driving a real page — your app under test, a staging build, or live production — and the diff flakes. A symptom-to-lever checklist for the run-to-run variation you probably have - feature flags, live data, the clock, third-party widgets, and dynamic layouts. The lever is almost always "stop the variation at record time" — the archive bakes in whatever the page was./setup-visual-testingSet up UI Verify visual regression testing in a repo end to end — pick the capture path the same way the one-line setup does (Storybook stories, a Playwright suite, Bun visual tests, Vitest browser-mode component tests, or uploaded screenshots), install the uiverify CLI and wire it into CI, and author the first stories the economical, deterministic way from the start. Use when adding visual/screenshot regression testing to a project for the first time, wiring UI Verify into CI, or onboarding a repo that has no visual tests yet.Other plugins' skills for the same job