Official agent skill

Sanity Visual Coverage

by sanity-io in sanity-io/sanity

Check whether Studio UI is covered by Chromatic visual regression, for a PR's changed files or for the whole tree, and decide between "already covered", "a story is pending in an open PR", and…

OfficialMITAuto-check passedTesting & QA

Install Sanity Visual Coverage

skills CLI
$ npx skills add sanity-io/sanity --skill sanity-visual-coverage -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sanity-io/sanity sanity-visual-coverage --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sanity-io/sanity.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/sanity-visual-coverage .claude/skills/sanity-visual-coverage && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sanity-visual-coverage
GitHub stars
6.4k
Token cost
~1.9k tokens
SKILL.md length
933 words
Files
1
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

Check whether Studio UI is covered by Chromatic visual regression, for a PR's changed files or for the whole tree, and decide between "already covered", "a story is pending in an open PR", and…

  • Works in 4 steps: covered. Done. If the change adds a… → pending. Do not add a story. The PR… → uncovered, and the file paints something… → …
  • Reviewing a PR that touches packages//src//.tsx
  • SKILL.md covers Run the check, What counts as covered, How stories map to Studio UI and Decision procedure, plus 1 more section
  • Calls pnpm, gh and node

What it does

Sanity Visual Coverage is an agent skill from sanity-io/sanity, published by the product's own GitHub organization. Check whether Studio UI is covered by Chromatic visual regression, for a PR's changed files or for the whole tree, and decide between "already covered", "a story is pending in an open PR", and "needs a story". Use when reviewing a PR that touches packages//src//.tsx or .css.ts, when asked "is this covered by Chromatic", when planning ui5 or vanilla-extract migration work, or before opening a PR that adds stories.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Visual regression testing and React components. The repository describes itself as: Sanity Studio – Rapidly configure content workspaces powered by structured content. The licence is MIT.

When your agent uses it

  • Reviewing a PR that touches packages//src//.tsx
  • Asked is this covered by Chromatic
  • Vanilla-extract migration work
  • Before opening a PR that adds stories

Example prompts

  • “s changed files or for the whole tree, and decide between”
  • “a story is pending in an open PR”
  • “needs a story”
  • “/sanity-visual-coverage”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. covered. Done. If the change adds a state the story does not render (a new tone, an empty
  2. pending. Do not add a story. The PR number is in the report. Review that PR, or comment on
  3. uncovered, and the file paints something (layout, tone, spacing, text). Add coverage per
  4. uncovered, and the file is a provider, hook wrapper, context, or renders only children.

What it can do on your machine

Read from SKILL.md and the folder at commit 73980e6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm
    • gh
    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sanity Visual Coverage loads about 1.9k tokens when it runs. Until then it costs about 111 tokens; SKILL.md has 933 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~111
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sanity-io/sanity at commit 73980e6, republished under its MIT licence (© sanity-io). 933 words, ~1,943 tokens.

Download SKILL.mdSave it as .claude/skills/sanity-visual-coverage/SKILL.md (or your agent's skills folder).
name
sanity-visual-coverage
description
Check whether Studio UI is covered by Chromatic visual regression, for a PR's changed files or for the whole tree, and decide between "already covered", "a story is pending in an open PR", and "needs a story". Use when reviewing a PR that touches packages/**/src/**/*.tsx or *.css.ts, when asked "is this covered by Chromatic", when planning ui5 or vanilla-extract migration work, or before opening a PR that adds stories.

Visual regression coverage

The question this skill answers is "if this file's rendering changes, does a Chromatic snapshot catch it?". The answer is a static fact about the repo, so a script computes it. Do not answer it by reading the Chromatic check, and do not answer it from memory.

Run the check

bash
pnpm visual-coverage --changed                # files changed vs origin/main, including uncommitted
pnpm visual-coverage --changed --prs          # also mark files that an open PR is about to cover
pnpm visual-coverage <path> [<path>...]       # specific files
pnpm visual-coverage                          # whole tree, one row per area
pnpm visual-coverage --uncovered              # whole tree plus every uncovered file
pnpm visual-coverage --format json ...        # machine-readable, same modes
pnpm visual-coverage --help

For a PR you are not on: gh pr checkout <number> && pnpm visual-coverage --changed --prs. Every same-repo PR that touches packages/**/src/**/*.tsx or *.css.ts also gets a sticky "Visual regression coverage" comment from .github/workflows/visual-coverage.yml, produced by the same script with --format markdown --prs. Read that comment first when reviewing; its counts are in plain sight and the per-file table sits behind the collapsed Per-file coverage toggle.

The script is scripts/visualCoverage.ts. It has no dependencies and runs under tsx or plain Node 22.18+ (node scripts/visualCoverage.ts).

What counts as covered

Chromatic snapshots stories, not components. A component is covered when a story renders it. The script models that as direct imports:

EvidenceFilesChromatic projectStatus in the report
storypackages/**/src/**/*.stories.tsx"sanity studio"covered
browser-testpackages/**/src/**/*.browser.test.tsx"sanity studio vitest"covered
pendinga *.stories.tsx added by an open PR (--prs)none yetpending, claimed by that PR

Both projects snapshot on every PR: a story is captured by the Storybook build, a browser test's end state by the CHROMATIC=1 capture run (plus any takeSnapshot() it calls). The Playwright project ("sanity studio playwright") is curated opt-in and is not modelled as coverage.

A file is covered when a story or browser test imports it directly, or imports a *Story.tsx harness that imports it. A .css.ts file inherits the coverage of the .tsx files that import it. Nothing deeper than that counts. TestWrapper imports the whole sanity package, so a transitive graph would mark everything covered, and Chromatic's TurboSnap has the same blind spot. That is why the green Chromatic check on a PR says only "the affected stories still match", never "your component is rendered by a story".

How stories map to Studio UI

  • dev/storybook is the host. Its stories glob in dev/storybook/.storybook/main.ts finds *.stories.tsx under every workspace package's src. Stories live next to the component in its __tests__ directory. Nothing lives under dev/storybook/stories.
  • Two story shapes. Plain variant grids for packages/sanity/src/ui-components wrappers (Button.stories.tsx imports ../Button). Harness stories for anything that needs a workspace, i18n, or layers. The harness is <Name>Story.tsx, wraps TestWrapper, and <Name>.stories.tsx is a thin CSF file whose component is the harness.
  • Browser tests define their harness component inline (function <Name>Harness() inside the <Name>.browser.test.tsx), so every *Story.tsx belongs to a story. The Vitest Chromatic integration snapshots the test's end state in place; do not extract a test's harness into a *Story.tsx to put a story on it. Their coverage shows up as browser-test evidence.
  • "ui5 sentinel" and "box sentinel" are the same thing. A story added so the @sanity/ui to ui5 Box/Flex/Card migration gets a snapshot before the swap lands. The harness renders the states most likely to drift (tones, spacing, truncation, empty states) with fixture copy only. Naming follows the harness pattern above. title is Area/Component. Sentinels are ordinary stories — browsable, with a JSDoc description saying what they pin down; there is no tag to hide them. Read FieldDiffChromeStory.tsx and FieldDiffChrome.stories.tsx under packages/sanity/src/core/field/diff/components/__tests__ as the reference pair.
  • A story covers exactly the components its harness imports. A DocumentLayout story also paints buttons and cards, but only the Button story is the sentinel for Button.
Show full SKILL.md (367 more words)Show less

Decision procedure

Run pnpm visual-coverage --changed --prs on the branch, then per file:

  1. covered. Done. If the change adds a state the story does not render (a new tone, an empty state, a truncation case), extend the existing story or harness. Do not add a second story for the same component. When the only evidence is a browser-test, the state is snapshotted by the Vitest integration; extend that test or its harness rather than adding a story for it.
  2. pending. Do not add a story. The PR number is in the report. Review that PR, or comment on it if the variant you need is missing.
  3. uncovered, and the file paints something (layout, tone, spacing, text). Add coverage per .agents/skills/sanity-visual-regression/SKILL.md, picking the source with its "Which source owns a state" table: a story when the state is reachable from props or one play step, a *.browser.test.tsx when reaching it means driving the UI. For a story, reuse an existing *Story.tsx harness in the same directory before creating one; never build the story out of a browser test's harness.
  4. uncovered, and the file is a provider, hook wrapper, context, or renders only children. Nothing to snapshot. Say so in the PR instead of adding a story.

For migration planning, pnpm visual-coverage --uncovered --prs lists the gap. Pick from it, do not survey by hand.

Avoiding duplicate coverage PRs

Sentinel coverage for the ui5 migration lands in a stream of PRs titled test(storybook): add ui5 ... sentinels ... (the original stack, #14056 through #14511, has merged; newer ones are usually stacked the same way). The migration itself lands on chore/ui-v5-* branches.

  • --prs already accounts for every open PR that adds a *.stories.tsx. A file reported as pending is claimed.
  • To see what is open: gh pr list --state open --search "test(storybook) in:title" --json number,title,headRefName,baseRefName.
  • Do not rebase, rewrite, or push to those branches. A new coverage PR goes on top of an open PR when it depends on a harness added there, or off main when its files are disjoint from every open PR.
  • Before opening a coverage PR, run the check with --prs one more time. If anything you added is now pending elsewhere, drop it.

© sanity-io, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/sanity-visual-coverage of sanity-io/sanity.

Open the folder on GitHubat commit 73980e6

Compare with similar skills

Sanity Visual Coverage next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sanity Visual Coverage compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sanity Visual Coverage this skillsanity-io/sanity6.4k—~1.9kAutomated safety check: PassMIT
Manage HTML Teststelerik/kendo-themes158—~1.8kAutomated safety check: PassNone
Generate Snapshot Testsgetsentry/sentry46k—~3.3kAutomated safety check: PassCustom licence
Ark UIBrandon030722/ark-ui-skill266—~3.7kAutomated safety check: PassNone
Review Local UI Screenshotsxiaocang/easydict_win32103—~1.1kAutomated safety check: PassGPL-3.0
Handsontable Visual Test Demoshandsontable/handsontable22k—~1.3kAutomated safety check: PassCustom licence

Similar skills

  • Manage HTML Tests

    telerik/kendo-themes

    Create or update visual test scenarios for a Kendo UI component in the HTML package.

    158 GitHub stars~1.8k tokensUpdated today
    Testing & QAAuto-check passed
  • Generate Snapshot Tests

    getsentry/sentry

    Official

    Generate snapshot test files for Sentry frontend React components.

    46k GitHub stars~3.3k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Ark UI

    Brandon030722/ark-ui-skill

    Design, implement, audit, or refactor web and game-adjacent interfaces using an evidence-based Hypergryph visual language with two independent choices: product family and application depth (1…

    266 GitHub stars~3.7k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed
  • Review Local UI Screenshots

    xiaocang/easydict_win32

    Review Easydict UI automation screenshot artifacts already present in local artifacts/ui-screenshots, screenshots, or a user-provided artifact directory.

    103 GitHub stars~1.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Handsontable Visual Test Demos

    handsontable/handsontable

    Explains how to add or change the demo pages that Handsontable's visual regression suite photographs, including per-feature routes in the js demo and the shared grid.

    22k GitHub stars~1.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Kc Screenshot

    imran31415/kube-coder

    Capture desktop + mobile, dark + light screenshots of the kube-coder dashboard SPA for visual QA of a UI change.

    388 GitHub stars~870 tokensUpdated today
    Testing & QAAuto-check: notes

More from sanity-io/sanity

All 34 skills in this repo
  • Playwright CLI

    sanity-io/sanity

    Official

    Automates browser interactions for web testing, form filling, screenshots, and data extraction.

    6.4k GitHub starsUsed in 18 repos~1.9k tokens
    Auto-check passed
  • Find Skills

    sanity-io/sanity

    Official

    Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities.

    6.4k GitHub starsUsed in 67 repos~1.2k tokens
    Auto-check passed
  • Official

    React and Next.js performance optimization guidelines from Vercel Engineering.

    6.4k GitHub starsUsed in 129 repos~1.6k tokens
    Auto-check passed
  • Before And After

    sanity-io/sanity

    Official

    Add existing screenshots or screen recordings to a GitHub pull request as a before/after or preview block.

    6.4k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • React Devtools

    sanity-io/sanity

    Official

    React DevTools CLI for AI agents. An agent skill from sanity-io/sanity.

    6.4k GitHub starsUsed in 3 repos~2.1k tokens
    Auto-check passed
  • TDD

    sanity-io/sanity

    Official

    Test-driven development with red-green-refactor loop. An agent skill from sanity-io/sanity.

    6.4k GitHub starsUsed in 20 repos~1k tokens
    Auto-check passed

Categories

Questions about Sanity Visual Coverage

What does Sanity Visual Coverage do?

Check whether Studio UI is covered by Chromatic visual regression, for a PR's changed files or for the whole tree, and decide between "already covered", "a story is pending in an open PR", and…. Sanity Visual Coverage is an agent skill from sanity-io/sanity, published by the product's own GitHub organization. Check whether Studio UI is covered by Chromatic visual regression, for a PR's changed files or for the whole tree, and decide between "already covered", "a story is pending in an open PR", and "needs a story".

When should I use Sanity Visual Coverage?

Sanity Visual Coverage fits situations like: reviewing a PR that touches packages//src//.tsx; asked is this covered by Chromatic; vanilla-extract migration work; before opening a PR that adds stories.

How do I install Sanity Visual Coverage in Claude Code?

Run `npx skills add sanity-io/sanity --skill sanity-visual-coverage -a claude-code`. Or copy the skill folder (.agents/skills/sanity-visual-coverage in sanity-io/sanity) into .claude/skills/sanity-visual-coverage in your project. Claude Code loads it when a task matches its description.

How do I install Sanity Visual Coverage in Codex?

Run `npx skills add sanity-io/sanity --skill sanity-visual-coverage -a codex`. Or copy the skill folder (.agents/skills/sanity-visual-coverage in sanity-io/sanity) into .agents/skills/sanity-visual-coverage in your project. Codex loads it when a task matches its description.

Can I use Sanity Visual Coverage in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sanity-io/sanity --skill sanity-visual-coverage -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sanity-visual-coverage, .gemini/skills/sanity-visual-coverage, .github/skills/sanity-visual-coverage and .opencode/skills/sanity-visual-coverage in your project.

What does Sanity Visual Coverage need to run?

Going by SKILL.md and its folder, Sanity Visual Coverage needs the command-line tools its instructions call (pnpm, gh and node).

Does Sanity Visual Coverage access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Sanity Visual Coverage safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Sanity Visual Coverage use?

Sanity Visual Coverage is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sanity Visual Coverage use?

About 1.9k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Sanity Visual Coverage?

Skills that share tags, products or a category with Sanity Visual Coverage: Manage HTML Tests (telerik/kendo-themes, 158 stars), Generate Snapshot Tests (getsentry/sentry, 46k stars), Ark UI (Brandon030722/ark-ui-skill, 266 stars) and Review Local UI Screenshots (xiaocang/easydict_win32, 103 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sanity Visual Coverage?

sanity-io (a GitHub organization, an official publisher) maintains it in sanity-io/sanity, which has 6,352 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on October 8, 2026.

Source: sanity-io/sanity on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.