portable-text-conversion — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited portable-text-conversion (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Convert external content (HTML, Markdown) into Portable Text for Sanity. Three main approaches:
@portabletext/markdown (recommended for Markdown)@portabletext/block-tools (for HTML migration)Understand the target format before converting. PT is an array of blocks:
[
{
"_type": "block",
"_key": "abc123",
"style": "normal",
"children": [
{"_type": "span", "_key": "def456", "text": "Hello ", "marks": []},
{"_type": "span", "_key": "ghi789", "text": "world", "marks": ["strong"]}
],
"markDefs": []
},
{
"_type": "block",
"_key": "jkl012",
"style": "h2",
"children": [
{"_type": "span", "_key": "mno345", "text": "A heading", "marks": []}
],
"markDefs": []
},
{
"_type": "image",
"_key": "pqr678",
"asset": {"_type": "reference", "_ref": "image-abc-200x200-png"}
}
]Key rules:
_key (unique within the array)_type: "block" is for text blocks; custom types use their own _typemarkDefs holds annotation data; marks on spans reference markDefs[*]._key or are decorator stringslistItem ("bullet" | "number") and level (1, 2, 3...) on regular blocksRead the rule file matching your source format:
rules/markdown-to-pt.md — @portabletext/markdown with markdownToPortableText (recommended)rules/html-to-pt.md — @portabletext/block-tools with htmlToBlocksrules/manual-construction.md — build blocks programmatically from any sourceNote:@sanity/block-toolsis the legacy package name. Always use@portabletext/block-toolsfor new projects. The API is the same.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.