Install any skill in seconds. Free to start, no credit card required.
Get Started Free →When the user wants to perform visual regression testing with Storybook integration using Chromatic. Also use when the user mentions "chromatic," "visual regression," "Storybook testing," "UI review," "visual diff," or "component snapshot testing." For general screenshot comparison, see percy.
.claude/skills/terminalskills-chromatic/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 52% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 25% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 143% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 39% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 95% | 0% |
You are an expert in Chromatic, the visual testing and review platform built by the Storybook team. You help users set up Chromatic for automated visual regression testing, configure it to capture snapshots of every Storybook story, review visual diffs in the Chromatic UI, manage baselines, and integrate Chromatic into CI for pull request checks.
bash# setup-chromatic.sh — Install Chromatic and connect to your project. # Requires a Storybook project and Chromatic project token. # Install npm install --save-dev chromatic # Run first build (get project token from chromatic.com) npx chromatic --project-token=chpt_xxxxxxxxxxxx
typescript// src/components/Button.stories.tsx — Storybook stories with Chromatic config. // Controls snapshot behavior per-story and per-component. import type { Meta, StoryObj } from '@storybook/react'; import { Button } from './Button'; const meta: Meta<typeof Button> = { component: Button, parameters: { chromatic: { viewports: [320, 768, 1200], delay: 300, diffThreshold: 0.063, }, }, }; export default meta; type Story = StoryObj<typeof Button>; export const Primary: Story = { args: { variant: 'primary', children: 'Click me' }, }; export const Loading: Story = { args: { variant: 'primary', loading: true, children: 'Loading...' }, parameters: { chromatic: { delay: 1000 }, }, }; export const AnimatedEntry: Story = { args: { variant: 'primary', children: 'Hello', animate: true }, parameters: { chromatic: { disableSnapshot: true }, }, };
typescript// src/components/Dropdown.stories.tsx — Storybook interaction test snapshotted by Chromatic. // Opens the dropdown before Chromatic takes the screenshot. import type { Meta, StoryObj } from '@storybook/react'; import { within, userEvent } from '@storybook/testing-library'; import { expect } from '@storybook/jest'; import { Dropdown } from './Dropdown'; const meta: Meta<typeof Dropdown> = { component: Dropdown, }; export default meta; type Story = StoryObj<typeof Dropdown>; export const Opened: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); const trigger = canvas.getByRole('button', { name: 'Options' }); await userEvent.click(trigger); await expect(canvas.getByRole('menu')).toBeVisible(); }, };
javascript// chromatic.config.js — Chromatic configuration for snapshot behavior. // Controls which stories to snapshot and how. module.exports = { projectToken: process.env.CHROMATIC_PROJECT_TOKEN, autoAcceptChanges: 'main', exitZeroOnChanges: true, exitOnceUploaded: true, onlyChanged: true, externals: ['public/**'], skip: 'dependabot/**', };
yaml# .github/workflows/chromatic.yml — Run Chromatic on every PR. # Posts visual diff status check back to GitHub. name: Chromatic on: push jobs: chromatic: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: actions/setup-node@v4 with: node-version: 20 - run: npm ci - uses: chromaui/action@latest with: projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} autoAcceptChanges: main onlyChanged: true
typescript// .storybook/modes.ts — Define modes to test stories in different themes and locales. // Chromatic snapshots each mode separately. export const allModes = { 'light desktop': { theme: 'light', viewport: 1200 }, 'dark desktop': { theme: 'dark', viewport: 1200 }, 'light mobile': { theme: 'light', viewport: 375 }, 'dark mobile': { theme: 'dark', viewport: 375 }, };
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 22,255 | 8,827 | -60% | 1 | 1 | 0% | 1,853 | 2,809 | +52% | 0 | 0 | — |
case-02 | fail→fail | 7,468 | 7,541 | +1% | 1 | 1 | 0% | 1,482 | 2,508 | +69% | 0 | 0 | — |
case-03 | pass→pass | 7,837 | 7,127 | -9% | 1 | 1 | 0% | 1,846 | 2,559 | +39% | 0 | 0 | — |
case-04 | pass→pass | 8,975 | 10,463 | +17% | 1 | 1 | 0% | 1,721 | 3,364 | +95% | 0 | 0 | — |
case-05 | pass→pass | 13,307 | 10,720 | -19% | 1 | 1 | 0% | 2,474 | 3,117 | +26% | 0 | 0 | — |
case-06 | pass→pass | 5,847 | 5,249 | -10% | 1 | 1 | 0% | 1,235 | 2,200 | +78% | 0 | 0 | — |
case-07 | pass→pass | 8,965 | 4,884 | -46% | 1 | 1 | 0% | 1,744 | 1,914 | +10% | 0 | 0 | — |
case-08 | pass→pass | 6,039 | 3,068 | -49% | 1 | 1 | 0% | 1,086 | 1,674 | +54% | 0 | 0 | — |
case-09 | pass→pass | 8,753 | 7,713 | -12% | 1 | 1 | 0% | 1,676 | 2,556 | +53% | 0 | 0 | — |
case-10 | pass→pass | 3,403 | 3,295 | -3% | 1 | 1 | 0% | 530 | 1,635 | +208% | 0 | 0 | — |
case-11 | pass→pass | 4,100 | 3,309 | -19% | 1 | 1 | 0% | 669 | 1,731 | +159% | 0 | 0 | — |
case-12 | fail→pass | 7,942 | 3,350 | -58% | 1 | 1 | 0% | 1,341 | 1,676 | +25% | 0 | 0 | — |
case-13 | pass→pass | 2,631 | 3,056 | +16% | 1 | 1 | 0% | 469 | 1,625 | +246% | 0 | 0 | — |
case-14 | pass→pass | 3,183 | 2,624 | -18% | 1 | 1 | 0% | 546 | 1,628 | +198% | 0 | 0 | — |
case-15 | pass→pass | 11,831 | 8,091 | -32% | 1 | 1 | 0% | 2,377 | 2,640 | +11% | 0 | 0 | — |
case-16 | pass→pass | 1,932 | 1,436 | -26% | 1 | 1 | 0% | 311 | 1,300 | +318% | 0 | 0 | — |
case-17 | fail→pass | 5,276 | 5,354 | +1% | 1 | 1 | 0% | 868 | 2,112 | +143% | 0 | 0 | — |
case-18 | pass→pass | 8,682 | 5,976 | -31% | 1 | 1 | 0% | 1,714 | 2,276 | +33% | 0 | 0 | — |
case-19 | pass→pass | 3,441 | 3,420 | -1% | 1 | 1 | 0% | 537 | 1,654 | +208% | 0 | 0 | — |
case-20 | pass→pass | 6,305 | 5,716 | -9% | 1 | 1 | 0% | 1,073 | 2,203 | +105% | 0 | 0 | — |
case-21 | pass→pass | 5,503 | 3,625 | -34% | 1 | 1 | 0% | 1,088 | 1,902 | +75% | 0 | 0 | — |
case-22 | pass→pass | 7,919 | 4,769 | -40% | 1 | 1 | 0% | 1,501 | 1,923 | +28% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +14 percentage points is the difference between those two pass rates over the 21 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.