Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add robotostudio/turbo-start-sanity --skill portable-text-serializationgit clone --depth 1 https://github.com/robotostudio/turbo-start-sanityWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/robotostudio/turbo-start-sanity/portable-text-serialization)<a href="https://agentmods.dev/skills/robotostudio/turbo-start-sanity/portable-text-serialization"><img src="https://agentmods.dev/badge/skills/robotostudio/turbo-start-sanity/portable-text-serialization/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/robotostudio/turbo-start-sanity/portable-text-serialization"><img src="https://agentmods.dev/badge/skills/robotostudio/turbo-start-sanity/portable-text-serialization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00085 | $0.01140 |
| Opus 5.5 | $0.00034 | $0.00456 |
| Sonnet 5.5 | $0.00017 | $0.00228 |
| Haiku 4.5 | $0.00009 | $0.00114 |
Grade A, and why
portable-text-serialization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
94% identical to portable-text-serialization — 47 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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.
Root array
├── block (_type: "block")
│ ├── style: "normal" | "h1" | "h2" | "blockquote" | ...
│ ├── children: [span, span, ...]
│ │ └── span: { _type: "span", text: "...", marks: ["strong", "<markDefKey>"] }
│ ├── markDefs: [{ _key, _type: "link", href: "..." }, ...]
│ ├── listItem: "bullet" | "number" (optional)
│ └── level: 1, 2, 3... (optional, for nested lists)
├── custom block (_type: "image" | "code" | any custom type)
└── ...more blocks
Marks come in two forms:
- Decorators: string values in
marks[]like"strong","em","underline","code" - Annotations: keys in
marks[]referencing entries inmarkDefs[](e.g., links, internal references)
Component Mapping Pattern (All Frameworks)
Every @portabletext/* library accepts a components object with these keys:
| Key | Renders | Props/Data |
|---|---|---|
types |
Custom block/inline types (image, code, CTA) | value (the block data) |
marks |
Decorators + annotations | children + value (mark data) |
block |
Block styles (h1, normal, blockquote) | children |
list |
List wrappers (ul, ol) | children |
listItem |
List items | children |
hardBreak |
Line breaks within a block | — |
Framework-Specific Rules
Read the rule file matching your framework:
- React / Next.js:
rules/react.md—@portabletext/reactornext-sanity - Svelte / SvelteKit:
rules/svelte.md—@portabletext/svelte - Vue / Nuxt:
rules/vue.md—@portabletext/vue - Astro:
rules/astro.md—astro-portabletext - HTML (server-side):
rules/html.md—@portabletext/to-html - Markdown:
rules/markdown.md—@portabletext/markdown - Plain text extraction:
rules/plain-text.md—@portabletext/toolkit
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 112 lines · 85 tokens per session scan A 082c107c6e82
portable-text-serialization is a skill published in the GitHub repository robotostudio/turbo-start-sanity (189 stars, last pushed today), licensed MIT. It adds 85 tokens to every session and 1,140 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 94% identical to portable-text-serialization, differing in 47 lines, and is treated as a copy.
portable-text-serialization compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| portable-text-serializationrobotostudio/turbo-start-sanity | Skill | 189 | today | MIT | A | 85 | Claude Code |
| next-partial-prefetching-adoptionsanity-io/next-sanity | Skill | 955 | yesterday | MIT | A | 92 | Claude Code, Codex |
| sanity-live-cache-componentssanity-io/next-sanity | Skill | 955 | yesterday | MIT | A | 155 | Claude Code, Codex |
| pnpmsanity-io/next-sanity | Skill | 955 | yesterday | MIT | A | 35 | Claude Code, Codex |
| gcss-v3-site-frameworkZUnfurl/zunfurl | Skill | 51 | 16d ago | Apache-2.0 | A | 88 | Codex |
| grill-with-docssanity-io/next-sanity | Skill | 955 | yesterday | MIT | A | 57 | Claude Code, Codex |
| find-skillssanity-io/next-sanity | Skill | 955 | yesterday | MIT | A | 67 | Claude Code, Codex |