gerritcodereview/gerrit/gerrit-commit-message-review

Claude Code and agent skill by gerritcodereview/gerrit

Trust tier 2
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Proofreads and suggests structural improvements for Git commit messages to ensure style guide compliance, completeness, and accuracy.

Install

npx vskill@latest install gerritcodereview/gerrit/gerrit-commit-message-review

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as gerritcodereview/gerrit/gerrit-commit-message-review.

Git Commit Message & Metadata Standards

Executive Summary

Welcome to the definitive engineering reference for formatting, structuring, and preserving metadata inside Git commit messages. This document encapsulates the core conventions for commit hygiene, which are essential to ensuring commit log histories remain clean, readable, and highly traceable across development lifecycles.

Adhering to these standards ensures metadata traceability, and provides clear, long-term context to future developers.

Summary

Chapter Theme / TitleScope & Objective
Commit Title ConventionsDefines stylistic requirements for the first line of the commit message to optimize history navigation.
Commit Body Structure & FormattingOutlines instructions to clearly explain the "what" and "why" of the patchset with pragmatic conciseness.
Metadata Footers & PreservationsEnforces the strict preservation of system-critical integration footers (such as Change-Id and issue tracking IDs).
Review Feedback & Suggested Commit MessageInstructs the reviewer to provide a complete, fully-compliant, copy-pasteable revised commit message.

Chapter: Commit Title Conventions

Context: The title line of a Git commit message is the first line of visual feedback for engineers navigating repository logs. To ensure clarity and readability, title structures should be direct and action-oriented.

Summary
Rule IDPrinciple / ConstraintPriorityPrimary Symptom / Trap
T1-01Concise & Imperative Commit TitlesHighUtilizing past-tense/progressive verbs (e.g. "Fixed...", "Fixing...") or trailing punctuation.
Rules
T1-01: Concise & Imperative Commit Titles
Rule: Commit titles must start with an imperative verb (e.g., "Add", "Fix", "Update", "Remove") and use sentence case without trailing punctuation. Do not enforce character count or line length limits on the commit title.
What: The commit title line must be a concise, imperative sentence summary.
Applies To: Git commit message first line.
Why: Using consistent imperative verbs and sentence case without trailing punctuation ensures clean, readable display in repository logs and CLI tools. Line length is already checked deterministically by Gerrit commit validators.

Trap 1: Writing passive or non-imperative titles using progressive or past tense.

Don't:

text
Fixing the loading spinner bug in gr-reply-dialog.ts and adding tests.

Do:

text
Fix loading spinner and add test coverage

Chapter: Commit Body Structure & Formatting

Context: The body of a commit is a vital repository asset storing the architectural intent behind a change. It must explain engineering decisions with pragmatic conciseness and provide targeted context.

Summary
Rule IDPrinciple / ConstraintPriorityPrimary Symptom / Trap
T2-01Explaining the Context: What and WhyHighOmitting commit bodies entirely, repeating the title, describing "how" instead of "why", or leaving critical design/bug links without context.
T2-02Pragmatic Tone, Conciseness, and Anti-FillerHighWriting verbose, flowery prose, introducing generic engineering philosophy/boilerplate, or using redundant Q&A layouts on simple changes.

Rules
T2-01: Explaining the Context: What and Why
Rule: The commit message body must clearly explain what changes were made and why they were necessary, focusing on context and architectural intent, while maintaining a concise, non-redundant, and pragmatic tone. The body must jump directly into the technical context or problem and must never repeat, rephrase, or start with a high-level introductory summary of the title. For complex, security-sensitive, or high-risk changes, the explanation should explicitly ground the "why" by referencing the relevant issue, bug tracking ID, or design/RFC document. Do not include empty, low-value, or vacuous bug references (e.g. 'To address b/XXXXX, ...') in the body text unless accompanied by descriptive context explaining what the bug or issue represents. If the specific bug context is not known or cannot be verified, the bug reference must be omitted from the body paragraphs entirely, relying solely on the metadata footer for tracking.
What: Explanations in the body must detail the problem and the rationale for the solution, leaving the mechanical "how" to be read from the code diff, and omitting generic value propositions of development practices, non-technical fluff, or introductory meta-sentences. The opening paragraph of the body must begin directly with the context or problem being solved and not restate or paraphrase the commit title. If the commit relates to a complex problem or implements an approved design specification, the body should draw from and cite these linked resources to clarify the reasoning in a direct, straightforward manner. If citing a bug tracker ID in the body paragraphs, ensure it adds concrete value by describing what problem or feedback is tracked there; otherwise, leave the bug reference out of the narrative body and let the footer handle the link.
Applies To: Commit message lines following the spacer blank line (line 3 and onward).
Why: Obvious code listings are redundant. Context is key: for complex or sensitive engineering changes, subsequent maintainers must understand the origin of a requirement or design constraint (e.g., a specific bug, CVE, or design specification) without having to guess, establishing clear auditability.

Trap 1: Repeating or rephrasing the title, starting the body with a high-level introductory summary sentence, or omitting concrete context.

The commit title is already the high-level summary of the change. Starting the body of the commit message with a rephrasing, restatement, or introductory "thesis statement" (e.g. "Add the agent and define its corresponding guidelines") is highly redundant and wastes reader time. Do not write introductory meta-sentences; begin the body paragraphs by jumping directly into the technical context or the problem being solved.

Don't:

text
Fix loading spinner and add test coverage
This change fixes the loading spinner and adds test coverage to gr-reply-dialog.ts.

(Problem: Repeats the title almost verbatim in the body opening.)

Do:

text
Fix loading spinner and add test coverage
The loading spinner in gr-reply-dialog was experiencing visual jitter
on rapid page transitions due to a race condition in the reactive
lifecycle hook.
This change moves property assignments out of firstUpdated to avoid
unnecessary second-pass rendering, stabilizing the visual state.

(Rationale: Jumps immediately into the concrete problem.)

Trap 2: Omitting context from linked bugs or design documents in complex, critical, or security-sensitive changes.

While simple or minor bug fixes do not need to explicitly reference their issue IDs inside the body, major, high-risk, or architectural modifications that reference external specs, RFCs, or bug tracker tickets should integrate that context into the "why" explanation. Failing to do so makes the commit message look disconnected from its metadata, making review and auditability difficult.

Don't:

text
Enhance project deletion permission validation
Only users with administrative privileges are allowed to delete a
project, but the server was previously checking for owner status only.
This change corrects the check to require system administrator scope.
Bug: gerrit:40012901

(Problem: A security-sensitive permission model change is being made under a bug, but the body only explains the mechanical change. It completely misses the security context—like the permission bypass mentioned in the bug report—making the reasoning for this risk-heavy change unclear without looking up the bug.)

Do:

text
Enhance project deletion permission validation
To resolve the permission bypass reported in gerrit:40012901, where
project owners could bypass global security policies to delete resource
containers, we must restrict deletion calls to administrators.
As defined in the project deletion security spec (https://example.com/gerrit-delete-spec),
only system-level administrators should have the capability to
destroy project repositories in production environments.
Bug: gerrit:40012901

Trap 3: Adding vacuous or low-value bug/issue references to the commit body.

Do not introduce generic, filler sentences or phrases (like "To address b/12345...", "In reference to b/12345...", or "As requested in b/12345...") into the narrative body of a commit message unless you are actually adding descriptive, valuable context from that bug or design document. If the bug context is not known, or if you cannot visit/verify the bug contents, omit the reference from the body text entirely. The metadata footer at the bottom (e.g., Bug: b/12345 or Google-Bug-ID: b/12345) is the correct place to handle automated tracking; adding a vacuous mention in the body adds zero explanatory value and only increases noise.

Don't (Vacuous reference in body):

text
Suggest full commit message and avoid pedantic reviews
To address b/505405738, this change updates the review guidelines to
require that commit message reviews provide a complete, copy-pasteable
revised message when formatting issues are found. It also instructs the
reviewer to avoid pedantic feedback on minor casing or phrasing if the
original message is already clear and compliant.
Google-Bug-ID: b/505405738
Release-Notes: skip
Change-Id: I75ef56099ea36b8838a65746abb3a4771fcefd23

(Problem: The body paragraph starts with "To address b/505405738, ...", but this phrase does not explain what the bug represents or what context it provides. It is a low-value, mechanical filler phrase.)

Do (When bug context is unknown - omit the reference from the body):

text
Suggest full commit message and avoid pedantic reviews
Automated commit message reviews can sometimes generate fragmented,
pedantic feedback on minor phrasing nits, creating friction rather than
saving developer time.
To improve usability, SKILL.md now requires reviewers to generate a
complete, copy-pasteable revised commit message when formatting issues
are found, and to suppress feedback on minor nits if the original
commit is fundamentally sound.
Google-Bug-ID: b/505405738
Release-Notes: skip
Change-Id: I75ef56099ea36b8838a65746abb3a4771fcefd23

(Rationale: Since the bug context is not explicitly visited or verified, the vacuous reference is completely removed from the body text, and the body jumps directly into the problem context first rather than starting with a generic "This change..." statement.)

Do (When bug context is visited/known - integrate descriptive context):

text
Suggest full commit message and avoid pedantic reviews
In b/505405738, developers reported being slowed down by fragmented,
pedantic automated review feedback and requested ready-to-apply
suggestions to reduce manual editing friction.
To address this, this change updates the guidelines to require a
complete, copy-pasteable revised message when formatting issues are
found, and instructs reviewers to tolerate minor casing or phrasing
variations when the original message is already compliant.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1,230
Repository forks
276
7-day trend score
36

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/gerritcodereview/gerrit/gerrit-commit-message-review/badge)](https://verified-skill.com/skills/gerritcodereview/gerrit/gerrit-commit-message-review)

Something wrong with this skill or its page? Tell us.