Agent skill

Commits

by portabletext in portabletext/editor

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

MITAuto-check passedDevelopment

Install Commits

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

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

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

At a glance

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

  • Works in 3 steps: Old mechanism and why it was wrong, with… → The new mechanism. → Explicitly scoped behavioral changes…
  • Committing here
  • SKILL.md covers Subject, Type selection, Body and Exemplars (real, from the repo), plus 1 more section
  • Calls git

What it does

Commits is an agent skill from portabletext/editor. How to write commit messages in the Portable Text Editor monorepo. Use whenever committing here. Covers subject conventions, the dense mechanism-first body shape, commit-type selection (including the changeset⇒fix/feat rule), splitting, and fixup discipline, with real exemplars from the repo history.

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

When your agent uses it

  • Committing here
  • Tasks that involve Commit messages
  • Tasks that involve Monorepo tooling

Example prompts

  • “/commits”

Workflow steps

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

  1. Old mechanism and why it was wrong, with the precise failure sequence, name the functions, the inputs, and what the wrong output was.
  2. The new mechanism.
  3. Explicitly scoped behavioral changes (never the words "delta" or "rides along", and no labels such as "One additional change:"): "Net…

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:

    • git

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

  • Network

    No URLs in SKILL.md. Its commands use 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

Commits loads about 1.9k tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 650 words of instructions outside code blocks.

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

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). 650 words, ~1,947 tokens.

Download SKILL.mdSave it as .claude/skills/commits/SKILL.md (or your agent's skills folder).
name
commits
description
How to write commit messages in the Portable Text Editor monorepo. Use whenever committing here. Covers subject conventions, the dense mechanism-first body shape, commit-type selection (including the changeset⇒fix/feat rule), splitting, and fixup discipline, with real exemplars from the repo history.

Writing PTE commits

Subject

  • Conventional, lowercase, imperative: fix:, feat:, refactor:, test:, chore:, docs:.
  • Scope when package-specific (fix(sanity-bridge):, chore(deps):), but: when the commit ships a changeset, the changeset frontmatter already names the package, so the scope is redundant, use bare fix: / feat:.
  • The subject names the actual mechanism or contract, never vague intent:
    • ✅ fix: return a path that identifies the node from getNode
    • ✅ fix: only rewrite the DOM selection when it disagrees with the model
    • ❌ fix: getNode path bug, ❌ fix: improve selection handling
  • Backticks around code identifiers in subject and body.
  • Never reference issue-tracker ticket IDs (Linear, Jira, anything) in subjects, bodies, or branch names. Branches are named after the change (fix-inline-object-drag-selection), not the ticket.

Type selection

  • A commit that ships a changeset is fix: or feat:, never refactor:/chore:. The changeset is the tell: releasable change ⇒ fix/feat.
  • The tell runs both ways for bare types: a bare fix:/feat: must ship (or amend) a changeset. No changeset means it is not a fix/feat; retype it (refactor: for code changes with no releasable behavior change, even ones that alter internal behavior, chore:/test:/docs: otherwise). The two exemptions are scoped commits to unpublished targets (fix(playground):) and fix(deps):, where the changeset bot ships the release.
  • chore(deps): for dependency/config work with no published-code change (no changeset).
  • Renovate-adjacent nuance: fix(deps) cuts a patch release via the changeset bot; don't hand it to tooling-only bumps.

Body

Dense technical prose, wrapped at ~72 columns, structured as:

  1. Old mechanism and why it was wrong, with the precise failure sequence, name the functions, the inputs, and what the wrong output was.
  2. The new mechanism.
  3. Explicitly scoped behavioral changes (never the words "delta" or "rides along", and no labels such as "One additional change:"): "Net behavior unchanged", "Emitted patches only change in the narrow case of...", or the secondary change as a plain sentence ("A paste over a selection of only block objects now also emits unset([]) between the removals and the inserts.").

Trivial commits get no body. One logical change per commit: tests pinning a contract get their own test: commit; refactors are split from fixes.

Once a PR is in review, follow-ups are fixup! commits (git commit --fixup <sha>), squashed with git rebase -i --autosquash before merge. Before review, fold changes into the logical commit they belong to. Merge-time history is clean logical commits, never a trail of "address review feedback".

The check-commits CI job exists only to enforce the last step: it fails while any fixup!/squash!/amend! subject is on the PR, so fixup commits cannot reach main unsquashed. A red check-commits on a PR mid-review is the expected state, not a problem to fix: do not reword fixups to appease it, and do not autosquash early (that folds review follow-ups before the reviewer has seen them). It goes green at the pre-merge autosquash.

Show full SKILL.md (184 more words)Show less

Exemplars (real, from the repo)

fix with a lying-contract framing (24996df6b)
fix: return a path that identifies the node from `getNode`

`getNode(snapshot, path)` follows a path through the editor value and
returns the deepest node it reaches. When the input path ended on a
field-name string — e.g. `[{_key: 'image1'}, 'caption']` pointing
into a block object's primitive field — the walker still resolved to
the block but returned the input path verbatim, including the
trailing field name. The contract was lying: `entry.path` didn't
identify `entry.node`, and downstream composition (`isBlock(entry.path)`,
`getEnclosingBlock(entry.path)`) misclassified the entry because it
saw the field-suffixed path instead of the node's path.

Strip trailing field-name segments from the returned path. `getNode`
now returns a path that identifies the node it found: feeding
`entry.path` back into `getNode` resolves to the same node.

Includes test coverage for block-object, span, and inline-object
paths with trailing primitive fields, and a round-trip assertion.

Why it's good: names the function and its contract, gives a concrete input, states the downstream blast radius, then the fix as an invariant ("feeding entry.path back...").

fix with a precise failure sequence + scoped behavioral change (46593d537)
fix: write a `text`-named field on an inline object during value sync

When the editor received an updated value, `updateBlock`'s child
reconcile stripped `text` from every changed child before
`setNodeProperties`, then re-applied it only for spans via an
`insert.text` operation. On an inline object `text` is an ordinary
field, so it was stripped but never written back: the field's new
value silently never reached the editor, even though the incoming
value carried it. A field by any other name (`caption`, etc.) synced
fine because only `text` was special-cased.

Strip `text` only when the child is a span (spans own their text via
text operations); on a non-span child `text` flows through
`setNodeProperties` like any other property.

Net behavior unchanged for spans and for inline objects without a
`text` field.

Why it's good: the failure sequence is step-by-step (stripped → re-applied only for spans → never written back), includes the discriminating observation ("a field by any other name synced fine"), and closes with the exact blast-radius scoping.

fix where the "why the old code was wrong" is subtle (f2420072a)
fix: only rewrite the DOM selection when it disagrees with the model

`validateSelection` compared the model's canonical DOM range against the
live DOM range by `startOffset`/`endOffset` alone, ignoring the
containers. A browser representing the same selection with element-level
endpoints (as browsers do when a selection sweeps across table cells) was
misread as out of sync, and the "fix" (`removeAllRanges` + `addRange`)
reset the in-progress native drag, collapsing the selection, and
destroyed backwardness (a `Range` carries no direction).

The validator now maps the live DOM selection back through
`toEditorSelection` and compares editor selections: equivalent
representations are left alone, and the DOM is only rewritten when the
two genuinely disagree about meaning. Passing the `DOMSelection` (not
`getRangeAt(0)`) also routes Firefox's multi-range table selections
through the engine's existing compat. Pinned by a test expressing the
same selection with element-level endpoints and asserting it survives
validation (red on the old comparison), plus one pinning that genuine
desyncs are still rewritten.

Why it's good: explains why the naive comparison was wrong (equivalent representations), names each consequence of the false positive, and points at both tests, the one that falsifies the old behavior and the one pinning the still-wanted behavior.

Anti-patterns

  • Subject naming the symptom or the ticket ("fix drag bug", "TICKET-123").
  • Bodies that restate the diff ("changed X to Y") without the failure sequence.
  • Mixing a refactor into a fix commit, or tests into either.
  • refactor:/chore: on a commit that carries a changeset.
  • "Address review feedback" commits surviving to merge.

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

Open the folder on GitHubat commit 60a494b

Compare with similar skills

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

Commits compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Commits this skillportabletext/editor280—~1.9kAutomated safety check: PassMIT
Commit Changesfoldkit/foldkit912—~1.2kAutomated safety check: PassMIT
Nx Importnrwl/nx29k5 repos~3.5kAutomated safety check: PassMIT
Nx Workspacenomcopter/react-mosaic4.8k7 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.8k7 repos~613Automated safety check: PassCustom licence

Similar skills

  • Commit Changes

    foldkit/foldkit

    Create a git commit in the Foldkit monorepo with changeset enforcement and formatting.

    912 GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Nx Import

    nrwl/nx

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

    29k GitHub starsUsed in 5 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 7 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 7 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

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 yesterday
    Auto-check passed
  • Changesets

    portabletext/editor

    How to write changesets in the Portable Text Editor monorepo.

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

    portabletext/editor

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

    280 GitHub stars~656 tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Commits

What does Commits do?

How to write commit messages in the Portable Text Editor monorepo. Commits is an agent skill from portabletext/editor. How to write commit messages in the Portable Text Editor monorepo.

When should I use Commits?

Commits fits situations like: committing here; tasks that involve Commit messages; tasks that involve Monorepo tooling.

How do I install Commits in Claude Code?

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

How do I install Commits in Codex?

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

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

What does Commits need to run?

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

Does Commits 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 Commits 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 Commits use?

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

About 1.9k tokens (SKILL.md is roughly 7.8k 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 Commits?

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

Who maintains Commits?

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.