๐Ÿ“
FrontendJavaScript

Portable Text Serialization

by sanity-io

Portable Text Serialization is a Frontend skill for Claude Code, published by sanity-io in agent-toolkit.

181 stars28 forkson sanity-io/agent-toolkitAdded 2026/09/07+1% in starsRepository updated 2026/09/04
agent-rulesai-rulesclaude-codeclaude-code-plugincursor-aimcpmcp-servervs-code
Install in seconds
Install Portable Text Serialization
Copy Portable Text Serialization into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/sanity-io/agent-toolkit/tree/main/skills/portable-text-serialization ~/.claude/skills/portable-text-serialization

Requires Node.js. Downloads this skill only โ€” not the rest of the repository โ€” into your Claude Code skills folder.

Without Node.js

git clone https://github.com/sanity-io/agent-toolkit.git

Clones the whole repository, then copy the skillโ€™s own directory into your skills folder yourself.

In this catalog

Source file
skills/portable-text-serialization/SKILL.md in sanity-io/agent-toolkit
Installs to
~/.claude/skills/portable-text-serialization
Collection
One of 7 skills cataloged from this repository
Category
Frontend โ€” 705 skills

What Portable Text Serialization does

Portable Text Serialization renders and serializes Portable Text to React, Svelte, Vue, Astro, HTML, Markdown, and plain text. Use it when building Portable Text renderers, custom serializers, or troubleshooting marks, blocks, lists, and custom types.

Portable Text Serialization is cataloged under Frontend on DirSkills. Portable Text Serialization comes from a repository tagged agent-rules, ai-rules, claude-code, claude-code-plugin and cursor-ai.

Documentation

README

Portable Text Serialization

Render Portable Text content across frameworks using the @portabletext/* library family. Each library follows the same component-mapping pattern: you provide a components object that maps PT node types to framework-specific renderers.

Portable Text Structure (Quick Reference)

PT is an array of blocks. Each block has _type, optional style, children (spans), markDefs, listItem, and level.

This is the opening of the README. Read the full README on GitHub.

Frequently asked about Portable Text Serialization

  • What else does sanity-io publish alongside Portable Text Serialization?

    Portable Text Serialization is one of 7 skills that DirSkills catalogs from sanity-io/agent-toolkit, the repository it ships in. Its siblings there include Content Experimentation Best Practices, Content Modeling Best Practices and Portable Text Conversion. Each one is a separate skill with its own page in this directory, installs the same way Portable Text Serialization does, and is maintained by sanity-io in that same repository. The rest of the collection is listed on the sanity-io/agent-toolkit page.

  • How does Portable Text Serialization compare to other Frontend skills?

    Portable Text Serialization ranks #633 by stars among the 705 Frontend skills in this catalog. The most-starred ones next to it are Angular Developer, Android Clean Architecture and Accessibility. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Portable Text Serialization against them. Open each page to compare what they document and how they install.

More from sanity-io/agent-toolkit

Portable Text Serialization is one of 7 skills cataloged on DirSkills from sanity-io/agent-toolkit.

See all 7 skills โ†’
๐Ÿงช
2h ago

Content Experimentation Best Practices

Content Experimentation Best Practices gives guidance for designing A/B and multivariate tests, choosing metrics, and interpreting results. Use it when planning experiments, setting up CMS-managed variants, or avoiding common analysis mistakes.
SEO
18128
๐Ÿงฉ
2h ago

Content Modeling Best Practices

Content Modeling Best Practices guides structured content decisions for schemas, reuse, references, and taxonomies. Use it when designing or refactoring content models in Sanity or another headless CMS.
Frontend
18128
๐Ÿ“
2h ago

Portable Text Conversion

Portable Text Conversion turns HTML and Markdown into Sanity Portable Text blocks. Use it when migrating content, importing rich text, or building pipelines that create Portable Text programmatically.
AI Engineering
18128
๐Ÿ”Ž
2h ago

SEO & AEO Best Practices

SEO & AEO Best Practices covers metadata, sitemaps, robots.txt, hreflang, JSON-LD, and EEAT. Use it when optimizing pages for search engines and AI answer surfaces like ChatGPT or Perplexity.
SEO
18128
๐Ÿงฉ
2h ago

Sanity Best Practices

Sanity Best Practices covers schema design, GROQ queries, Studio structure, TypeGen, Visual Editing, localization, migrations, Functions, and framework integrations. Use it when building or reviewing Sanity projects and content workflows.
AI Engineering
18128
๐Ÿ—„๏ธ
2h ago

Sanity Migration

Sanity Migration plans and reviews CMS-to-Sanity migrations from exports, APIs, and databases. Use it to map content, convert rich text and assets, set redirects, and validate cutover.
AI Engineering
18128