If you're migrating content into Sanity or building ingestion pipelines, this handles the conversion work. It covers three approaches: markdownToPortableText from @portabletext/markdown for direct Markdown conversion, htmlToBlocks from @portabletext/block-tools for HTML migration, and manual block construction when you need full control. The guides break down the Portable Text spec (blocks, spans, keys, markDefs) and show concrete conversion patterns for each source format. Handy reference if you've ever stared at a legacy CMS export wondering how to turn it into proper PT blocks without writing a parser from scratch.
npx skills add https://github.com/sanity-io/agent-toolkit --skill portable-text-conversion