committing-changes
Use when writing a commit message, opening a pull request, titling and describing a change for someone else to review, or deciding how to integrate a finished branch.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- committing-changes
- description
- Use when writing a commit message, opening a pull request, titling and describing a change for someone else to review, or deciding how to integrate a finished branch.
03 SKILL.md 正文
Committing changes
The diff shows what changed. Everything you write is for the why.
Ground rules
- The repo's convention wins. Read
git log --oneline -20first; follow its prefixes, types, case and trailers. What follows is the default where it has none. - Never commit or push unasked.
git add,git commitandgit pushwait for an explicit request. "Finish the feature" is not one. - Check the branch first. On
mainormaster, branch — unless history shows the project commits there directly with no merges or PRs, and the human asked. Then say so. - One logical change per commit. A rename mixed with a behavior change makes
bisectland on an unreadable diff —vvkit:debugging-systematically.
Subject line
<type>(<optional scope>): <description>
- Imperative: completes "If applied, this commit will ___".
add retry, notadded. - ~50 characters, never past 72. No trailing period.
- Lowercase after the colon, unless a proper noun or identifier.
- Scope is a noun naming a section of the codebase:
fix(parser):.
| Type | For |
|---|---|
feat |
A capability the codebase did not have |
fix |
A defect repaired |
refactor |
Behavior identical, structure different |
perf |
Behavior identical, measurably faster or smaller |
test |
Tests added or changed, with no production change |
docs |
Documentation only |
build, ci |
Build system, dependencies, pipeline |
chore |
Housekeeping that fits nothing above |
Really both feat and fix means really two commits.
Body
- Blank line after the subject, wrapped at 72 —
git logindents four spaces, so 72 fits 80 columns. - In order: what was wrong or missing; why this approach, and the alternative rejected — the most useful sentence for whoever revisits it; what a reader would find surprising — a measured number, a constraint found partway, a deliberate temporary workaround.
- Omit the body when the subject says it all. Ceremony on trivial commits trains readers to skip bodies.
- Breaking changes:
feat!:, or aBREAKING CHANGE: <what breaks>footer. Footers areToken: value, one per line, at the end.
Pull request
- Title: subject-line rules, and readable with no other context — it shows in release notes
and merge queues.
fix: race in session cleanup that returned 502s under load, notFix bug. - Description, in order:
- What changed — grouped by area, not file. Name the entry point to start reading from.
- Why — the problem, and the approach chosen over which alternative.
- What was verified — commands run and what they said —
vvkit:verifying-changes. "Tests pass" without a command is an assertion. - Out of scope — deferred work, and what a reviewer would otherwise flag as missing.
- Call out what needs a human decision: a schema change, a new dependency, a user-visible behavior change, a deliberate workaround.
- Keep it reviewable. Past ~400 changed lines reviewers find fewer defects per line. Split it, or say why not and point at the parts that deserve attention.
Integrating a finished branch
Integration is the human's decision — present it, do not take it:
- Run the full suite on the tree about to be integrated. Red: report and stop.
- Confirm the base branch from the plan, the conversation or the upstream — or ask.
- Offer the options: merge locally, push and open a PR, or keep the branch. Wait.
- A local merge is verified by the suite on the merged result before anything is deleted; on failure the branch and worktree stay. A PR keeps its worktree for review fixes.
- Discard only when asked in so many words, after the human confirms the exact list: branch, commits, worktree.
- Worktree removal refused over uncommitted files: those files exist nowhere else — show them and ask.
Never
--forceon your own. - A rejected push means the remote moved: investigate; force-push only on explicit request.
- Remove only worktrees you created.
Never
- AI attribution, unless the project's instructions or its history's trailers carry it.
- A ticket id in code comments — a PR footer is its home.
- "misc fixes", "wip", "address feedback" as a final message.
- A description restating the diff file by file.
Before opening
- [ ] The subject completes "If applied, this commit will ___"
- [ ] Each commit is one logical change
- [ ] The body says why, not what
- [ ] The title reads correctly with no other context
- [ ] The description names what was verified, with the command
- [ ] The diff is small enough to review, or the split is explained
04 同仓库更多 Skills
no-heading
Use when proving that the validator rejects a body with no H1 and a force-loading @-link.
wrong-name-does-not-match-dir
Dispatches a subagent per task and reviews between each one.
writing-tests
Use when adding or changing behavior, fixing a bug, or judging whether an existing or generated test earns its place.
writing-skills
Use when authoring or editing a skill, agent, command or hook for this kit, or when deciding whether a piece of guidance belongs in a skill at all.
writing-project-instructions
Use when creating or editing a CLAUDE.md or AGENTS.md, when it has grown long, or when a rule in it also exists in an installed skill.
writing-logs
Use when adding or reviewing log statements, or when deciding what level a message belongs at.