sanity-studio-upgrade
Produces a tailored Sanity Studio upgrade plan by inspecting the repository's installed versions, config, and source, then reporting only the breaking changes…
Skill by sanity-ioOfficial
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/sanity-io-sanity-studio-upgrade
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/sanity-studio-upgrade
What's inside
- Skill name
sanity-studio-upgrade- Description
- Produces a tailored Sanity Studio upgrade plan by inspecting the repository's installed versions, config, and source, then reporting only the breaking changes that actually apply. Covers Studio v3 and later; v2 projects are identified and redirected, not planned. Use this skill whenever someone wants to upgrade, migrate, or modernize a Sanity Studio across one or more major versions from v3 onward, asks what will break if they bump the `sanity` package, asks why their Studio broke after an upgrade, or asks how far behind their Studio is. Triggers on "upgrade sanity studio", "migrate our studio to v6", "bump sanity", "what breaks if we upgrade", "our studio is on an old version", "sanity upgrade plan", "is our studio out of date", "we are several majors behind". DO NOT load for upgrading non-Sanity dependencies, for Content Lake `apiVersion` questions, for content or schema migrations that change documents, or for setting up a new Sanity project.
- License
- MIT
- Compatibility
- Requires network access to the npm registry and sanity.io docs for version and changelog lookups
- Instructions
- 179 lines in SKILL.md · view on GitHub
Files (11)
- SKILL.md
- boundaries.md · references/
- boundary.v4.md · references/
- boundary.v5.md · references/
- boundary.v6.md · references/
- deprecations.md · references/
- detect.md · references/
- package-coupling.md · references/
- plugins.md · references/
- report-template.md · references/
- version-lookup.md · references/
SKILL.md (first lines)
# Sanity Studio upgrade planner Generate an upgrade plan for the Sanity Studio in the current repository. The plan's value is **subtraction**. A list of every breaking change between two versions already exists; it is called the changelog, and it is not useful to someone mid-upgrade. This skill produces the much shorter list of changes that apply to *this* repository, plus the questions only a human can answer. ## Three rules that determine whether the output is trustworthy **1. Never state a version number from memory. Look it up, and confirm it exists.** Package versions change weekly. Every version in the report must come from either the repository's lockfile (for current state) or a live registry query (for targets). If a lookup is not possible, say so in the report rather than guessing. A plan that names a stale "latest" is worse than no plan, because the reader will act on it. There is a second, worse version of this failure: a version number that was never published at all, arrived at by assuming one package tracks another's numbering. That one fails at install. Any version you are about to describe as "lockstep" or "matches core" needs an existence check first. The same applies to API names. An export, an import subpath, or a function signature recalled from memory is a guess, and it is a guess the reader will paste into their editor. Read it from the package's README or `exports` map, or mark it with an inline `// VERIFY:` comment **at the snippet itself**. See section 6 of `plugins.md` and section 8 of `report-template.md`. **2. Read and report. Never modify.** Inspect files, run read-only shell commands, query registries. Do not edit `package.json`, config files, or source. The reader decides what to change; a planner that edits code will be turned off. If the user explicitly asks you to perform the upgrade afterward, that is a separate task they have consented to. **Where the line actually falls**, because a vague version of this rule makes an agent hesitate over commands that are fine: - **Never**: writing to any file in the repository, installing into it, or mutating a lockfile. `pnpm install`, `npm install`, `npm ci` and `npx` without `--no-install` are all out. - **Fine**: reading files, and network reads such as `npm view`, a changelog fetch, or `npm pack` **into a temporary directory outside the repository** that you then delete. - **Recommended to the reader, not run by you**: `pnpm install --lockfile-only` is how a dependency prediction gets settled. It belongs in the report as a command for them to run, with what to expect from it. Do not run it yourself, because it rewrites their lockfile. The one place this skill writes anything is unpacking a tarball to inspect type declarations, and section 6 of `plugins.md` shows how to keep that outside the project. **3. Separate what you verified from what you inferred.** Every finding lands in one of three buckets: confirmed applicable (you found the condition in the repo), needs a human answer (you cannot determine it from code), or not applicable (omit it entirely). Never pad the report with items you could not check. An honest short report beats a comprehensive-looking one. One consequence is easy to miss and worth stating outright: **a read-only planner has no dependency resolver, so it cannot know what a tree will contain after a change.** Predictions about deduplication belong in the report as expectations with the verification command attached, never as findings. See `package-coupling.md`. ## The verification rules, in one place These are referred to by number throughout the reference files, so they are stated once here rather than restated in each. Everything above is R1 to R4; the rest are the specific ways those go wrong. | | Rule | Where it bites | | --- | --- | --- | | **R1** | Never state a version from memory. Take current state from the lockfile, targets from a live registry query. | `version-lookup.md` §1 | | **R2** | Read and report. Nothing in the repository changes, nothing is installed, no lockfile is mutated. | Above, and `plugins.md` §6 | | **R3** | Separate verified from inferred. Never assert what a dependency tree will contain after a change; a planner has no resolver. | `package-coupling.md` §6, `plugins.md` §5 | | **R4** | Confirm every recommended version was actually published before it goes in the report. | `version-lookup.md` §3 | | **R5** | Every "X requires Y" names the manifest it was read from, at the version being installed at that stop. Requirements do not carry backwards across majors. | `version-lookup.md` §6 | | **R6** | Evaluate a version range, never read it. Anything with a `\|\|`, a `<`, or two comparators in one clause goes through `semver.satisfies` first. | `version-lookup.md` §6 | | **R7** | A name in an export list is not a working export. Check its declared type and any `@deprecated` tag; `never` means removed. | `plugins.md` §6 | R6 and R7 exist because both have already produced confident, wrong, specific advice: a Node version reported as unsupported when it was fine, and a required code edit filed under "already satisfied". They are cheap to run and they fail silently when skipped. ## Scope: v3 and later This skill plans upgrades from Studio v3 onward. **Studio v2 is out of scope and is a hard stop.** The reason is not that v2 is hard. It is that v2 to v3 is a rewrite of the Studio's configuration and plugin layer rather than a dependency upgrade: the config format changed, the "parts" system that v2 plugins and overrides were built on no longer exists, packages were consolidated, and much of the v2-era plugin ecosystem was never ported. A generated plan for that boundary would be a list of confident-sounding specifics that this skill cannot verify, handed to someone about to spend weeks on the work. That is the worst possible output. **If you detect v2, stop and report** rather than planning. Step 1 covers detection and what to say. Do not write a plan file for a v2 project. ## Procedure ### Step 1: Establish ground truth, and check the version floor Read `references/detect.md` and follow it. It lists the files to read, the commands to run, and the facts to record. The single most common mistake is reading versions from `package.json`. Caret ranges are not installed versions. Get the resolved version from the lockfile. The second most common mistake is reading them from the wrong lockfile. A repository can contain several installs that disagree, so decide which tree the plan is for, take every version fact from that tree, and name it in the report header. If there is no Sanity Studio in this repository, say so and stop. **Then check the floor before doing anything else.** If the resolved `sanity` major is below 3, or there is no `sanity` package and the project depends on v2-era packages such as `@sanity/base` or `@sanity/desk-tool`, or there is a `sanity.json` and no `sanity.config.*`, this is a v2 project. Stop there and tell the reader: 1. What you detected, and the evidence for it 2. That this skill covers v3 and later, and why v2 to v3 is a different kind of project: a rewrite of the configuration and plugin layer, not a version bump 3. That the right starting point is the official v2 to v3 migration guide, which they should find on the Sanity docs site rather than take from you second-hand 4. That every v2-era plugin needs its own compatibility check, since many were never ported 5. That once they are on v3, running this skill again will plan the rest of the span, which is a much smaller job Be useful about it. A hard stop that explains itself and points somewhere is a good answer; a refusal is not. But do not soften it into a partial plan, and do not estimate the v2 to v3 work. If both `sanity.json` and `sanity.config.*` are present, treat the resolved `sanity` version as authoritative. A leftover `sanity.json` in an otherwise v3+ project is worth mentioning as cleanup, not a reason to stop. ### Step 2: Determine the span You need two versions: **from** (resolved, installed) and **to** (the target). Read `references/version-lookup.md` for how to query current versions and changelogs authoritatively. **The target is `latest`.** Recommend it and give the reasoning. Landing short means doing the whole job and still being behind, and more importantly, current plugin versions track current core, so an older core with current plugins often produces a worse dependency tree than the newest release does. Report the target's publish date and a one-line fallback so the reader can apply constraints you cannot see, but that is disclosure, not a hedge, and it does not change the recommendation. Deviate only for a constraint the reader has actually stated, and then give the pin a review date. State the span explicitly in the report. A v3 project and a v5.31 project are completely different jobs and the reader needs to know which one they have. ### Step 3: Load only the boundaries you cross Read `references/boundaries.md` first. It is a short index: the coverage bounds, the two-edge fetch rule, and a table saying which boundary files the span needs. **Then read only those files.** Boundary content is split one file per major, so a span that crosses one boundary loads one file rather than all of them. A project on 5.31 crossing into v6 reads the index, `boundary.v6.md` and `deprecations.md`, and nothing else: the v4 and v5 files would cost context and invite findings that do not apply. Each `boundary.v*.md` holds the crossing *into* that major plus the undeclared changes *inside* that major's line, because a span that crosses a boundary lands somewhere in the line above it and needs both. Then read `references/package-coupling.md`. It applies to every span. ### Step 4: Fetch what the references do not cover `references/boundaries.md` declares **two** bounds on its within-line coverage, and both need respecting. Fetch the changelog for any part of the span that falls **above the upper bound** or **below the lower bound**. A project starting below the lower bound needs two fetches: from its current version up to that bound, and from the upper bound to the target. The curated middle is used as-is. The lower bound matters as much as the upper one, and it fails more quietly. Without it you will trust the file for a range it never examined and report that nothing there applies, which reads as a verified finding and is actually an unexamined gap. **Never state that a range is clean unless it sits inside the declared bounds or you fetched it yourself and got real content back.** That last clause is not padding. Below the lower bound the upstream changelog does not exist at all, so the fetch returns almost nothing, and **an empty fetch is not a clean range.** `boundaries.md` says which range this affects and what to report instead. Reporting silence as "nothing applies" there is the single easiest way for this skill to produce a confident lie. Pay particular attention to breaking changes that shipped in **minor** releases without being labelled as breaking. Those are the ones that surprise people, because nobody reads minor release notes across forty releases. The references list known examples; assume more exist. ### Step 5: Test applicability For each candidate change, find the condition in the repository. If you cannot determine it from code, it goes in the human questions section, not in the findings. Examples of the difference:
From sanity-io/agent-toolkit, MIT.
More from sanity-io/agent-toolkit
- 0.794score
sanity-best-practices
sanity-ioOfficial
Sanity development best practices for schema design, GROQ queries, TypeGen, Visual Editing, images, Portable Text, Studio structure, localization, migrations…
SkillAFreshness: A★ 194Claude Code +9 - 0.794score
Sanity
www.sanity.ioOfficial
Direct access to your Sanity projects (content, datasets, releases, schemas) and agent rules
ConnectorAFreshness: ARemote★ 194Claude Code +3 - 0.789score
sanity-singletons
sanity-ioOfficial
Configure singleton documents in a Sanity Studio using the document.singletons registry.
SkillAFreshness: A★ 194Claude Code +9 - 0.789score
sanity-form-component-suspense
sanity-ioOfficial
Fix a Sanity Studio custom form component (components.input, components.field, components.item, or a plugin's form.components) that suspends without its own…
SkillAFreshness: A★ 194Claude Code +9 - 0.749score
content-experimentation-best-practices
sanity-ioOfficial
Content experimentation and A/B testing guidance covering experiment design, hypotheses, metrics, sample size, statistical foundations, CMS-managed variants…
SkillBFreshness: B★ 194Claude Code +9 - 0.749score
sanity-migration
sanity-ioOfficial
Plans, implements, and reviews migrations from other CMSes and content systems into Sanity.
SkillBFreshness: B★ 194Claude Code +9 - 0.743score
portable-text-conversion
sanityOfficial
Convert HTML and Markdown content into Portable Text blocks for Sanity.
SkillBFreshness: B★ 194Claude Code +9 - 0.616score
seo-aeo-best-practices
sanity-ioOfficial
SEO and AEO best practices for metadata, Open Graph, sitemaps, robots.txt, hreflang, JSON-LD structured data, EEAT, and content optimized for search engines…
SkillDFreshness: D★ 194Claude Code +9 - 0.616score
content-modeling-best-practices
sanity-ioOfficial
Structured content modeling guidance for schema design, content architecture, content reuse, references versus embedded objects, separation of concerns, and…
SkillDFreshness: D★ 194Claude Code +9 - 0.611score
portable-text-serialization
sanityOfficial
Render and serialize Portable Text to React, Svelte, Vue, Astro, HTML, Markdown, and plain text.
SkillDFreshness: D★ 194Claude Code +9
Signals
- Stars
- 194
- Forks
- 30
- Open issues
- 6
- Contributors
- 21
- Last commit (this folder)
- Sep 9, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/sanity-io/agent-toolkit
- Website
- www.sanity.io
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from sanity-io
- 0.794score
sanity-best-practices
sanity-ioOfficial
Sanity development best practices for schema design, GROQ queries, TypeGen, Visual Editing, images, Portable Text, Studio structure, localization, migrations…
SkillAFreshness: A★ 194Claude Code +9 - 0.789score
sanity-form-component-suspense
sanity-ioOfficial
Fix a Sanity Studio custom form component (components.input, components.field, components.item, or a plugin's form.components) that suspends without its own…
SkillAFreshness: A★ 194Claude Code +9 - 0.789score
sanity-singletons
sanity-ioOfficial
Configure singleton documents in a Sanity Studio using the document.singletons registry.
SkillAFreshness: A★ 194Claude Code +9 - 0.749score
content-experimentation-best-practices
sanity-ioOfficial
Content experimentation and A/B testing guidance covering experiment design, hypotheses, metrics, sample size, statistical foundations, CMS-managed variants…
SkillBFreshness: B★ 194Claude Code +9 - 0.749score
sanity-migration
sanity-ioOfficial
Plans, implements, and reviews migrations from other CMSes and content systems into Sanity.
SkillBFreshness: B★ 194Claude Code +9 - 0.616score
content-modeling-best-practices
sanity-ioOfficial
Structured content modeling guidance for schema design, content architecture, content reuse, references versus embedded objects, separation of concerns, and…
SkillDFreshness: D★ 194Claude Code +9
Cite this page
sanity-studio-upgrade skill. Agent Mart. https://agentmart.dev/skills/sanity-io-sanity-studio-upgrade (last updated 2026-10-24)