Agent skill

Portable Text

by portabletext in portabletext/editor

Work with Portable Text, a JSON-based specification for structured block content.

MITAuto-check passedDocuments & Office

Install Portable Text

skills CLI
$ npx skills add portabletext/editor --skill portable-text -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install portabletext/editor portable-text --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/portabletext/editor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/apps/docs/public .claude/skills/portable-text && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
portable-text
GitHub stars
280
Token cost
~656 tokens
SKILL.md length
264 words
Files
4
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

Work with Portable Text, a JSON-based specification for structured block content.

  • Works in 4 steps: Define a schema with… → Wrap the editor in EditorProvider to… → Render PortableTextEditable for the… → …
  • Render Portable Text in React
  • SKILL.md covers Rendering existing Portable Text, Building an editor, Converting into Portable Text and When unsure
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Portable Text is an agent skill from portabletext/editor. Work with Portable Text, a JSON-based specification for structured block content. Use this skill to render Portable Text in React, HTML, Vue, Svelte, or Markdown, to build a block content editor with @portabletext/editor, or to convert HTML and Markdown into Portable Text.

Its SKILL.md is about 660 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files.

It sits in Documents & Office, covering Markdown. It works with React, Svelte and Vue.js. The repository describes itself as: The Standalone Portable Text Editor. The licence is MIT.

When your agent uses it

  • Render Portable Text in React
  • Build a block content editor with @portabletext/editor
  • Convert HTML and Markdown into Portable Text

Example prompts

  • “/portable-text”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Define a schema with defineSchema({decorators, styles, lists, ...}).
  2. Wrap the editor in EditorProvider to supply the schema and initial value.
  3. Render PortableTextEditable for the editable surface.
  4. Listen for changes with EventListenerPlugin from @portabletext/editor/plugins.

What it can do on your machine

Read from SKILL.md and the folder at commit 60a494b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • portabletext.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Portable Text loads about 656 tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 264 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~72
When it runs · the whole SKILL.md, loaded when a task matches
~656

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from portabletext/editor at commit 60a494b, republished under its MIT licence (© portabletext). 264 words, ~656 tokens.

Download SKILL.mdSave it as .claude/skills/portable-text/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
portable-text
description
Work with Portable Text, a JSON-based specification for structured block content. Use this skill to render Portable Text in React, HTML, Vue, Svelte, or Markdown, to build a block content editor with @portabletext/editor, or to convert HTML and Markdown into Portable Text.

Portable Text

Portable Text is an open, JSON-based specification for structured block content. Content is stored as an array of typed blocks: each block has a _type and carries its own data. The same content renders to React, HTML, Markdown, or any other target through a serializer.

Full documentation index: https://www.portabletext.org/llms.txt Complete corpus: https://www.portabletext.org/llms-full.txt Every page is available as Markdown by appending .md (e.g. /rendering/react.md).

Rendering existing Portable Text

Pick the serializer for the target. Pass the Portable Text value to it.

  • React: @portabletext/react exposes <PortableText value={value} />. Override defaults with the components prop (marks, types, block, list). See /rendering/react.md.
  • HTML string: @portabletext/to-html (toHTML). Works in Node, Deno, edge, and browsers. See /rendering/html.md.
  • Vue: @portabletext/vue. See /rendering/vue.md.
  • Svelte: @portabletext/svelte. See /rendering/svelte.md.
  • Markdown: @portabletext/markdown. See /rendering/markdown.md.

Unknown block types are skipped unless you provide a component for them, so custom types never crash a render.

Building an editor

@portabletext/editor is a headless, schema-driven React editor.

  1. Define a schema with defineSchema({decorators, styles, lists, ...}).
  2. Wrap the editor in EditorProvider to supply the schema and initial value.
  3. Render PortableTextEditable for the editable surface.
  4. Listen for changes with EventListenerPlugin from @portabletext/editor/plugins.

Toolbars come from @portabletext/toolbar and keyboard shortcuts from @portabletext/keyboard-shortcuts. Editor behavior is customized through the Behavior API (defineBehavior). Start at /editor/getting-started.md.

Converting into Portable Text

  • HTML to Portable Text: @portabletext/block-tools (htmlToBlocks). See /conversion/html-to-portable-text.md.
  • Markdown to Portable Text: @portabletext/markdown. See /conversion/markdown-to-portable-text.md.

When unsure

Read /llms-full.txt for the full documentation, or fetch the .md variant of the relevant page. Do not invent block types or component APIs; the schema and the serializer components map define what exists.

© portabletext, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files in apps/docs/public of portabletext/editor.

  • SKILL.md
  • favicon.svg
  • portable-text-logo.png
  • robots.txt

Open the folder on GitHubat commit 60a494b

Compare with similar skills

Portable Text next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Portable Text compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Portable Text this skillportabletext/editor280—~656Automated safety check: PassMIT
Portable Text Serializationsanity-io/agent-toolkit1881 repos~1.1kAutomated safety check: PassMIT
Markstream MigrationSimon-He95/markstream-vue3k—~2kAutomated safety check: PassMIT
Markstream ReactSimon-He95/markstream-vue3k—~1.2kAutomated safety check: PassMIT
Markstream Custom ComponentsSimon-He95/markstream-vue3k—~955Automated safety check: PassMIT
Wayfinder Developmentslimani-dev/muraqib1281 repos~622Automated safety check: PassMIT

Similar skills

  • Portable Text Serialization

    sanity-io/agent-toolkit

    Official

    Render and serialize Portable Text to React, Svelte, Vue, Astro, HTML, Markdown, and plain text.

    188 GitHub starsUsed in 1 repo~1.1k tokens
    Frontend & DesignAuto-check passed
  • Markstream Migration

    Simon-He95/markstream-vue

    Audit and migrate existing Markdown rendering to Markstream, or upgrade a markstream-vue 1.x integration to 2.x.

    3k GitHub stars~2k tokensUpdated 3 days ago
    Documents & OfficeAuto-check passed
  • Markstream React

    Simon-He95/markstream-vue

    Integrate the beta markstream-react package into a React 18+ or Next app.

    3k GitHub stars~1.2k tokensUpdated 3 days ago
    Documents & OfficeAuto-check passed
  • Markstream Custom Components

    Simon-He95/markstream-vue

    Override built-in Markstream node renderers and add trusted custom tags across Vue, React, Svelte, and Angular.

    3k GitHub stars~955 tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Wayfinder Development

    slimani-dev/muraqib

    A skill your agent uses for Laravel Wayfinder which auto-generates typed functions for Laravel controllers and routes.

    128 GitHub starsUsed in 1 repo~622 tokens
    Backend & APIsAuto-check passed
  • Add Shader Cursor Trail

    nirholas/three.ws

    Add the Shaders WebGPU mouse effect used for the Tidal Commons hero: a white twinkling halftone cursor trail driven by ChromaFlow, masked through a DotGrid, finished with chromatic ripples and film…

    227 GitHub starsUsed in 1 repo~760 tokens
    Game DevelopmentAuto-check passed

More from portabletext/editor

All 10 skills in this repo
  • Product Copy Assistant

    portabletext/editor

    Write clear, concise, accessible product copy for interfaces, docs, and system messages.

    280 GitHub stars~635 tokensUpdated 2 days ago
    Auto-check passed
  • Changesets

    portabletext/editor

    How to write changesets in the Portable Text Editor monorepo.

    280 GitHub stars~2.1k tokensUpdated 2 days ago
    Auto-check passed
  • Commits

    portabletext/editor

    How to write commit messages in the Portable Text Editor monorepo.

    280 GitHub stars~1.9k tokensUpdated 2 days ago
    Auto-check passed
  • Next Branch

    portabletext/editor

    How the next prerelease branch for the upcoming editor major works in the Portable Text Editor monorepo.

    280 GitHub stars~1.8k tokensUpdated 2 days ago
    Auto-check passed
  • Backporting

    portabletext/editor

    How to backport a fix from main to a maintenance branch (editor-v6.x, editor-v7.x) in the Portable Text Editor monorepo.

    280 GitHub stars~1.1k tokensUpdated 2 days ago
    Auto-check passed
  • Code Comments

    portabletext/editor

    How to write and review code comments in the Portable Text Editor monorepo.

    280 GitHub stars~1.1k tokensUpdated 2 days ago
    Auto-check passed

Questions about Portable Text

What does Portable Text do?

Work with Portable Text, a JSON-based specification for structured block content. Portable Text is an agent skill from portabletext/editor. Work with Portable Text, a JSON-based specification for structured block content.

When should I use Portable Text?

Portable Text fits situations like: render Portable Text in React; build a block content editor with @portabletext/editor; convert HTML and Markdown into Portable Text.

How do I install Portable Text in Claude Code?

Run `npx skills add portabletext/editor --skill portable-text -a claude-code`. Or copy the skill folder (apps/docs/public in portabletext/editor) into .claude/skills/portable-text in your project. Claude Code loads it when a task matches its description.

How do I install Portable Text in Codex?

Run `npx skills add portabletext/editor --skill portable-text -a codex`. Or copy the skill folder (apps/docs/public in portabletext/editor) into .agents/skills/portable-text in your project. Codex loads it when a task matches its description.

Can I use Portable Text in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add portabletext/editor --skill portable-text -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/portable-text, .gemini/skills/portable-text, .github/skills/portable-text and .opencode/skills/portable-text in your project.

What does Portable Text need to run?

SKILL.md names no scripts, command-line tools or credentials: Portable Text is instructions for the agent only.

Does Portable Text access the network?

SKILL.md names 1 domain. As links in the text: portabletext.org. This is read from the text; nothing was executed.

Is Portable Text safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Portable Text use?

Portable Text is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Portable Text use?

About 656 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Portable Text?

Skills that share tags, products or a category with Portable Text: Portable Text Serialization (sanity-io/agent-toolkit, 188 stars), Markstream Migration (Simon-He95/markstream-vue, 3k stars), Markstream React (Simon-He95/markstream-vue, 3k stars) and Markstream Custom Components (Simon-He95/markstream-vue, 3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Portable Text?

portabletext (a GitHub organization) maintains it in portabletext/editor, which has 280 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 6, 2026.

Source: portabletext/editor on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.