Agent skill

Backporting

by portabletext in 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.

MITAuto-check passedDevelopment

Install Backporting

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

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

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

At a glance

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

  • Works in 6 steps: Worktree per backport, branched off the… → Verify the branch carries the bug before… → Port the fix, adapting to the branch.… → …
  • A fix that shipped on main must also ship for an older major
  • SKILL.md covers Branch layout, When to backport, Procedure and Commit shape, plus 2 more sections
  • Calls pnpm and git

What it does

Backporting is an agent skill from 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. Use when a fix that shipped on main must also ship for an older major. Covers the branch layout, the verify-adapt-red-verify procedure, version-suffixed changesets, and the backport commit/PR shape, with real exemplars.

Its SKILL.md is about 1.1k 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 Monorepo tooling. The repository describes itself as: The Standalone Portable Text Editor. The licence is MIT.

When your agent uses it

  • A fix that shipped on main must also ship for an older major
  • Tasks that involve Monorepo tooling

Example prompts

  • “/backporting”

Workflow steps

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

  1. Worktree per backport, branched off the maintenance branch: git worktree add ../editor--v6 -b -v6 origin/editor-v6.x. Branch name is the…
  2. Verify the branch carries the bug before porting anything. Find the culprit commit on the branch (git log for the regression source) or…
  3. Port the fix, adapting to the branch. Cherry-pick the main commit when it applies cleanly, otherwise re-apply by hand. The old line often…
  4. Port the tests and red-verify on this branch. The pinning tests come along and must fail on the unpatched branch, the same…
  5. Write a fresh changeset, patch bump, slug suffixed with the line (readonly-selection-sync-v6.md). The consumer prose is the same as the…
  6. Run the same gates as any change: pnpm check:types, check:lint, the affected package's tests, pnpm build, root check:format and check:knip.

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
    • git

    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 git, 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

Backporting loads about 1.1k tokens when it runs. Until then it costs about 90 tokens; SKILL.md has 597 words of instructions outside code blocks.

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

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). 597 words, ~1,094 tokens.

Download SKILL.mdSave it as .claude/skills/backporting/SKILL.md (or your agent's skills folder).
name
backporting
description
How to backport a fix from `main` to a maintenance branch (`editor-v6.x`, `editor-v7.x`) in the Portable Text Editor monorepo. Use when a fix that shipped on `main` must also ship for an older major. Covers the branch layout, the verify-adapt-red-verify procedure, version-suffixed changesets, and the backport commit/PR shape, with real exemplars.

Backporting fixes

Branch layout

main carries the current major, and the upcoming major is prereleased from next (see the next-branch skill). Older majors live on maintenance branches named editor-v<N>.x (currently editor-v6.x and editor-v7.x). Each maintenance branch has its own working release pipeline: release.yml on that branch triggers on pushes to itself, and the changesets bot opens "Version Packages" PRs from changeset-release/editor-v<N>.x. Merging a backport PR that carries a changeset is all it takes; no manual publishing.

When to backport

A fix lands on main and the bug also exists on an older line that consumers still run. Backporting is per-branch: a bug present on both v6 and v7 gets two backport PRs, one per branch (#2919 and the equivalent v7 port shipped separately).

Procedure

  1. Worktree per backport, branched off the maintenance branch: git worktree add ../editor-<change>-v6 -b <change>-v6 origin/editor-v6.x. Branch name is the change name with a -v6/-v7 suffix. Run pnpm install and build the affected package before testing; the branch's dependency tree differs from main's.
  2. Verify the branch carries the bug before porting anything. Find the culprit commit on the branch (git log for the regression source) or run the fix's test against the unpatched branch and watch it fail. If the bug does not reproduce, there is nothing to backport; say so and stop.
  3. Port the fix, adapting to the branch. Cherry-pick the main commit when it applies cleanly, otherwise re-apply by hand. The old line often differs structurally (different package splits, older APIs); each adaptation is deliberate and gets named in the commit and PR (#2919: the test imports defineSchema from the package root because v6 predates the @portabletext/schema split).
  4. Port the tests and red-verify on this branch. The pinning tests come along and must fail on the unpatched branch, the same red-verification bar as main (see the writing-tests skill). "Red-verified on this branch" belongs in the commit body.
  5. Write a fresh changeset, patch bump, slug suffixed with the line (readonly-selection-sync-v6.md). The consumer prose is the same as the main changeset (see the changesets skill); the release pipeline on the branch turns it into a patch release of the old major.
  6. Run the same gates as any change: pnpm check:types, check:lint, the affected package's tests, pnpm build, root check:format and check:knip.
Show full SKILL.md (217 more words)Show less

Commit shape

Same subject as the main commit, no version suffix. The body opens with "Backport of the fix that shipped on main." and then carries the full mechanism prose per the commits skill; a backport body must stand on its own because the branch's history never contains the main commit. Close with the red-verification note and any branch adaptations. Exemplars: 7f2b3b5de (v6), 76d57a094 (v7).

PR shape

  • Draft PR with --base editor-v<N>.x. Title is the commit subject, optionally suffixed "(v6)"/"(v7)" to disambiguate in PR lists (#3151, #2919).
  • The body is the main PR's narrative, then a closing paragraph that names it a backport: "Backport of #NNNN to the editor-v6.x line", why the branch carries the bug (the culprit commit is present in which shipped version), and the adaptations. #2919's closing paragraph is the exemplar:

Backport of #2918 to the editor-v6.x line, which carries the same regression (2a3e03934's early return is present in 6.6.6). Same one-line gate yield, same two pinned scenarios, red-verified on this branch; the only adaptation is the test importing defineSchema from the package root since v6 predates the @portabletext/schema split.

After merge

Nothing manual. The push to the maintenance branch triggers its release workflow, the changesets bot opens "Version Packages" on changeset-release/editor-v<N>.x, and merging that PR publishes the patch release of the old major.

© 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/backporting of portabletext/editor.

Open the folder on GitHubat commit 60a494b

Compare with similar skills

Backporting 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.

Backporting compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Backporting this skillportabletext/editor280—~1.1kAutomated safety check: PassMIT
Nx Importnrwl/nx29k6 repos~3.5kAutomated safety check: PassMIT
Nx Workspacenomcopter/react-mosaic4.8k8 repos~1.9kAutomated safety check: PassCustom licence
Electron Multi-Process ArchitectureiOfficeAI/AionUi33k1 repos~1.8kAutomated safety check: PassApache-2.0
Nx Run Tasksnomcopter/react-mosaic4.8k8 repos~613Automated safety check: PassCustom licence
Astro Developerwithastro/astro63k1 repos~1.5kAutomated safety check: PassCustom licence

Similar skills

  • Nx Import

    nrwl/nx

    Import, merge, or combine repositories into an Nx workspace using nx import.

    29k GitHub starsUsed in 6 repos~3.5k tokens
    DevelopmentAuto-check passed
  • Nx Workspace

    nomcopter/react-mosaic

    Explore and understand Nx workspaces. An agent skill from nomcopter/react-mosaic.

    4.8k GitHub starsUsed in 8 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Tells the agent where new code belongs in an Electron multi-process project and which APIs each process may use, with rules for new bridges, services, agents and workers.

    33k GitHub starsUsed in 1 repo~1.8k tokens
    DevelopmentAuto-check passed
  • Nx Run Tasks

    nomcopter/react-mosaic

    Helps with running tasks in an Nx workspace. An agent skill from nomcopter/react-mosaic.

    4.8k GitHub starsUsed in 8 repos~613 tokens
    DevelopmentAuto-check passed
  • Astro Developer

    withastro/astro

    Official

    Comprehensive guide for developing in the Astro monorepo. An agent skill from withastro/astro.

    63k GitHub starsUsed in 1 repo~1.5k tokens
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    56k GitHub stars~3.8k tokensUpdated today
    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 today
    Auto-check passed
  • Changesets

    portabletext/editor

    How to write changesets in the Portable Text Editor monorepo.

    280 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Commits

    portabletext/editor

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

    280 GitHub stars~1.9k tokensUpdated today
    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 today
    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 today
    Auto-check passed
  • Portable Text

    portabletext/editor

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

    280 GitHub stars~656 tokensUpdated today
    Auto-check passed

Categories

Questions about Backporting

What does Backporting do?

How to backport a fix from main to a maintenance branch (editor-v6.x, editor-v7.x) in the Portable Text Editor monorepo. Backporting is an agent skill from portabletext/editor.x) in the Portable Text Editor monorepo.

When should I use Backporting?

Backporting fits situations like: A fix that shipped on main must also ship for an older major; tasks that involve Monorepo tooling.

How do I install Backporting in Claude Code?

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

How do I install Backporting in Codex?

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

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

What does Backporting need to run?

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

Does Backporting access the network?

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

Is Backporting 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 Backporting use?

Backporting 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 Backporting use?

About 1.1k tokens (SKILL.md is roughly 4.4k 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 Backporting?

Skills that share tags, products or a category with Backporting: Nx Import (nrwl/nx, 29k stars), Nx Workspace (nomcopter/react-mosaic, 4.8k stars), Electron Multi-Process Architecture (iOfficeAI/AionUi, 33k stars) and Nx Run Tasks (nomcopter/react-mosaic, 4.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Backporting?

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 9, 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.