CtrlK
BlogDocsLog inGet started
Tessl Logo

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/markdown (markdownToPortableText), @portabletext/block-tools (htmlToBlocks), custom deserializers, and the Portable Text specification for manual block construction.

64

Quality

81%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

61%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A well-organized, concise overview that correctly delegates detail to rule files, but the referenced files are missing from the bundle and the conversion workflow lacks executable invocations and validation checkpoints. Strong structure, weaker on actionable execution and verification.

Suggestions

Add a minimal executable snippet for each approach (e.g., an actual `markdownToPortableText(md)` and `htmlToBlocks(html, schemaType)` call) so the body is actionable even before opening the rule files.

Include a validation/verification checkpoint after conversion — e.g., assert every block/span has a unique `_key` and that `marks` reference existing `markDefs[*]._key` — since migration/import is a batch operation.

Either ship the referenced rule files (rules/markdown-to-pt.md, rules/html-to-pt.md, rules/manual-construction.md) or inline their essential guidance so the progressive-disclosure navigation does not lead to missing files.

DimensionReasoningScore

Conciseness

The body is lean and assumes competence (three-line approach list, tight "Key rules"); the 26-line Portable Text JSON example is slightly heavier than needed but earns its place by illustrating block/span/_key/markDefs at once, so it sits at the efficient score-4 anchor rather than the fully-trimmed score-5 anchor.

4 / 5

Actionability

It names concrete functions/packages and provides a complete target-output JSON example, but shows no executable conversion invocation and delegates the actual call details to the rule files, which are not present — landing at the score-3 "some concrete guidance but incomplete" anchor rather than score-4's "mostly executable" level.

3 / 5

Workflow Clarity

A rough sequence exists (understand the spec, choose an approach by source format, read the matching rule file) but there are no explicit validation checkpoints (e.g., verify _key uniqueness / valid PT), and the migration/import context is batch-like, so the batch-operation cap holds the score at 3 rather than 4.

3 / 5

Progressive Disclosure

Structure and signaling are excellent — an overview with three clearly-labeled one-level-deep references ("rules/markdown-to-pt.md", etc.) — but those referenced rule files are not present in the bundle, so navigation is incomplete, placing it just below the score-5 anchor at score-4.

4 / 5

Total

14

/

20

Passed

Description

92%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong, specific description that clearly states both what the skill does and when to use it, anchored to a distinct Sanity/Portable Text niche. Keyword coverage is comprehensive in phrasing but lacks file-extension triggers.

DimensionReasoningScore

Specificity

"Convert HTML and Markdown content into Portable Text blocks for Sanity" plus a closing clause covering "@portabletext/markdown (markdownToPortableText), @portabletext/block-tools (htmlToBlocks), custom deserializers, and the Portable Text specification" lists multiple concrete actions and tools with comprehensive coverage, matching the score-5 anchor rather than the score-4 anchor where coverage has minor gaps.

5 / 5

Completeness

It states a clear "what" (convert HTML/Markdown into Portable Text blocks for Sanity, covering named tools) and an explicit "Use when ..." clause with concrete trigger phrases, matching the score-5 anchor and not the score-4 anchor where "when" could be more explicit.

5 / 5

Trigger Term Quality

"migrating content from legacy CMSs, importing HTML or Markdown into Sanity, building content pipelines that ingest external content, converting rich text between formats" gives strong natural keyword coverage with synonyms, but it omits file extensions such as .html/.md, so it sits just below the comprehensive score-5 anchor.

4 / 5

Distinctiveness Conflict Risk

Tied to a specific niche (Sanity Portable Text, legacy CMS migration) with distinct triggers and minimal overlap with other skills, matching the score-5 "clear niche with distinct triggers" anchor rather than the score-4 "mostly distinct" anchor.

5 / 5

Total

19

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository
sanity-io/agent-toolkit
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.