Agent skill

PR Descriptions

by portabletext in portabletext/editor

How to write pull request descriptions for the Portable Text Editor monorepo.

MITAuto-check passedDevelopment

Install PR Descriptions

skills CLI
$ npx skills add portabletext/editor --skill pr-descriptions -a claude-code

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

GitHub CLI
$ gh skill install portabletext/editor pr-descriptions --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/.agents/skills/pr-descriptions .claude/skills/pr-descriptions && 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
pr-descriptions
GitHub stars
280
Token cost
~2.8k tokens
SKILL.md length
1,572 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

How to write pull request descriptions for the Portable Text Editor monorepo.

  • Editing a PR here
  • SKILL.md covers Process, Shape, Honesty and Length: the budget, plus 3 more sections
  • Calls pnpm and gh
  • Tasks that involve Pull requests

What it does

PR Descriptions is an agent skill from portabletext/editor. How to write pull request descriptions for the Portable Text Editor monorepo. Use whenever opening or editing a PR here. Covers the changeset-led body (the changeset's prose opens the description), the narrative shape for what follows, honesty about behavioral changes, and length that scales with the diff's blast radius, with real merged exemplars.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Pull requests and Monorepo tooling. It works with pnpm. The repository describes itself as: The Standalone Portable Text Editor. The licence is MIT.

When your agent uses it

  • Editing a PR here
  • Tasks that involve Pull requests
  • Tasks that involve Monorepo tooling

Example prompts

  • “/pr-descriptions”

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

    Shell commands in SKILL.md call:

    • pnpm
    • gh

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

  • Network

    No URLs in SKILL.md. Its commands use pnpm and gh, which can reach the network depending on how they are called.

    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

PR Descriptions loads about 2.8k tokens when it runs. Until then it costs about 92 tokens; SKILL.md has 1,572 words of instructions outside code blocks.

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

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). 1,572 words, ~2,763 tokens.

Download SKILL.mdSave it as .claude/skills/pr-descriptions/SKILL.md (or your agent's skills folder).
name
pr-descriptions
description
How to write pull request descriptions for the Portable Text Editor monorepo. Use whenever opening or editing a PR here. Covers the changeset-led body (the changeset's prose opens the description), the narrative shape for what follows, honesty about behavioral changes, and length that scales with the diff's blast radius, with real merged exemplars.

Writing PTE PR descriptions

Process

  • Before gh pr create, run the static checks CI runs, from the worktree being pushed: pnpm check:format, pnpm check:lint, pnpm check:types, pnpm check:knip (repo root), plus the affected package's test:unit. These are cheap; run them all, every time. A green test run is not a green PR: lint enforces the house assertion style (see the writing-tests skill), and test:unit and check:types typecheck test files where stale API shapes surface.
  • Browser tests: complement AGENTS.md's per-package baseline. A contained change may run just its own file (vitest run --project "browser (chromium)" tests/<file>.test.tsx); a change with general blast radius (engine, selection, input pipeline) runs the package's full test:browser:chromium.
  • Always open as draft (gh pr create --draft); a maintainer marks it ready and merges. Never gh pr merge.
  • Title = the main commit subject (conventional format).
  • Use --body-file, never a heredoc with backticks inside $( ): backticks in the body survive intact.
  • The repo has no PULL_REQUEST_TEMPLATE.md, so the body is prose, not a form to fill in.
  • The description stands on its own: no internal context, ever. No issue-tracker ticket IDs, no customer or partner names, no support threads, no Slack discussions, no "a user reported" or "requested by". Describe the observable failure or need itself ("the floating comment button intermittently fails to appear on the first selection"), never who reported or requested it. Related work is referenced by PR number or by naming the mechanism ("tracked separately as a follow-up"); the linked issue links to the PR, never the reverse. Ticket and support context lives wherever the work is tracked and in support channels, not in the PR.

Shape

  • User-facing PRs open with the changeset's prose, verbatim. The changeset is the calibrated consumer sentence (see the changesets skill), and it is what the reviewer actually reads; a body that buries it under paragraphs gets skipped whole. After it, the body adds only what changesets ban: a concrete example of the failure, one sentence naming the fix mechanism, any behavioral change or honest caveat. When the changeset alone carries the change, it is the whole body. This mirrors the changeset's prose; body sentences about the changeset ("a changeset rides along") remain banned.
  • Fix/refactor PRs: heading-free narrative prose. After the changeset opening: diagnosis in code terms → fix → what was verified, compressed into the paragraph the budget below allows. Larger feature PRs may use ## What / ## Design notes.
  • Lead with motivation (internal-only PRs, which have no changeset to open with): the pain that makes the change necessary, before the mechanism. The description stands on its own; explain the problem in terms of the code, not the PR graph, and reference another PR only when the reader cannot follow the description without it.
  • Prose over bullets. Each design decision gets a paragraph carrying its own reasoning; bullets flatten the why out. A short bullet list is acceptable only for genuinely parallel items (e.g. "things I was careful about").
  • No ## Tests section. A test inventory is listy and disconnected from the reasoning. Tests appear in the narrative next to the decision or claim they pin, "pinned" meaning a test that fails without the change ("pinned by a test expressing...").
  • Justify each non-obvious decision inline, paired with the test that pins it.
  • Fenced code examples when introducing API.
  • Stacked or extracted PRs state why they are separate and what depends on them, referencing the other PR only when the reader needs it (#2777: "Extracted from #2772 because it changes behavior for all existing editor.on events ... #2772 stacks on this").
  • No generated-by footers, no emoji banners.

Honesty

  • Volunteer behavioral changes: one nobody would catch in review gets its own sentence, even a narrow one.
  • Say what is not covered: an untested path, a case deliberately left out of scope.
  • Perf numbers carry before/after and methodology (environment, run count, what was measured), never a bare percentage.
  • No boilerplate self-assessment. "Type-only change", "no changeset needed" restate the diff; state something non-obvious about blast radius instead, or say nothing.

Length: the budget

  • The body scales with the diff's blast radius, not the investigation's length. Default for a fix PR: the changeset's prose plus at most one short paragraph (~100 words): the concrete example, the mechanism, one honest caveat. The 3-4 paragraph, ~200-word shape (failure, design, blast radius with its pin, caveat) is earned only by PRs with a genuinely large blast radius; it is not the template.
  • A trivial diff earns two sentences: a verdict, and a rider naming anything else the diff also does. Zero citations, zero mechanics.
  • Everything cut must already live somewhere: mechanism in the commit bodies, diagnosis narrative and decisions on the linked issue, specifics in the tests. The body is a map, not the territory.
  • When scope grows mid-PR, rewrite the body top to bottom: never append, and never patch just the sentences you remember; re-read the whole body and rewrite. Appended addenda are how walls form, and patching only the remembered sentences is appending's twin: both skip the whole-document read. After any commit lands on, leaves, or is reworded on a branch with an open PR, re-read the entire body against the tip before pushing; stale claims survive wherever you patch from memory.
  • One-screen test: after one screen the reviewer knows what changed, why, and what to scrutinize. If not, cut until they do.
Show full SKILL.md (693 more words)Show less

Exemplar: fix PR, heading-free narrative (#2774, merged)

This is the earned-length exception (a factorial blow-up in a public conversion path), not the default fix-PR shape; the default is the changeset-led body above.

fix(sanity-bridge): avoid combinatorial blow-up converting mutually-embedding types

While upgrading our studio from v4 to v5 we hit a complete freeze: opening any document with a portable text field would pin the main thread until the tab crashed. No errors, nothing in the console. We eventually traced it to sanitySchemaToPortableTextSchema.

The walk added in #2630 tracks ancestors per branch, so it only stops when a type repeats within its own chain. Our schema has ~30 block object types, and about a dozen of them embed the shared blockContent array again (accordions, quotes, cards and so on). With that shape the walk ends up visiting every possible path through the type graph, which grows factorially with the number of block objects. For us that was ~2.1s per conversion — and since PortableTextInput converts on render, the studio just locked up. A slightly more connected schema never finishes at all.

The fix relies on the fact that Schema.compile produces one canonical instance per named type [...] I added a small memo (scoped to one conversion call) keyed by the compiled type instance [...] which makes the walk linear in the size of the compiled schema.

A few things I was careful about:

  • The memo key is the instance, not the name. Same-named inline declarations with different fields compile to distinct instances [...] the cases in same-name-objects.test.ts are unaffected.
  • Cycle detection via ancestor names is unchanged, and only completed expansions are memoized [...]
  • All 15 existing tests pass without modification. [...] output is byte-identical.

Numbers: the new regression test (12 block objects sharing a named array type) runs in ~5ms with the fix. Without it, vitest times out [...] Against our production schema the conversion goes from 2,122ms to 1ms with identical output.

One semantic note worth flagging: a memoized expansion is computed under the ancestor chain of wherever it was first reached. [...] No existing test pins a case where the difference is observable.

The merged PR body ends with a generated-by footer; that's the one part not to copy — the anti-patterns below ban it.

Why it's canonical: opens with the lived symptom, diagnoses with the actual growth mechanism, states the fix as an insight about the platform (Schema.compile canonical instances), the careful-abouts each pair a decision with the test guarding it, numbers have before/after + methodology, and it volunteers a behavioral change nobody would have caught in review.

Exemplar: feature PR with headings (#2772, merged)

Structure to copy (see https://github.com/portabletext/editor/pull/2772 for the full text):

  • ## What opens with the concrete driver (Studio's render-pipeline work needs listIndex), generalizes to the class of consumers (derived state), then shows the API with a fenced example and the exact test pinning the motivating use case end-to-end.
  • API-surface discipline gets its own paragraph: the closed five-variant union, the type-level tripwire that fails compilation when the engine vocabulary grows, the runtime allowlist, "exposing a future operation is a decision made twice, never an accident".
  • ## Design notes gives each contested decision a paragraph with its reasoning and its pinning test: why the stream is ungated (with the test pinning the contrast), delivery order under normalization (both real orders, which test pins which), error isolation, wildcard listeners.
  • Performance measured and stated with methodology: "chromium, medians of 3 runs, inserting 1000 blocks: 260ms vs 259ms [...] Parity within noise."

Anti-patterns

  • ## Tests / ## Changes inventory sections.
  • Bullets where each item secretly needed a paragraph of why.
  • "This PR fixes a bug in X" openings, open with the observable pain instead.
  • Explaining the problem only via the PR graph ("as discussed in #1234").
  • Claiming coverage the tests didn't actually run; say what was and wasn't exercised.
  • Self-assessments that restate the diff; generated-by footers.
  • The words "delta" (write "change") and "rides along"/"ride along", and labels such as "One additional change:", anywhere in artifact prose. Name a secondary change in a plain sentence instead.
  • The investigation narrative leaking into the body: how the bug was found belongs wherever the work is tracked; the body describes the change.
  • Appending paragraphs as the PR evolves instead of rewriting the body.

© 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

Just SKILL.md in .agents/skills/pr-descriptions of portabletext/editor.

Open the folder on GitHubat commit 60a494b

Compare with similar skills

PR Descriptions 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.

PR Descriptions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR Descriptions this skillportabletext/editor280—~2.8kAutomated safety check: PassMIT
Changesets Pull Request to Mainbreaking-brake/cc-wf-studio5.4k—~1.4kAutomated safety check: PassCustom licence
Code Reviewvictorgarciaesgi/regle506—~470Automated safety check: PassMIT
Link Workspace Packagesnomcopter/react-mosaic4.8k6 repos~760Automated safety check: PassCustom licence
Pull Requestspnpm/pnpm37k—~2.2kAutomated safety check: PassMIT
Nullable New Paramsremotion-dev/remotion62k—~1kAutomated safety check: PassCustom licence

Similar skills

  • Changesets Pull Request to Main

    breaking-brake/cc-wf-studio

    Opens a pull request to main in a pnpm and Changesets monorepo, after working out which packages changed and making sure a changeset file exists.

    5.4k GitHub stars~1.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Code Review

    victorgarciaesgi/regle

    Mandatory pre-commit validation for every Copilot code review on pull requests in the regle monorepo.

    506 GitHub stars~470 tokensUpdated 10 days ago
    DevelopmentAuto-check passed
  • Link Workspace Packages

    nomcopter/react-mosaic

    Link workspace packages in monorepos (npm, yarn, pnpm, bun).

    4.8k GitHub starsUsed in 6 repos~760 tokens
    DevelopmentAuto-check passed
  • Pull Requests

    pnpm/pnpm

    Take a change through a pull request in the pnpm repository — opening it, then staying with it after every push until CI is green and the review round is quiet.

    37k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Nullable New Params

    remotion-dev/remotion

    Official

    Fix newly added optional parameters, optional React props, and optional type/interface members in Remotion monorepo diffs by converting internal APIs to required nullable values and updating call…

    62k GitHub stars~1k tokensUpdated today
    DevelopmentAuto-check passed
  • Takes a change through a verdaccio pull request: branch, local checks, changeset, title and body, labels, CI and review rounds, and ports to other release lines.

    18k GitHub stars~1.9k tokensUpdated yesterday
    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

Works with

Categories

Questions about PR Descriptions

What does PR Descriptions do?

How to write pull request descriptions for the Portable Text Editor monorepo. PR Descriptions is an agent skill from portabletext/editor. How to write pull request descriptions for the Portable Text Editor monorepo.

When should I use PR Descriptions?

PR Descriptions fits situations like: editing a PR here; tasks that involve Pull requests; tasks that involve Monorepo tooling.

How do I install PR Descriptions in Claude Code?

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

How do I install PR Descriptions in Codex?

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

Can I use PR Descriptions 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 pr-descriptions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pr-descriptions, .gemini/skills/pr-descriptions, .github/skills/pr-descriptions and .opencode/skills/pr-descriptions in your project.

What does PR Descriptions need to run?

Going by SKILL.md and its folder, PR Descriptions needs the command-line tools its instructions call (pnpm and gh).

Does PR Descriptions access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is PR Descriptions 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 PR Descriptions use?

PR Descriptions 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 PR Descriptions use?

About 2.8k tokens (SKILL.md is roughly 11k 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 PR Descriptions?

Skills that share tags, products or a category with PR Descriptions: Changesets Pull Request to Main (breaking-brake/cc-wf-studio, 5.4k stars), Code Review (victorgarciaesgi/regle, 506 stars), Link Workspace Packages (nomcopter/react-mosaic, 4.8k stars) and Pull Requests (pnpm/pnpm, 37k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR Descriptions?

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.