[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71P2ZCEJD0PKC458YTP1FJW":3,"skill-same:01M71P2ZCEJD0PKC458YTP1FJW":74},{"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":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":6,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M71P2ZCEJD0PKC458YTP1FJW","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.","iDorgham\u002FWorkspace-Factory","iDorgham","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F136521493?v=4","01M6CNGBDAHE4ARW3YJEF4X2FD","Dorgham","01M71E8H3CXZ7DJX59MTM9JEB2",1,"MIT","https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002Ffactory\u002Flibrary\u002Fskills\u002Fofficial_sanity_io_portable_text_serialization\u002Fskill.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"portable text serialization","portable","serialization","text","vue","rendering","markdown","server","astro","sanity","react","when","svelte","frontend","implementing","issues","render","strings","types","extracting","2026-11-10 10:56:23",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":49,"description":7},{"author":33,"version":50},"1.0.0","master","c2e410e11df4d80d885e0ecf0583ef3c926df736","factory\u002Flibrary\u002Fskills\u002Fofficial_sanity_io_portable_text_serialization",0,"https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory","https:\u002F\u002Fgithub.com\u002FiDorgham","Dorgham.me","hey I'm Dorgham \r\nI code, I create, and AI codes back. \r\nMaybe we can give AI the chance!! now we begin. 🚀🤖\r\n... . . . git commit -m \"Hello, Future\" ","2026-05-04 18:39:09",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add iDorgham\u002FWorkspace-Factory --skill portable-text-serialization",{"tool":66,"command":67},"bunx","bunx skills add iDorgham\u002FWorkspace-Factory --skill portable-text-serialization",{"tool":69,"command":70},"pnpm","pnpm dlx skills add iDorgham\u002FWorkspace-Factory --skill portable-text-serialization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002Ffactory\u002Flibrary\u002Fskills\u002Fofficial_sanity_io_portable_text_serialization\u002Fskill.md",true,[],[75,100,123,145,164,187],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":82,"publishedAt":99},"01M71P8WVBMB2X3D24R0YT0B0E","vercel-react-view-transitions","Guide for implementing smooth, native-feeling animations using React's View Transition API (`\u003CViewTransition>` component, `addTransitionType`, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter\u002Fexit of components, animate list reorder, implement directional (forward\u002Fback) navigation animations, or integrate view transitions in Next.js. Also use when the user mentions view transitions, `startViewTransition`, `ViewTransition`, transition types, or asks about animating between UI states in React without third-party animation libraries.","https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002Ffactory\u002Flibrary\u002Fskills\u002Fofficial_vercel_labs_react_view_transitions\u002Fskill.md",[81],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[34,83,84,85,86,87,88,89,90,91,42,92,93,38,35,94,95,96,97,98],"vercel react view transitions","view","react view transitions","vercel","transitions","shared","back","Animation","css","states","element","components","api","route","create","libraries","2026-11-10 13:02:02",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":107,"publishedAt":99},"01M71P8TDGHZ289TSAC5VTG2EW","vercel-react-native-skills","React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.","https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002Ffactory\u002Flibrary\u002Fskills\u002Fofficial_vercel_labs_react_native_skills\u002Fskill.md",[106],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[34,108,109,86,110,111,112,113,38,114,35,115,94,116,117,118,119,120,121,122],"react native","native","vercel react native skills","react native skills","modules","performance","apps","tasks","mobile","expo","list","mobile performance","platform","animations","for",{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":130,"publishedAt":99},"01M71P8QK4JF5BYRGYDDGPZQG9","vercel-react-best-practices","React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React\u002FNext.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.","https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002Ffactory\u002Flibrary\u002Fskills\u002Fofficial_vercel_labs_react_best_practices\u002Fskill.md",[129],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[34,131,132,86,133,113,134,35,135,115,94,136,137,138,139,140,141,142,143,144],"react best practices","vercel react best practices","best practices","writing","code","data fetching","react components","next","refactoring","data","patterns","Optimization","guidelines","triggers",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":152,"publishedAt":99},"01M71P8HVEA70K5N6ZVJCG2ED3","vercel-composition-patterns","React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.","https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002Ffactory\u002Flibrary\u002Fskills\u002Fofficial_vercel_labs_composition_patterns\u002Fskill.md",[151],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[153,86,154,141,155,156,157,40,144,158,159,160,35,161,115,94,162,163,95,34],"Composition","composition patterns","vercel composition patterns","react composition patterns","react 19","boolean","component architecture","use","reusable","architecture","react composition",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":173,"publishedAt":99},"01M71P60XXKKP222ZFJRG7R373","supabase-postgres-best-practices","Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.","https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002Ffactory\u002Flibrary\u002Fskills\u002Fofficial_supabase_supabase_postgres_best_practices\u002Fskill.md",[170],{"categoryNo":171,"categoryName":172,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",[174,175,176,177,133,178,179,180,122,142,113,181,182,134,183,160,184,185,186,35],"postgres best practices","supabase","postgres","supabase postgres best practices","categories","postgres performance","advanced","correct","schema","impact","Rules","critical","database",{"skillNo":188,"name":189,"nameZh":6,"description":190,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":191,"categories":192,"keywords":193,"publishedAt":44},"01M71P2WST0X0AS95C6VHQN11P","portable-text-conversion","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\u002Fmarkdown (markdownToPortableText), @portabletext\u002Fblock-tools (htmlToBlocks), custom deserializers, and the Portable Text specification for manual block construction.","https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002Ffactory\u002Flibrary\u002Fskills\u002Fofficial_sanity_io_portable_text_conversion\u002Fskill.md",[],[194,27,195,25,196,122,197,198,199,160,200,201,35,202,203,204,33,30,205,206],"conversion","portable text conversion","rich","manual","custom","ingest","Legacy","documents","convert","specification","markdown content","block","blocks"]