writing-commit-messages

Validate Git commit messages against seven formatting and content rules.

1|Updated Nov 14, 2025
One-click install
npx skills add https://github.com/zgagnon/skills --skill writing-commit-messages-zgagnon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-commit-messages
Source: https://github.com/zgagnon/skills/tree/main/writing-commit-messages
Command: npx skills add https://github.com/zgagnon/skills --skill writing-commit-messages-zgagnon

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces adherence to the seven essential rules for writing clear, concise, and effective Git commit messages, preventing common errors and improving code history quality.

Core Features & Use Cases

  • Automated Rule Checking: Validates commit messages against specific criteria like subject line length, imperative mood, and body wrapping.
  • Violation Reporting: Clearly identifies and explains any deviations from the established commit message conventions.
  • Use Case: Before committing code, use this Skill to review your message. It will flag if your subject line is too long, if you used past tense instead of imperative mood, or if your body text exceeds the 72-character limit, ensuring your commit history remains professional and maintainable.

Quick Start

Use the writing-commit-messages skill to review the provided commit message for compliance with the seven rules.

Frequently Asked Questions about writing-commit-messages

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

FAQPage Schema
How do I validate git commit messages against best practices?

To validate git commit messages, this skill checks your text against seven specific rules for subject line length, imperative mood, capitalization, period usage, body wrapping, and content focus. It clearly identifies and reports any deviations from established version control conventions.

What are the seven rules for writing effective git commit messages?

The seven rules for writing effective git commit messages include enforcing subject line length, imperative mood, capitalization, and period usage. They also require body wrapping at 72 characters and focusing the content on the 'what' and 'why' to ensure a maintainable code history.

How do I check if my git commit subject line is properly formatted?

To check if your git commit subject line is properly formatted, this skill validates its length, verifies it uses the imperative mood, confirms proper capitalization, and ensures no trailing period is present, clearly flagging any violations for you to fix before committing.

Does the git commit message body wrapping limit matter for code review?

Yes, the git commit message body wrapping limit matters for code review because this skill enforces a strict 72-character limit. Proper wrapping ensures messages remain readable in terminal interfaces and maintains a professional, maintainable version control history.

Why should git commit messages focus on the what and why instead of the how?

Git commit messages should focus on the what and why instead of the how because this skill strictly enforces this convention to improve code history quality. Explaining what changes occurred and why they were made provides clear context for future code review and maintenance.

Can I use this tool to review past tense errors in my git commit history?

Yes, you can use this tool to review past tense errors because it validates git commit messages against the imperative mood rule. It will flag if you used past tense instead of an imperative command, ensuring your version control conventions remain strict and consistent.