sanity-migration
Skill187 starsChanged 7 months agoMITView on GitHub
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.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Aymenjdily/biblion-testing-agentic-ai-skillsword for word, first seen Sep 4, 2026
Other versions1 project uses a version of this.
Word for word · 1
- Aymenjdily/biblion-testing-agentic-ai-skills★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 16 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill for CMS-to-Sanity migration work.
- Distinctive: line 13
If the source platform is known, also read its guide:
- Distinctive: line 22
Before writing code, produce a short migration plan covering source access, content scope, schema decisions, extraction, transformation, …
- Distinctive: line 23
Prefer deterministic, repeatable scripts for real migrations.
- Distinctive: line 37
Use stable document IDs derived from source IDs, slugs, paths, or hashes.
- Very specific: line 38
Use createOrReplace, createIfNotExists, or sanity datasets import --replace so reruns converge.
- Distinctive: line 40
Import or create referenced documents before documents that reference them.
- Distinctive: line 49
Use documents for reusable or independently managed entities.
- Very specific: line 50
Use defineType, defineField, and defineArrayMember if authoring Sanity schemas.
- Distinctive: line 51
Use image/file fields with uploaded Sanity assets or Media Library assets, not legacy CDN URLs.
- Distinctive: line 52
Use Portable Text arrays for rich text and custom blocks.
- Distinctive: line 53
Run schema extraction and TypeGen after schema or GROQ query changes when the project uses TypeScript.
- Distinctive: line 64
Stop before coding when any of these are unclear:
- Distinctive: line 74
Do not create random IDs for source-backed documents.
- Very specific: line 75
Do not fetch-then-create referenced documents.
- Distinctive: line 76
Do not run bulk migrations through MCP content tools when NDJSON or scripts are appropriate.
- Distinctive: line 77
Do not flatten locale fallback values into translations unless requested.
- Distinctive: line 78
Do not leave TODOs for required media, authors, references, or rich text conversion.
- Distinctive: line 79
Do not declare a migration done without count checks, sample checks, reference checks, and route/redirect checks.
- Very specific: line 83
Use references/general.md for shared migration principles and the platform references for source-specific extraction routes, modeling …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
- Read
references/general.mdfirst. - 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
- AEM / Adobe Experience Manager:
- Before writing code, produce a short migration plan covering source access, content scope, schema decisions, extraction, transformation, import, validation, redirects, and cutover.
- 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, orsanity datasets import --replaceso 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, anddefineArrayMemberif 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:
npx skills add sanity-io/agent-toolkit --skill sanity-best-practicesStop 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

