Agent Skills: Writing Commit Messages

Use when creating git commits, writing commit messages, or when about to run git commit -- enforces structured commit message format with imperative mood, capitalized subjects, 72-char wrapping, and atomic commits

UncategorizedID: AmmarCodes/dotfiles/commit-messages

Install this agent skill to your local

pnpm dlx add-skill https://github.com/AmmarCodes/dotfiles/tree/HEAD/skills/commit-messages

Skill Files

Browse the full folder contents for commit-messages.

Download Skill

Loading file tree…

skills/commit-messages/SKILL.md

Skill Metadata

Name
commit-messages
Description
Use when creating git commits, writing commit messages, or when about to run git commit -- enforces structured commit message format with imperative mood, capitalized subjects, 72-char wrapping, and atomic commits

Writing Commit Messages

Overview

Every commit message follows a consistent format. The subject line completes the sentence: "If applied, this commit will <your subject line>". When present, the body explains why, not what.

Detect Project Convention First

Follow existing instructions for commits if present in the repository. Check git log --oneline -20 to see recent patterns and match the existing style.

Project convention always wins. The rules below are the default when no convention is detected.

References

Consider the following references when creating new commit messages:

Attribution

Author: Andrew Fontaine (@afontaine)

This skill is based on widely-accepted git commit message conventions, with inspiration from:

Writing Commit Messages Skill | Agent Skills