git-commit

Enforce a seven-rule framework for standardized Git commit messages.

1.1k|107|Updated Jun 22, 2025
One-click install
npx skills add https://github.com/cloudflare/sandbox-sdk --skill git-commit-cloudflare
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit
Source: https://github.com/cloudflare/sandbox-sdk/tree/main/.opencode/skill/git-commit
Command: npx skills add https://github.com/cloudflare/sandbox-sdk --skill git-commit-cloudflare

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Poorly crafted commit messages hinder code reviews and obscure project history. This Skill guides teams to produce clear, concise commits that communicate what changed and why.

Core Features & Use Cases

  • Seven-rule framework for commit messages: separate subject from body, limit subject to 50 characters, capitalize the subject, avoid trailing periods, use imperative mood, wrap body at 72 characters, and explain what/why in the body.
  • Applies to individual commits and pull-request workflows to enforce consistency across a codebase.
  • Improves history readability, searchability, and change traceability for future maintenance and audits.

Quick Start

Craft a concise, imperative subject line (max 50 characters) and, if needed, a brief body explaining what and why. Example: git commit -m 'Add feature'

Frequently Asked Questions about git-commit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the standard rules for writing git commit messages?

Standard git commit messages follow a seven-rule framework: separate subject from body, limit subject to 50 characters, capitalize it, avoid trailing periods, use imperative mood, wrap body at 72 characters, and explain the what and why.

How do I format a git commit subject line properly?

Format a git commit subject line by capitalizing the first letter, using imperative mood, avoiding trailing periods, and keeping the length under 50 characters to ensure concise version control history.

Why use imperative mood in version control commit messages?

Using imperative mood in version control commit messages ensures consistency and readability. It directly communicates what the patch does, matching the built-in Git command style like "Add feature" rather than descriptive past tense.

How long should the body of a git commit message be?

The body of a git commit message should be wrapped at 72 characters per line. It must be separated from the subject line by a blank line and clearly explain what changed and why the change was made.

Does enforcing commit message best practices apply to pull request workflows?

Yes, enforcing commit message best practices applies to individual commits and pull request workflows. Standardizing messages across the codebase improves history readability, searchability, and change traceability for future maintenance.