cbeams-git-commit-messages
Purpose
Help the user write, revise, or review Git commit messages that are easy to scan, consistent across a repo, and informative in history.
This skill supports both single-line commits and multi-paragraph commit bodies.
When to use
Use this skill whenever the user:
- asks for a commit message,
- pastes a diff / summary and asks what to commit,
- asks you to improve a commit message,
- asks you to review whether a commit message is "good".
Instructions
When producing a commit message:
Subject line rules
- Output a single subject line first.
- Use the imperative mood (a command) - e.g. "Add", "Fix", "Refactor", "Remove", "Update".
- Capitalise the first character.
- Do not end with a full stop.
- Aim for 50 characters or fewer.
- Treat 72 characters as a hard ceiling - if it will exceed 72, rewrite.
- Prefer rewriting over truncation.
- Do not sacrifice clarity only to force 50 characters; preserve meaning.
- Avoid past tense subjects such as "Added" or "Fixed".
- Avoid vague subjects such as "Update stuff" or "Misc changes".
- Only use ASCII characters in the subject and body.
Body rules
- Only include a body if it adds value.
- Separate subject and body with a single blank line.
- Wrap body lines at 72 characters.
- Explain what changed and why it changed.
- Avoid explaining how it changed (the diff already shows how).
- Use short paragraphs separated by blank lines when there are multiple ideas.
- Separate paragraphs in the body with a single blank line.
- Prefer bullet points to organize multiple points; keep each bullet concise.
- Use this structure when helpful: Context -> Change -> Reason/impact.
Optional footer
- If the user provides an issue / ticket reference, include it at the end as a footer
line (or lines), after a blank line.
- Prefer forms like:
- "Refs: #123"
- "Resolves: #123"
- "Fixes: #123"
- If the repo uses another tracker format (for example, "ABC-123"), preserve that
format instead of converting to "#123".
- Do not invent issue references.
Output format
Always output:
- The subject line on the first line.
- Then the body (if any), starting after one blank line.
- No surrounding quotation marks.
- No Markdown formatting.
- Separate paragraphs in the body with a single blank line.
If the user provides insufficient context (no summary of changes), ask for:
- a one-two sentence summary of what changed, why it changed, and expected impact or risk,
or
- the diff / list of files changed.
Examples
Good subject only:
Refactor cache key generation
Good subject and body (prose):
Fix race condition in webhook retries
Prevent concurrent retry workers from processing the same webhook event.
This avoids duplicate outbound calls and inconsistent delivery state
during peak traffic.
Good subject and body (bullets):
Improve commit-message skill and examples
- Move version into metadata.version to match the Agent Skills specification
- Add examples and a body template: Context -> Change -> Reason/impact
- Expand subject anti-patterns and quality checks; prefer rewriting over
truncation to preserve meaning
- Remove frontmatter tags to comply with the spec
Bad -> better rewrite:
Bad: Updated things
Better: Update deployment health check defaults
Quality checks (do before finalising)
- Subject <= 50 characters where possible; never > 72.
- Subject is imperative, capitalised, and has no trailing full stop.
- If there is a body: wrapped at 72 characters, explains what + why, not how.
- Output has no Markdown formatting, quotation marks, or code fences.
- Output has no trailing whitespace.
1---2name: cbeams-git-commit-messages3description: Write clear, consistent Git commit messages following Chris Beams' seven rules. Use when the user asks for a commit message, asks to improve one, or shares a diff and wants commit wording.4---56# cbeams-git-commit-messages78## Purpose910Help the user write, revise, or review Git commit messages that are easy to scan, consistent across a repo, and informative in history.1112This skill supports both single-line commits and multi-paragraph commit bodies.1314## When to use1516Use this skill whenever the user:17- asks for a commit message,18- pastes a diff / summary and asks what to commit,19- asks you to improve a commit message,20- asks you to review whether a commit message is "good".2122## Instructions2324When producing a commit message:25261. Subject line rules27 - Output a single subject line first.28 - Use the imperative mood (a command) - e.g. "Add", "Fix", "Refactor", "Remove", "Update".29 - Capitalise the first character.30 - Do not end with a full stop.31 - Aim for 50 characters or fewer.32 - Treat 72 characters as a hard ceiling - if it will exceed 72, rewrite.33 - Prefer rewriting over truncation.34 - Do not sacrifice clarity only to force 50 characters; preserve meaning.35 - Avoid past tense subjects such as "Added" or "Fixed".36 - Avoid vague subjects such as "Update stuff" or "Misc changes".37 - Only use ASCII characters in the subject and body.38392. Body rules40 - Only include a body if it adds value.41 - Separate subject and body with a single blank line.42 - Wrap body lines at 72 characters.43 - Explain what changed and why it changed.44 - Avoid explaining how it changed (the diff already shows how).45 - Use short paragraphs separated by blank lines when there are multiple ideas.46 - Separate paragraphs in the body with a single blank line.47 - Prefer bullet points to organize multiple points; keep each bullet concise.48 - Use this structure when helpful: Context -> Change -> Reason/impact.49503. Optional footer51 - If the user provides an issue / ticket reference, include it at the end as a footer52 line (or lines), after a blank line.53 - Prefer forms like:54 - "Refs: #123"55 - "Resolves: #123"56 - "Fixes: #123"57 - If the repo uses another tracker format (for example, "ABC-123"), preserve that58 format instead of converting to "#123".59 - Do not invent issue references.6061## Output format6263Always output:64- The subject line on the first line.65- Then the body (if any), starting after one blank line.66- No surrounding quotation marks.67- No Markdown formatting.68- Separate paragraphs in the body with a single blank line.6970If the user provides insufficient context (no summary of changes), ask for:71- a one-two sentence summary of what changed, why it changed, and expected impact or risk,72or73- the diff / list of files changed.7475## Examples7677Good subject only:78Refactor cache key generation7980Good subject and body (prose):81Fix race condition in webhook retries8283Prevent concurrent retry workers from processing the same webhook event.8485This avoids duplicate outbound calls and inconsistent delivery state86during peak traffic.8788Good subject and body (bullets):89Improve commit-message skill and examples9091- Move version into metadata.version to match the Agent Skills specification92- Add examples and a body template: Context -> Change -> Reason/impact93- Expand subject anti-patterns and quality checks; prefer rewriting over94 truncation to preserve meaning95- Remove frontmatter tags to comply with the spec9697Bad -> better rewrite:98Bad: Updated things99Better: Update deployment health check defaults100101## Quality checks (do before finalising)102103- Subject <= 50 characters where possible; never > 72.104- Subject is imperative, capitalised, and has no trailing full stop.105- If there is a body: wrapped at 72 characters, explains what + why, not how.106- Output has no Markdown formatting, quotation marks, or code fences.107- Output has no trailing whitespace.