Official agent skill

Sanity Migration

by sanity-io in sanity-io/agent-toolkit

Plans, implements, and reviews migrations from other CMSes and content systems into Sanity.

OfficialMITAuto-check passedDocuments & Office

Install Sanity Migration

skills CLI
$ npx skills add sanity-io/agent-toolkit --skill sanity-migration -a claude-code

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

GitHub CLI
$ gh skill install sanity-io/agent-toolkit sanity-migration --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/agent-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/sanity-migration .claude/skills/sanity-migration && 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-migration
GitHub stars
188
Token cost
~1.4k tokens
SKILL.md length
634 words
Files
10 (incl. references)
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Plans, implements, and reviews migrations from other CMSes and content systems into Sanity.

  • Works in 4 steps: Read references/general.md first. → If the source platform is known, also… → Before writing code, produce a short… → …
  • Replatforming to Sanity from AEM
  • SKILL.md covers Required Workflow, Deliverables to Produce, Defaults and Sanity Guardrails, plus 3 more sections
  • Calls npx

What it does

Sanity Migration is an agent skill from sanity-io/agent-toolkit, published by the product's own GitHub organization. Plans, implements, and reviews migrations from other CMSes and content systems into Sanity. Use when migrating or replatforming to Sanity from AEM, Adobe Experience Manager, Contentful, Strapi, Webflow, WordPress, Payload, Drupal, Markdown/MDX/frontmatter files, WXR/XML exports, CMS APIs, database dumps, static HTML, or when designing extraction, transformation, Portable Text conversion, asset migration, redirects, validation, and cutover workflows.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including reference files (for example `references/aem.md`, `references/contentful.md` and `references/drupal.md`).

It sits in Documents & Office, covering Markdown. It works with Adobe Experience Manager, WordPress, Contentful and Webflow. The repository describes itself as: Collection of resources to help AI agents build better with Sanity. The licence is MIT.

When your agent uses it

  • Replatforming to Sanity from AEM
  • Adobe Experience Manager
  • Markdown/MDX/frontmatter files
  • WXR/XML exports

Example prompts

  • “/sanity-migration”

Requirements

  • Node.js

Workflow steps

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

  1. Read references/general.md first.
  2. If the source platform is known, also read its guide
  3. Before writing code, produce a short migration plan covering source access, content scope, schema decisions, extraction, transformation…
  4. Prefer deterministic, repeatable scripts for real migrations. Write and review migration scripts, mappings, and validation checks; do not…

What it can do on your machine

Read from SKILL.md and the folder at commit 3fe6c8a. 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:

    • npx

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

  • Network

    No URLs in SKILL.md. Its commands use npx, 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 Migration loads about 1.4k tokens when it runs, and up to ~19k if it reads all its reference files. Until then it costs about 118 tokens; SKILL.md has 634 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~118
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~19k

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/agent-toolkit at commit 3fe6c8a, republished under its MIT licence (© sanity-io). 634 words, ~1,369 tokens.

Download SKILL.mdSave it as .claude/skills/sanity-migration/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
sanity-migration
description
Plans, implements, and reviews migrations from other CMSes and content systems into Sanity. Use when migrating or replatforming to Sanity from AEM, Adobe Experience Manager, Contentful, Strapi, Webflow, WordPress, Payload, Drupal, Markdown/MDX/frontmatter files, WXR/XML exports, CMS APIs, database dumps, static HTML, or when designing extraction, transformation, Portable Text conversion, asset migration, redirects, validation, and cutover workflows.

Sanity Migration

Use this skill for CMS-to-Sanity migration work. Treat migration as a content strategy and ETL project, not a blind lift-and-shift.

Required Workflow

  1. Read references/general.md first.
  2. If the source platform is known, also read its guide:
    • AEM / Adobe Experience Manager: references/aem.md
    • Contentful: references/contentful.md
    • Strapi: references/strapi.md
    • Webflow: references/webflow.md
    • WordPress / WXR / Elementor: references/wordpress.md
    • Payload: references/payload.md
    • Drupal: references/drupal.md
    • Markdown / MDX / frontmatter files: references/markdown.md
  3. Before writing code, produce a short migration plan covering source access, content scope, schema decisions, extraction, transformation, import, validation, redirects, and cutover.
  4. Prefer deterministic, repeatable scripts for real migrations. Write and review migration scripts, mappings, and validation checks; do not rely on one-off content operations for large content volumes.

Deliverables to Produce

For implementation or planning tasks, produce these artifacts or explain why they are not needed:

  • Content inventory: source types, counts, locales, status/draft scope, assets, and relationship types.
  • Source-to-Sanity mapping: document types, object types, references, Portable Text fields, asset fields, IDs, and skipped content.
  • Extraction approach: credentials/access needed, API/export commands, raw snapshot location, and known blind spots.
  • Transform/import plan: deterministic IDs, write order, asset handling, rich text conversion, validation, and rerun strategy.
  • Cutover plan: delta sync/content freeze, redirects, broken-link checks, SEO metadata, and manual cleanup.

Defaults

  • Use stable document IDs derived from source IDs, slugs, paths, or hashes.
  • Use createOrReplace, createIfNotExists, or sanity datasets import --replace so reruns converge.
  • Snapshot extracted source data to disk before transforming it.
  • Import or create referenced documents before documents that reference them.
  • Convert rich text to Portable Text instead of storing raw HTML or Markdown strings.
  • Upload assets to Sanity or the Media Library; do not leave production content dependent on legacy CDN URLs.
  • Track per-document quality issues and produce a validation summary before cutover.
  • Preserve legacy URLs and source IDs for redirects, QA, and future debugging.

Sanity Guardrails

  • Model what content is, not how the old site rendered it.
  • Use documents for reusable or independently managed entities; use objects for content owned by one document.
  • Use defineType, defineField, and defineArrayMember if authoring Sanity schemas.
  • Use image/file fields with uploaded Sanity assets or Media Library assets, not legacy CDN URLs.
  • Use Portable Text arrays for rich text and custom blocks; do not store raw HTML as the canonical body.
  • Run schema extraction and TypeGen after schema or GROQ query changes when the project uses TypeScript.
  • Deploy or apply schema changes before using MCP/content tools against the target dataset.

For deeper Sanity implementation guidance, use sanity-best-practices if it is already available. If it is not installed, tell the user they can add it with:

bash
npx skills add sanity-io/agent-toolkit --skill sanity-best-practices
Show full SKILL.md (209 more words)Show less

Stop and Ask

Stop before coding when any of these are unclear:

  • Source access path, credentials, export file, or database connection.
  • Target Sanity project/dataset or whether a scratch dataset should be used.
  • Draft, archived, scheduled, locale, or version history scope.
  • Whether media files should be migrated and whether asset URLs/files are accessible.
  • Whether the destination schema exists or should be designed as part of the migration.

Do Not Do This

  • Do not create random IDs for source-backed documents.
  • Do not fetch-then-create referenced documents; use deterministic IDs and createIfNotExists/createOrReplace.
  • Do not run bulk migrations through MCP content tools when NDJSON or scripts are appropriate.
  • Do not flatten locale fallback values into translations unless requested.
  • Do not leave TODOs for required media, authors, references, or rich text conversion.
  • Do not declare a migration done without count checks, sample checks, reference checks, and route/redirect checks.

Reference Map

Use references/general.md for shared migration principles and the platform references for source-specific extraction routes, modeling traps, and validation checks.

For source systems not explicitly covered, apply references/general.md and adapt the closest platform pattern:

  • API-first CMSes: start from Contentful, Strapi, or Payload.
  • Monolithic/page-builder systems: start from WordPress, Drupal, Webflow, or AEM.
  • HTML-heavy exports: start from the WordPress and Webflow rich-text guidance.
  • Markdown-first sources: start from references/markdown.md.

© 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 9 other files (references) in skills/sanity-migration of sanity-io/agent-toolkit.

  • SKILL.md
  • references/aem.md
  • references/contentful.md
  • references/drupal.md
  • references/general.md
  • references/markdown.md
  • references/payload.md
  • references/strapi.md
  • references/webflow.md
  • references/wordpress.md

Open the folder on GitHubat commit 3fe6c8a

Compare with similar skills

Sanity Migration 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 Migration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sanity Migration this skillsanity-io/agent-toolkit188—~1.4kAutomated safety check: PassMIT
Content Management Systemsgithub/awesome-copilot40k1 repos~1.3kAutomated safety check: PassMIT
Prompt Gap To Publishamplitude/builder-skills159—~2.8kAutomated safety check: PassNone
Cms Migrationpayloadcms/skills1631 repos~1.3kAutomated safety check: PassNone
Citation Recovery Optimizeramplitude/builder-skills159—~3.3kAutomated safety check: PassNone
Competitor Prompt Hijackeramplitude/builder-skills159—~3kAutomated safety check: PassNone

Similar skills

  • Content Management Systems

    github/awesome-copilot

    Official

    Workflow for building and modifying content management systems across WordPress, Shopify, Wix, Squarespace, Drupal, WooCommerce, Joomla, HubSpot CMS Hub, Webflow, Adobe Experience Manager, and…

    40k GitHub starsUsed in 1 repo~1.3k tokens
    Sales & SupportAuto-check passed
  • Prompt Gap To Publish

    amplitude/builder-skills

    A skill your agent uses whenever a user wants to turn AI Visibility data into published content — whether they say "find content gaps", "what should we write about", "which topics have low…

    159 GitHub stars~2.8k tokensUpdated 2 mo ago
    Writing & ContentAuto-check passed
  • Cms Migration

    payloadcms/skills

    A skill your agent uses when user wants to migrate content from another CMS (WordPress, Contentful, Strapi, Sanity, Webflow, etc.) to Payload CMS

    163 GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Citation Recovery Optimizer

    amplitude/builder-skills

    A skill your agent uses whenever a user wants to improve existing pages on their website to get cited more by AI models — whether they say "our pages aren't getting cited", "improve this page for AI…

    159 GitHub stars~3.3k tokensUpdated 2 mo ago
    Research & ScienceAuto-check passed
  • Competitor Prompt Hijacker

    amplitude/builder-skills

    A skill your agent uses whenever a user wants to win AI citations on prompts that competitors currently dominate — whether they say "competitors are getting cited instead of us", "we're losing on…

    159 GitHub stars~3k tokensUpdated 2 mo ago
    Marketing & SEOAuto-check passed
  • Simulation Backed Publisher

    amplitude/builder-skills

    A skill your agent uses whenever a user wants to test content variants before publishing to find which one will get cited most by AI models — whether they say "which version of this content will…

    159 GitHub stars~3.1k tokensUpdated 2 mo ago
    Marketing & SEOAuto-check passed

More from sanity-io/agent-toolkit

All 8 skills in this repo
  • Sanity Best Practices

    sanity-io/agent-toolkit

    Official

    Sanity development best practices for schema design, GROQ queries, TypeGen, Visual Editing, images, Portable Text, Studio structure, localization, migrations, Sanity Functions, webhooks, Blueprints…

    188 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Portable Text Conversion

    sanity-io/agent-toolkit

    Official

    Convert HTML and Markdown content into Portable Text blocks for Sanity.

    188 GitHub starsUsed in 1 repo~664 tokens
    Auto-check passed
  • Portable Text Serialization

    sanity-io/agent-toolkit

    Official

    Render and serialize Portable Text to React, Svelte, Vue, Astro, HTML, Markdown, and plain text.

    188 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • SEO Aeo Best Practices

    sanity-io/agent-toolkit

    Official

    SEO and AEO best practices for metadata, Open Graph, sitemaps, robots.txt, hreflang, JSON-LD structured data, EEAT, and content optimized for search engines and AI answer surfaces.

    188 GitHub starsUsed in 2 repos~467 tokens
    Auto-check passed
  • Sanity Studio Upgrade

    sanity-io/agent-toolkit

    Official

    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.

    188 GitHub stars~4.8k tokensUpdated yesterday
    Auto-check passed
  • Official

    Content experimentation and A/B testing guidance covering experiment design, hypotheses, metrics, sample size, statistical foundations, CMS-managed variants, and common analysis pitfalls.

    188 GitHub starsUsed in 1 repo~469 tokens
    Auto-check passed

Questions about Sanity Migration

What does Sanity Migration do?

Plans, implements, and reviews migrations from other CMSes and content systems into Sanity. Sanity Migration is an agent skill from sanity-io/agent-toolkit, published by the product's own GitHub organization. Plans, implements, and reviews migrations from other CMSes and content systems into Sanity.

When should I use Sanity Migration?

Sanity Migration fits situations like: replatforming to Sanity from AEM; adobe Experience Manager; markdown/MDX/frontmatter files; WXR/XML exports.

How do I install Sanity Migration in Claude Code?

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

How do I install Sanity Migration in Codex?

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

Can I use Sanity Migration 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/agent-toolkit --skill sanity-migration -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-migration, .gemini/skills/sanity-migration, .github/skills/sanity-migration and .opencode/skills/sanity-migration in your project.

What does Sanity Migration need to run?

Going by SKILL.md and its folder, Sanity Migration needs the command-line tools its instructions call (npx). Our summary lists: Node.js.

Does Sanity Migration access the network?

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

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

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

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 18k tokens, read only when the agent opens those files.

What are the alternatives to Sanity Migration?

Skills that share tags, products or a category with Sanity Migration: Content Management Systems (github/awesome-copilot, 40k stars), Prompt Gap To Publish (amplitude/builder-skills, 159 stars), Cms Migration (payloadcms/skills, 163 stars) and Citation Recovery Optimizer (amplitude/builder-skills, 159 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sanity Migration?

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

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