跳到正文
cccskills
免费在 GitHub 公开

commit

Canonical rules for writing git commits in the Shift codebase. Use whenever the user asks to commit, stage and commit, create a pull request that requires commits, or draft a commit message. Enforces Conventional Commits, release-note quality, concise subjects, and logical commit boundaries.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md5.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

/commit — How Shift commits are written

The goal is a git log --oneline that explains the project and gives Release Please clean input.

Commit syntax

Every subject uses Conventional Commits:

<type>[optional scope][optional !]: <concise imperative description>

Examples:

feat: add isolated Nightly builds
fix(workspace): preserve edits after failed export
refactor(renderer): share retained glyph ownership
feat(document)!: reject legacy workspace schemas

Use ! or a BREAKING CHANGE: footer only when callers, documents, or user workflows must change. Alpha permits breaking changes, but the commit must still explain them.

Allowed types

TypeUse forPublic changelog
featNew user-visible functionalityYes
fixUser-visible bug fixYes
perfMeasurable performance improvementYes
refactorCode change with no intended behavior changeNo
testTests without production behavior changesNo
docsDocumentation onlyNo
buildPackaging, build scripts, native compilationNo
ciCI and release workflowsNo
styleFormatting only, not UI appearanceNo
choreDependencies, tooling, and repository housekeepingNo

Release Please uses merged conventional commits to update CHANGELOG.md, versions, tags, and GitHub release notes. Write feat, fix, and perf subjects for users rather than as file-level implementation summaries.

Do not manually bump the product version or edit generated release sections in an ordinary feature pull request. Release Please owns those changes in its release pull request. Use a Release-As: X.Y.Z footer only after the user explicitly approves a milestone transition.

Subject rules

  • Maximum 72 characters including type and scope; aim for 50.
  • Lowercase after the colon.
  • Imperative mood: add, preserve, reject; not added or adds.
  • No trailing period, emoji, agent prefix, or generated-by attribution.
  • Avoid file paths and symbol names unless they are essential to understanding the change.
  • Never prefix a subject with [codex] or another agent label.

Commit bodies

Most commits do not need a body. Add one when the constraint, consequence, migration, or reason is not clear from the subject.

  • Leave one blank line after the subject.
  • Wrap prose near 72 characters.
  • Explain why and non-obvious consequences; do not narrate the diff.
  • Put BREAKING CHANGE: and Release-As: footers after the body when approved and required.

Logical boundaries

Every commit is one reviewable change. Keep production code with the tests and focused documentation that prove or explain it.

Split when changes have independent reasons to exist, especially:

  • unrelated subsystems or behaviors;
  • file moves mixed with later logic changes;
  • generated output independent of hand-written changes;
  • broad formatting mixed with behavior;
  • repository tooling unrelated to the product change.

When the correct split is unclear, propose the subjects and path groups before staging. Do not create artificial test-only commits when the tests belong to the behavior they cover.

Process

  1. Confirm the user's stated goal. Ask for a one-line explanation only when the purpose is genuinely unclear.
  2. Inspect git status, unstaged and staged diffs, and recent commit subjects.
  3. Identify secrets, generated files, unrelated work, and the logical commit boundaries.
  4. If multiple commits are needed and the user has not already approved the plan, propose the ordered subjects and wait.
  5. Run the focused tests and repository checks appropriate to each change. For desktop user-flow or rendering changes, complete the E2E impact check in apps/desktop/e2e/README.md: search existing specs by affected surface, run the smallest relevant Playwright project/file/title filter, inspect intentional snapshot updates, and state any relevant E2E coverage not run.
  6. Stage explicit paths or hunks. Never use git add . or git add -A.
  7. Commit without bypassing hooks.
  8. Inspect git status and the resulting commit after each commit.

A request to create a pull request authorizes the commits needed for the clearly stated PR goal. It does not authorize including unrelated dirty work.

Hard rules

  • Never commit unless the user asked for a commit or for a pull request that requires it.
  • Never bypass hooks with --no-verify or disable signing unless the user explicitly requests it.
  • If a commit hook fails, fix the cause and rerun the commit. If a committed change later needs correction, add a new commit rather than amending unless the user asks to rewrite local history.
  • Never commit credentials, tokens, certificates, .env files, or suspicious generated secrets.
  • Never push unless the user asks to push or create/update a pull request.
  • Never add agent attribution or co-author trailers unless the user asks.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

dead-code

免费

Find and remove dead code (unused files, exports, class members) using Knip as a candidate generator, then verify each candidate through AST-level analysis and interface tracing before removing anything. Use when the user asks to clean up unused code, find dead code, or reduce the codebase.

中文简介正在准备中。当前显示原文说明。

shift-editor/shift3592026年10月20日 更新

docs

免费

Update or create DOCS.md files for Shift subsystems. Use this skill whenever the user asks to update docs, refresh documentation, create a DOCS.md, write module documentation, or says "update docs for X". Also trigger after completing a large feature when Claude.md says to update docs — check if any DOCS.md in the affected subsystem needs refreshing.

中文简介正在准备中。当前显示原文说明。

shift-editor/shift3592026年10月20日 更新

Adversarially fact-check DOCS.md files against the actual source code, verifying every concrete claim rather than trusting structure checks. Use when the user asks to audit docs, verify documentation accuracy, check whether docs are still true, or on a scheduled documentation review. This is the semantic layer the mechanical checkers cannot cover.

中文简介正在准备中。当前显示原文说明。

shift-editor/shift3592026年10月20日 更新

issue

免费

Canonical rules for finding, creating, and updating Shift GitHub issues. Use whenever the user asks to file, create, open, update, triage, or search for an issue, or when substantial work needs an issue before a pull request. Prevents duplicates and defines acceptance criteria and pull-request closure semantics.

中文简介正在准备中。当前显示原文说明。

shift-editor/shift3592026年10月20日 更新

jsdoc

免费

Add or revise source-level JSDoc for Shift APIs. Use this skill before writing or editing documentation comments for exported classes, methods, constructors, domain data structures, render frames, reactive state, or any API where caller intent, side effects, lifetime, ownership, or nullability are easy to misunderstand.

中文简介正在准备中。当前显示原文说明。

shift-editor/shift3592026年10月20日 更新

perf

免费

How to find and fix performance problems in Shift's desktop app. Use when something is slow, choppy, janky, or laggy (scrubbing, dragging, editing, undo, opening fonts), when profiling or measuring, when adding or reviewing perf tests, and before claiming a change made something faster.

中文简介正在准备中。当前显示原文说明。

shift-editor/shift3592026年10月20日 更新

查看 shift-editor 的全部技能

报告此技能的问题