What problem does it solve?
It guides developers through adding, reviewing, and maintaining visual regression coverage in the Sanity monorepo, where three separate Chromatic snapshot sources (Storybook stories, Vitest browser tests, and Playwright e2e) each have distinct setup rules, determinism constraints, and pitfalls that are easy to get wrong.
Core Features & Use Cases
- Story authoring guidance: Explains where to place co-located
*.stories.tsx files, how to reuse *Story.tsx browser-test harnesses, and when to wrap components in TestWrapper for studio context (i18n, workspace, layers).
- Determinism and tagging rules: Covers
parameters.chromatic knobs (delay, diffThreshold, disableSnapshot, modes) and the vrt-only tag convention that keeps regression fixtures out of the Storybook sidebar while retaining snapshot coverage.
- Integration runbooks: Documents the dormant
@chromatic-com/vitest activation steps and the curated opt-in model for Playwright e2e snapshots, including CDP-related pitfalls.
- Use Case: When migrating a component from styled-components to vanilla-extract, use this Skill to add a sentinel story that snapshots the migrated component so visual regressions are caught in the Chromatic PR check.
Quick Start
Ask the assistant to add Chromatic visual regression coverage for a specific component in the Sanity monorepo, and it will create the appropriate co-located story following the harness and determinism conventions.