[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CXH4NPE9S4VH2MCKTP1A6D":3,"skill-same:01M7CXH4NPE9S4VH2MCKTP1A6D":55},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7CXH4NPE9S4VH2MCKTP1A6D","portable-text-serialization",null,"Render and serialize Portable Text to React, Svelte, Vue, Astro, HTML, Markdown, and plain text. Use when implementing Portable Text rendering in any frontend framework, building custom serializers for non-standard block types, converting Portable Text to HTML strings server-side, converting Portable Text to Markdown, extracting plain text from Portable Text, or troubleshooting rendering issues with marks, blocks, lists, or custom types.","om-scogo\u002Fskillsh-scraper","om-scogo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160466840?v=4","01M79AWB6DFVCQ7RK70CS34B96","Om Achrekar","01M79AWB6ZM9SKR8KDH1WSSM22",0,"MIT","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fsanity-io-agent-toolkit\u002Fportable-text-serialization\u002FSkill.md",[],[],"2026-11-15 14:19:17",false,"---\nname: portable-text-serialization\ndescription: Render and serialize Portable Text to React, Svelte, Vue, Astro, HTML, Markdown, and plain text. Use when implementing Portable Text rendering in any frontend framework, building custom serializers for non-standard block types, converting Portable Text to HTML strings server-side, converting Portable Text to Markdown, extracting plain text from Portable Text, or troubleshooting rendering issues with marks, blocks, lists, or custom types.\nlicense: MIT\nmetadata:\n  author: sanity\n  version: \"1.0.0\"\n---\n\n# Portable Text Serialization\n\nRender Portable Text content across frameworks using the `@portabletext\u002F*` library family. Each library follows the same component-mapping pattern: you provide a `components` object that maps PT node types to framework-specific renderers.\n\n## Portable Text Structure (Quick Reference)\n\nPT is an array of blocks. Each block has `_type`, optional `style`, `children` (spans), `markDefs`, `listItem`, and `level`.\n\n```\nRoot array\n├── block (_type: \"block\")\n│   ├── style: \"normal\" | \"h1\" | \"h2\" | \"blockquote\" | ...\n│   ├── children: [span, span, ...]\n│   │   └── span: { _type: \"span\", text: \"...\", marks: [\"strong\", \"\u003CmarkDefKey>\"] }\n│   ├── markDefs: [{ _key, _type: \"link\", href: \"...\" }, ...]\n│   ├── listItem: \"bullet\" | \"number\" (optional)\n│   └── level: 1, 2, 3... (optional, for nested lists)\n├── custom block (_type: \"image\" | \"code\" | any custom type)\n└── ...more blocks\n```\n\n**Marks** come in two forms:\n- **Decorators**: string values in `marks[]` like `\"strong\"`, `\"em\"`, `\"underline\"`, `\"code\"`\n- **Annotations**: keys in `marks[]` referencing entries in `markDefs[]` (e.g., links, internal references)\n\n## Component Mapping Pattern (All Frameworks)\n\nEvery `@portabletext\u002F*` library accepts a `components` object with these keys:\n\n| Key | Renders | Props\u002FData |\n|-----|---------|------------|\n| `types` | Custom block\u002Finline types (image, code, CTA) | `value` (the block data) |\n| `marks` | Decorators + annotations | `children` + `value` (mark data) |\n| `block` | Block styles (h1, normal, blockquote) | `children` |\n| `list` | List wrappers (ul, ol) | `children` |\n| `listItem` | List items | `children` |\n| `hardBreak` | Line breaks within a block | — |\n\n## Framework-Specific Rules\n\nRead the rule file matching your framework:\n\n- **React \u002F Next.js**: `rules\u002Freact.md` — `@portabletext\u002Freact` or `next-sanity`\n- **Svelte \u002F SvelteKit**: `rules\u002Fsvelte.md` — `@portabletext\u002Fsvelte`\n- **Vue \u002F Nuxt**: `rules\u002Fvue.md` — `@portabletext\u002Fvue`\n- **Astro**: `rules\u002Fastro.md` — `astro-portabletext`\n- **HTML (server-side)**: `rules\u002Fhtml.md` — `@portabletext\u002Fto-html`\n- **Markdown**: `rules\u002Fmarkdown.md` — `@portabletext\u002Fmarkdown`\n- **Plain text extraction**: `rules\u002Fplain-text.md` — `@portabletext\u002Ftoolkit`\n\n### Additional Community Serializers\n\nThese are listed on [portabletext.org](https:\u002F\u002Fwww.portabletext.org\u002Fintegrations\u002Fserializers\u002F) but don't have dedicated rule files:\n\n| Target | Package |\n|--------|---------|\n| React Native | `@portabletext\u002Freact-native-portabletext` |\n| React PDF | `@portabletext\u002Freact-pdf-portabletext` |\n| Solid | `solid-portabletext` |\n| Qwik | `portabletext-qwik` |\n| Shopify Liquid | `portable-text-to-liquid` |\n| PHP | `sanity-php` (SanityBlockContent class) |\n| Python | `portabletext-html` |\n| C# \u002F .NET | `dotnet-portable-text` |\n| Dart \u002F Flutter | `flutter_sanity_portable_text` |\n\n## Common Patterns (All Frameworks)\n\n### Custom Types Need Explicit Components\n\nPT renderers only handle standard blocks by default. Custom types (`image`, `code`, `callToAction`, etc.) require explicit component mappings — they won't render otherwise.\n\n### Keep Components Object Stable\n\nIn React\u002FVue, define `components` outside the render function or memoize it. Recreating on every render causes unnecessary re-renders.\n\n### Handle Missing Components Gracefully\n\nAll libraries accept `onMissingComponent` to control behavior when encountering unknown types:\n- `false` — suppress warnings\n- Custom function — log or report\n\n### Querying PT with GROQ\n\nAlways expand references inside custom blocks:\n\n```groq\nbody[]{\n  ...,\n  _type == \"image\" => {\n    ...,\n    asset->\n  },\n  markDefs[]{\n    ...,\n    _type == \"internalLink\" => {\n      ...,\n      \"slug\": @.reference->slug.current\n    }\n  }\n}\n```\n","# Portable Text Serialization\n\nRender Portable Text content across frameworks using the `@portabletext\u002F*` library family. Each library follows the same component-mapping pattern: you provide a `components` object that maps PT node types to framework-specific renderers.\n\n## Portable Text Structure (Quick Reference)\n\nPT is an array of blocks. Each block has `_type`, optional `style`, `children` (spans), `markDefs`, `listItem`, and `level`.\n\n```\nRoot array\n├── block (_type: \"block\")\n│   ├── style: \"normal\" | \"h1\" | \"h2\" | \"blockquote\" | ...\n│   ├── children: [span, span, ...]\n│   │   └── span: { _type: \"span\", text: \"...\", marks: [\"strong\", \"\u003CmarkDefKey>\"] }\n│   ├── markDefs: [{ _key, _type: \"link\", href: \"...\" }, ...]\n│   ├── listItem: \"bullet\" | \"number\" (optional)\n│   └── level: 1, 2, 3... (optional, for nested lists)\n├── custom block (_type: \"image\" | \"code\" | any custom type)\n└── ...more blocks\n```\n\n**Marks** come in two forms:\n- **Decorators**: string values in `marks[]` like `\"strong\"`, `\"em\"`, `\"underline\"`, `\"code\"`\n- **Annotations**: keys in `marks[]` referencing entries in `markDefs[]` (e.g., links, internal references)\n\n## Component Mapping Pattern (All Frameworks)\n\nEvery `@portabletext\u002F*` library accepts a `components` object with these keys:\n\n| Key | Renders | Props\u002FData |\n|-----|---------|------------|\n| `types` | Custom block\u002Finline types (image, code, CTA) | `value` (the block data) |\n| `marks` | Decorators + annotations | `children` + `value` (mark data) |\n| `block` | Block styles (h1, normal, blockquote) | `children` |\n| `list` | List wrappers (ul, ol) | `children` |\n| `listItem` | List items | `children` |\n| `hardBreak` | Line breaks within a block | — |\n\n## Framework-Specific Rules\n\nRead the rule file matching your framework:\n\n- **React \u002F Next.js**: `rules\u002Freact.md` — `@portabletext\u002Freact` or `next-sanity`\n- **Svelte \u002F SvelteKit**: `rules\u002Fsvelte.md` — `@portabletext\u002Fsvelte`\n- **Vue \u002F Nuxt**: `rules\u002Fvue.md` — `@portabletext\u002Fvue`\n- **Astro**: `rules\u002Fastro.md` — `astro-portabletext`\n- **HTML (server-side)**: `rules\u002Fhtml.md` — `@portabletext\u002Fto-html`\n- **Markdown**: `rules\u002Fmarkdown.md` — `@portabletext\u002Fmarkdown`\n- **Plain text extraction**: `rules\u002Fplain-text.md` — `@portabletext\u002Ftoolkit`\n\n### Additional Community Serializers\n\nThese are listed on [portabletext.org](https:\u002F\u002Fwww.portabletext.org\u002Fintegrations\u002Fserializers\u002F) but don't have dedicated rule files:\n\n| Target | Package |\n|--------|---------|\n| React Native | `@portabletext\u002Freact-native-portabletext` |\n| React PDF | `@portabletext\u002Freact-pdf-portabletext` |\n| Solid | `solid-portabletext` |\n| Qwik | `portabletext-qwik` |\n| Shopify Liquid | `portable-text-to-liquid` |\n| PHP | `sanity-php` (SanityBlockContent class) |\n| Python | `portabletext-html` |\n| C# \u002F .NET | `dotnet-portable-text` |\n| Dart \u002F Flutter | `flutter_sanity_portable_text` |\n\n## Common Patterns (All Frameworks)\n\n### Custom Types Need Explicit Components\n\nPT renderers only handle standard blocks by default. Custom types (`image`, `code`, `callToAction`, etc.) require explicit component mappings — they won't render otherwise.\n\n### Keep Components Object Stable\n\nIn React\u002FVue, define `components` outside the render function or memoize it. Recreating on every render causes unnecessary re-renders.\n\n### Handle Missing Components Gracefully\n\nAll libraries accept `onMissingComponent` to control behavior when encountering unknown types:\n- `false` — suppress warnings\n- Custom function — log or report\n\n### Querying PT with GROQ\n\nAlways expand references inside custom blocks:\n\n```groq\nbody[]{\n  ...,\n  _type == \"image\" => {\n    ...,\n    asset->\n  },\n  markDefs[]{\n    ...,\n    _type == \"internalLink\" => {\n      ...,\n      \"slug\": @.reference->slug.current\n    }\n  }\n}\n```\n",{"name":5,"license":15,"metadata":24,"description":7},{"author":25,"version":26},"sanity","1.0.0","main","8859218955d9504cd18b59e7892100718039d3b4","data\u002Fskills\u002Fsanity-io-agent-toolkit\u002Fportable-text-serialization",1,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper","https:\u002F\u002Fgithub.com\u002Fom-scogo","SDE-1 @ Scogo ","2026-07-18 12:22:46",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add om-scogo\u002Fskillsh-scraper --skill portable-text-serialization",{"tool":41,"command":42},"bunx","bunx skills add om-scogo\u002Fskillsh-scraper --skill portable-text-serialization",{"tool":44,"command":45},"pnpm","pnpm dlx skills add om-scogo\u002Fskillsh-scraper --skill portable-text-serialization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fsanity-io-agent-toolkit\u002Fportable-text-serialization\u002FSkill.md",true,[49],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"metadata.json","REFERENCE","参考文档",508,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fsanity-io-agent-toolkit\u002Fportable-text-serialization\u002Fmetadata.json",[56,63,68,75,80,87],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7D6MC9FAAEV4CMNYX8W7JTG","arxiv-search","Search arXiv physics, math, and computer science preprints using natural language queries. Powered by Valyu semantic search.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002Fskills\u002Farxiv-search\u002FSKILL.md",[],[],{"skillNo":64,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7D6M85CKKN87TA98VCQV4H7","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002FSkill.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7D4ZTCS4DR3CE4JY06X84T2","working-with-legacy-code","Safely change and test untested codebases using Feathers' \"Working Effectively with Legacy Code\". Use when the user mentions \"legacy code\", \"no tests\", \"untested codebase\", \"how do I test this\", \"seams\", \"characterization tests\", \"golden master\", \"sprout method\", \"afraid to change this code\", \"monster method\", \"dependency breaking\", or \"inherited a messy codebase\". Also trigger when changing code without tests safely, getting a class under test when constructors, statics, or singletons block it, adding features to tangled modules, or planning incremental test coverage for an old codebase. Covers the legacy-code change algorithm, seams, characterization tests, sprout\u002Fwrap, and dependency-breaking techniques. For refactoring code that already has tests, see refactoring-patterns. For day-to-day code quality, see clean-code.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002Fworking-with-legacy-code\u002FSKILL.md",[],[],{"skillNo":76,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7D4ZHZKJD2RSNGAF63V14P4","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002FSkill.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7D4ZB4CJBFW5JE67CPH2QRV","web-typography","Select, pair, and implement typefaces for web projects. Use when the user mentions \"font pairing\", \"which typeface\", \"line height\", \"responsive typography\", \"web font loading\", \"type hierarchy\", \"variable fonts\", \"FOUT\u002FFOIT\", \"typographic scale\", or \"the text is hard to read\". Also trigger when choosing between system fonts and web fonts, optimizing font-loading performance, or designing readable long-form content. Covers readability evaluation, CSS implementation, and performance optimization. For overall UI design systems, see refactoring-ui. For dramatic typographic experiences, see top-design.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002Fweb-typography\u002FSKILL.md",[],[],{"skillNo":88,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7D4Z4MVYVY3NMJ18BNV6WNA","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002FSkill.md",[],[]]