Convert HTML and Markdown content into Portable Text blocks for Sanity. Use when migrating content from legacy CMSs, importing HTML or Markdown into Sanity, building content pipelines that ingest external content, converting rich text between formats, or programmatically creating Portable Text documents. Covers @portabletext/markdown (markdownToPortableText), @portabletext/block-tools (htmlToBlocks), custom deserializers, and the Portable Text specification for manual block construction.
$npx -y skills add sanity-io/agent-toolkit --skill portable-text-conversionInstalls into the current project.
Run `npx skills use "https://github.com/sanity-io/agent-toolkit" --skill "sanity-io/agent-toolkit/portable-text-conversion"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/sanity-io/agent-toolkit" that are relevant to the current task. Run `npx skills add "https://github.com/sanity-io/agent-toolkit"` and select the relevant skills, then follow their instructions.