commits
БесплатноБез исполняемых скриптовНе проверенHow to write commit messages in the Portable Text Editor monorepo. Use whenever committing here. Covers subject conventions, the dense mechanism-first body…
от portabletext★ 290 звёзд на GitHubОб этом скилле
Writing PTE commits
Subject
- Conventional, lowercase, imperative:
fix:,feat:,refactor:,test:,chore:,docs:,ci:. - Human commit subjects take no scope, since the changeset frontmatter already names the package. Only bot commits (Renovate's
chore(deps):/fix(deps):) keep one. - 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.
- No em dashes and no semicolons in subject or body. Use commas, colons, parentheses or separate sentences.
- Never "save", "saved" or "stored" for what the editor sends. Name the patch or event: "emits an
unsetpatch", "thechangeevent carries". - 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:orfeat:, neverrefactor:/chore:. The changeset is the tell: releasable change ⇒ fix/feat. Thechecks / commitscheck enforces this for added changesets (editing an existing changeset is fine under any type). - The tell runs both ways: a
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). A playground fix ischore:. The exemptions are Renovate'sfix(deps):commits, where the changeset bot ships the release in a follow-up commit, and the commit that adds a new package, whose v1.0.0 is published by hand. Thechecks / commitscheck enforces this per commit. chore:for dependency/config work with no published-code change (no changeset).- Renovate titles dependency updates
chore(deps):orfix(deps):. Afix(deps):commit cuts a patch release via the changeset bot, so tooling-only bumps staychorein.github/renovate.json.
Body
Dense technical prose, wrapped at ~72 columns, structured as:
- Old mechanism and why it was wrong, with the precise failure sequence, name the functions, the inputs, and what the wrong output was.
- The new mechanism.
- 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 checks / commits check also enforces the last step: it fails
while any fixup!/squash!/amend! subject is on the PR, so fixup
commits cannot reach main unsquashed. A red checks / commits on a PR
mid-review for that reason 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. The same job fails a fix:/feat: commit that
ships no changeset of its own, and that failure is always a problem to fix.
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 c
Установить commits в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл commits?
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.
Как установить скилл commits?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл commits запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic