sanity-visual-coverage
Skill by sanity-io
Checks whether Sanity Studio UI files are covered by Chromatic visual regression snapshots. It labels each file as covered, pending in an open PR, or needing a story, for PR reviewers and migration planners.
Install sanity-visual-coverage
Built from the published package, never by AI.
git clone --depth 1 https://github.com/sanity-io/sanity /tmp/sanity && mkdir -p ~/.claude/skills && cp -r /tmp/sanity/.agents/skills/sanity-visual-coverage ~/.claude/skills/sanity-visual-coverageRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/sanity-io/sanity /tmp/sanity && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/sanity/.agents/skills/sanity-visual-coverage ~/.gemini/antigravity-cli/skills/sanity-visual-coverageAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install sanity-visual-coverage in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
The sanity-visual-coverage skill answers whether a change to a Sanity Studio UI file would be caught by a Chromatic snapshot. A script, run with pnpm visual-coverage, checks changed files, specific paths, or the whole tree. Each file is marked covered, pending in an open PR, or uncovered.
A file counts as covered when a story or browser test imports it directly, or imports a *Story.tsx harness that imports it. The skill does not follow deeper imports. It also gives a decision procedure for adding missing stories and avoiding duplicate coverage PRs. It is for developers reviewing PRs in the Sanity repository and planning ui5 or vanilla-extract migration work.
Written from the project's SKILL.md and checked against it.
What it can do
- Changed-file checkChecks files changed against origin/main, including uncommitted changes, for visual coverage.
- Whole-tree reportLists coverage for the whole tree, with optional listing of every uncovered file.
- Open PR awarenessMarks files that an open PR is about to cover with a story, using the --prs flag.
- Decision procedureGuides whether to extend a story, wait for a pending PR, add a story, or skip a file.
- Sentinel storiesExplains how to add stories that snapshot states likely to drift during the ui5 migration.
- Duplicate PR avoidanceExplains how to check open stories PRs before opening a new coverage PR.
- PR coverage commentDescribes the sticky Visual regression coverage comment the workflow posts on relevant PRs.
- JSON outputSupports machine-readable output with the --format json option.
What you need
- pnpm
- Node.js 22.18 or later, or tsx
- GitHub CLI (gh) for checking out and listing PRs
Try asking
- Is the Button component in this PR covered by Chromatic?
- Run visual coverage on my changed files and tell me what needs a story.
- List the uncovered Studio UI files I could pick up for the ui5 migration.
Good to know
- Coverage follows direct imports only, so transitive rendering is not counted.
- The Playwright project is curated opt-in and is not modelled as coverage.
- A green Chromatic check only means the affected stories still match.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/sanity-visual-coverage/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB
Alternatives to sanity-visual-coverage
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
sanity-visual-coverage: common questions
What does covered mean in this skill?
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 coverage from the .tsx files that import it.
Does the skill read the Chromatic check result?
No. The source says the answer is a static fact about the repo, computed by a script, and should not be taken from the Chromatic check or from memory.
What are sentinel stories?
Sentinel stories are stories added so the ui5 Box, Flex and Card migration gets a snapshot before the swap lands. They use fixture copy and render states likely to drift.
How do I install sanity-visual-coverage?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is sanity-visual-coverage free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is sanity-visual-coverage safe to use?
It scores 82 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to sanity-visual-coverage?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
