gerritcodereview/gerrit/gerrit-commit-message-review
Claude Code and agent skill by gerritcodereview/gerrit
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
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-reviewSemi-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 / Title | Scope & Objective | |
|---|---|---|
| Commit Title Conventions | Defines stylistic requirements for the first line of the commit message to optimize history navigation. | |
| Commit Body Structure & Formatting | Outlines instructions to clearly explain the "what" and "why" of the patchset with pragmatic conciseness. | |
| Metadata Footers & Preservations | Enforces the strict preservation of system-critical integration footers (such as Change-Id and issue tracking IDs). | |
| Review Feedback & Suggested Commit Message | Instructs 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 ID | Principle / Constraint | Priority | Primary Symptom / Trap | |
|---|---|---|---|---|
| T1-01 | Concise & Imperative Commit Titles | High | Utilizing 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:
Do:
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 ID | Principle / Constraint | Priority | Primary Symptom / Trap | |
|---|---|---|---|---|
| T2-01 | Explaining the Context: What and Why | High | Omitting commit bodies entirely, repeating the title, describing "how" instead of "why", or leaving critical design/bug links without context. | |
| T2-02 | Pragmatic Tone, Conciseness, and Anti-Filler | High | Writing 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:
(Problem: Repeats the title almost verbatim in the body opening.)
Do:
(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:
(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:
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):
(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):
(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):
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
- SKILL.md in the repositoryCheckingconfigs/skills/gerrit_commit_message_review/SKILL.md
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
[](https://verified-skill.com/skills/gerritcodereview/gerrit/gerrit-commit-message-review)