Official agent skill

Sanity UI Migration Progress

by sanity-io in sanity-io/sanity

Measures @sanity/ui v5 side-by-side migration progress — per-component import file counts (v5 alias vs @sanity/ui), JSX instance counts, and styled() instance counts with alias resolution.

OfficialMITAuto-check passedFrontend & Design

Install Sanity UI Migration Progress

skills CLI
$ npx skills add sanity-io/sanity --skill sanity-ui-migration-progress -a claude-code

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

GitHub CLI
$ gh skill install sanity-io/sanity sanity-ui-migration-progress --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-ui-migration-progress .claude/skills/sanity-ui-migration-progress && 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-ui-migration-progress
GitHub stars
6.4k
Token cost
~2.1k tokens
SKILL.md length
698 words
Files
2 (incl. scripts)
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

Measures @sanity/ui v5 side-by-side migration progress — per-component import file counts (v5 alias vs @sanity/ui), JSX instance counts, and styled() instance counts with alias resolution.

  • Works in 3 steps: Confirm scope → Run the script → Present results
  • Reporting migration status
  • SKILL.md covers Migration model, When to use, Quick start and Workflow, plus 1 more section
  • Runs Shell scripts from its folder; calls bash and rg

What it does

Sanity UI Migration Progress is an agent skill from sanity-io/sanity, published by the product's own GitHub organization. Measures @sanity/ui v5 side-by-side migration progress — per-component import file counts (v5 alias vs @sanity/ui), JSX instance counts, and styled() instance counts with alias resolution. Use when reporting migration status or tracking progress over time.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/measure-progress.sh`).

It sits in Frontend & Design, covering React components. It works with npm. The repository describes itself as: Sanity Studio – Rapidly configure content workspaces powered by structured content. The licence is MIT.

When your agent uses it

  • Reporting migration status
  • Tracking progress over time

Example prompts

  • “Use the sanity-ui-migration-progress skill to measure @sanity/ui v5 side-by-side migration progress — per-component import file counts (v5 alias vs…”
  • “/sanity-ui-migration-progress”

Requirements

  • A Bash shell

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Confirm scope
  2. Run the script
  3. Present results

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

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • bash
    • rg

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

  • Network

    No URLs in SKILL.md.

    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 UI Migration Progress loads about 2.1k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 698 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

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

Download SKILL.mdSave it as .claude/skills/sanity-ui-migration-progress/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
sanity-ui-migration-progress
description
Measures @sanity/ui v5 side-by-side migration progress — per-component import file counts (v5 alias vs @sanity/ui), JSX instance counts, and styled() instance counts with alias resolution. Use when reporting migration status or tracking progress over time.

Sanity UI migration progress

Reports how far an @sanity/ui → v5 migration has progressed in a directory tree.

Migration model

This skill assumes a side-by-side setup:

  • @sanity/ui — legacy package still on v3 or v4
  • v5 alias (usually ui5) — v5 installed under a package alias, e.g. "ui5": "npm:@sanity/ui@alpha" in package.json
  • Migrated components import from the alias; unmigrated ones still import from @sanity/ui

Both can coexist during a gradual, per-component migration.

When to use

  • User asks for migration progress, status, or coverage
  • After a migration batch — compare to a saved baseline
  • CI or periodic snapshots (run the script, commit or archive output)

Quick start

Run the script from the repo root (paths below are relative to it).

All components in progress (any component with a v5 import):

bash
bash .agents/skills/sanity-ui-migration-progress/scripts/measure-progress.sh <dir> [v5-alias] [@sanity/ui]

Specific component(s) (including before migration has started):

bash
bash .agents/skills/sanity-ui-migration-progress/scripts/measure-progress.sh <dir> --component Flex
bash .agents/skills/sanity-ui-migration-progress/scripts/measure-progress.sh <dir> --component Box --component Flex
ArgumentDefaultExample
<dir>(required)., src/, apps/studio
[v5-alias]ui5Side-by-side alias from package.json
[@sanity/ui]@sanity/uiLegacy import path still on v3/v4
--component NAME(none)Flex, Box — repeat for several

Detect alias when unsure:

bash
rg -o '"([^"]+)":\s*"npm:@sanity/ui@' package.json -r '$1'

If the default ui5 finds no imports, the script auto-detects the alias from the nearest package.json at or above <dir>, then from any package.json below it.

Scope matters. Counts depend on the directory passed — scanning a subdirectory vs repo root (.) can differ when ui5 imports exist in multiple packages or apps. Always state the directory used in the report.

Choosing scope

Infer the directory from what the user says — do not default to a subdirectory unless they name one.

User saysDirectory
"across the repo", "whole repo", "entire monorepo", "everywhere". (repo root)
A specific path ("in src/", "the studio app")That path
Nothing about scopeAsk — or use . in monorepos where ui5 imports may span multiple packages

In monorepos, ui5 imports often live in several packages or apps — scanning only the main library undercounts repo-wide progress.

Workflow

- [ ] 1. Confirm directory, v5 alias, and optional component name(s)
- [ ] 2. Run measure-progress.sh
- [ ] 3. Present the table + call out partial components
Step 1 — Confirm scope

Ask or infer (see Choosing scope above):

InputNotes
DirectoryRepo-wide requests → .; subdirectory requests → that path
v5 aliasUsually ui5; monorepos may resolve via catalog: — import path in source is still ui5
ComponentOptional. Omit to list all components with v5 imports; provide one name to measure that component only (works even if not on v5 yet)
Show full SKILL.md (336 more words)Show less
Step 2 — Run the script

All in-progress components (repo-wide):

bash
bash .agents/skills/sanity-ui-migration-progress/scripts/measure-progress.sh . ui5

Scoped to a subdirectory:

bash
bash .agents/skills/sanity-ui-migration-progress/scripts/measure-progress.sh src/ ui5

One component:

bash
bash .agents/skills/sanity-ui-migration-progress/scripts/measure-progress.sh <dir> ui5 --component Flex

If the user names a component, always pass --component — do not rely on discover mode.

If discover mode finds no v5 imports, report that and stop — do not attempt to install anything:

  • No alias in package.json — the repo has no v5 side-by-side setup; nothing to measure
  • Alias present, no imports — setup exists but migration has not started (or the directory is too narrow). Suggest --component <Name> to measure legacy usage for a specific component.

Example output columns:

ColumnMeaning
v5 impFiles with a value import of this component from the v5 alias
leg impFiles still importing from @sanity/ui
imp totUnion of import files (both packages in one file counts once)
jsx mig / unm / tot<LocalName> instances via alias-resolved bindings
jsx %jsx mig / jsx tot
sty mig / unm / totstyled(LocalName) at definition sites

The component list comes from v5 imports (discover mode) or from --component flags. Discover mode omits components not yet on v5; --component always reports the named component(s).

Step 3 — Present results

Summarize in plain language:

  1. Fully migrated — leg imp = 0 and jsx unm = 0
  2. In progress — v5 imports exist but legacy imports or JSX remain

Discover mode only lists components with at least one v5 import — everything in the table has migration started. Components still entirely on @sanity/ui do not appear unless the user passed --component.

Use this template:

markdown
## Migration progress: `<dir>`

**Scope:** `<dir>` · v5 alias `ui5` · `<date>`

| Component | v5 files | legacy files | JSX migrated | JSX remaining | JSX % |
| --------- | -------- | ------------ | ------------ | ------------- | ----- |
| …         | …        | …            | …            | …             | …     |

**Fully migrated:** …
**In progress:** …

Limitations

GapWhy
Element-type indirectioncond ? Box : Card — not counted; needs manual migration
Cross-file styled wrappersCounts styled(LocalName) where defined; usage in importers is not re-attributed
Re-exports / barrelsBinding must appear in the file that uses the component
Mixed imports in one fileJSX split by binding source; rare double-import files may need manual review
Components not on ui5 yetAbsent from discover-mode table; use --component to measure legacy usage for a specific one

This skill reports only — it does not install dependencies or run migrations. If v5 is not present, say so and stop.

© 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

SKILL.md and 1 other file (scripts) in .agents/skills/sanity-ui-migration-progress of sanity-io/sanity.

  • SKILL.md
  • scripts/measure-progress.sh

Open the folder on GitHubat commit 73980e6

Compare with similar skills

Sanity UI Migration Progress 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 UI Migration Progress compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sanity UI Migration Progress this skillsanity-io/sanity6.4k—~2.1kAutomated safety check: PassMIT
GSAP for Reactgreensock/gsap-skills16k4 repos~1.6kAutomated safety check: PassMIT
Ant Design CLIant-design/antd-skill136—~2.2kAutomated safety check: PassMIT
npm Library Setupvana-com/personal-server116—~1.1kAutomated safety check: PassMIT
Spotpatchhuanglvjing/spotpatch134—~998Automated safety check: PassMIT
Frontendstreamband/hydra-srt147—~582Automated safety check: PassApache-2.0

Similar skills

  • GSAP for React

    greensock/gsap-skills

    Shows how to run GSAP animations in React and Next.js with the useGSAP hook, refs, scoped selectors and automatic cleanup on unmount.

    16k GitHub starsUsed in 4 repos~1.6k tokens
    Frontend & DesignAuto-check passed
  • Ant Design CLI

    ant-design/antd-skill

    Looks up antd component props, docs, demos and changelogs with the offline @ant-design/cli, and helps debug, migrate between versions and audit usage in a project.

    136 GitHub stars~2.2k tokensUpdated 6 mo ago
    Frontend & DesignAuto-check passed
  • npm Library Setup

    vana-com/personal-server

    Comprehensive guidance on setting up npm libraries with package.json, with a preference for ES Modules (ESM).

    116 GitHub stars~1.1k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Spotpatch

    huanglvjing/spotpatch

    为 React 项目建立从浏览器页面元素到精确 JSX/TSX 源码、结构化上下文与可审阅修改的 SpotPatch 工作流。用户提到 SpotPatch、截图沟通前端修改、页面元素定位源码、Vite 或 Next.js 接入、组件数据链路、结构化 Prompt、AI 补丁审阅、安装检查或故障排查时使用此技能。

    134 GitHub stars~998 tokensUpdated 11 days ago
    Frontend & DesignAuto-check passed
  • Frontend

    streamband/hydra-srt

    A skill your agent uses for frontend work in webapp (React/TypeScript, UI implementation, tests, and refactors).

    147 GitHub stars~582 tokensUpdated 23 days ago
    Frontend & DesignAuto-check passed
  • Framer Motion (Motion) patterns for React: spring presets, staggers, layout animations, micro-interactions, scroll effects and page transitions, with performance rules.

    179 GitHub stars~3k tokensUpdated 22 days ago
    Frontend & DesignAuto-check passed

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

Works with

Questions about Sanity UI Migration Progress

What does Sanity UI Migration Progress do?

Measures @sanity/ui v5 side-by-side migration progress — per-component import file counts (v5 alias vs @sanity/ui), JSX instance counts, and styled() instance counts with alias resolution. Sanity UI Migration Progress is an agent skill from sanity-io/sanity, published by the product's own GitHub organization. Measures @sanity/ui v5 side-by-side migration progress — per-component import file counts (v5 alias vs @sanity/ui), JSX instance counts, and styled() instance counts with alias resolution.

When should I use Sanity UI Migration Progress?

Sanity UI Migration Progress fits situations like: reporting migration status; tracking progress over time.

How do I install Sanity UI Migration Progress in Claude Code?

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

How do I install Sanity UI Migration Progress in Codex?

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

Can I use Sanity UI Migration Progress 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-ui-migration-progress -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-ui-migration-progress, .gemini/skills/sanity-ui-migration-progress, .github/skills/sanity-ui-migration-progress and .opencode/skills/sanity-ui-migration-progress in your project.

What does Sanity UI Migration Progress need to run?

Going by SKILL.md and its folder, Sanity UI Migration Progress needs a shell for the scripts in its folder and the command-line tools its instructions call (bash and rg). Our summary lists: A Bash shell.

Does Sanity UI Migration Progress access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Sanity UI Migration Progress 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Sanity UI Migration Progress use?

Sanity UI Migration Progress 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 UI Migration Progress use?

About 2.1k tokens (SKILL.md is roughly 8.3k 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 UI Migration Progress?

Skills that share tags, products or a category with Sanity UI Migration Progress: GSAP for React (greensock/gsap-skills, 16k stars), Ant Design CLI (ant-design/antd-skill, 136 stars), npm Library Setup (vana-com/personal-server, 116 stars) and Spotpatch (huanglvjing/spotpatch, 134 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sanity UI Migration Progress?

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.