skillsync

commit-message

Writes a clear git commit message for staged changes or a diff: a short summary line and a body that explains why. Use when the user asks for a commit message or to clean up commit history before merging.

Ask your agent

What it does

A summary line under 72 characters and a short body explaining what changed and why.

SKILL.md
---
name: commit-message
description: "Writes a clear git commit message for staged changes or a diff: a short summary line and a body that explains why. Use when the user asks for a commit message or to clean up commit history before merging."
---

# Commit message

Write the commit message a teammate will be glad to find in `git log` a year from now.

## Steps

1. Read the diff and work out the **one** thing it does. If it does several unrelated things,
   say so and suggest how to split the commit.
2. **Summary line**: imperative mood ("Add", "Fix", "Remove"), under 72 characters, no trailing
   period. Say what changes for the reader, not which files moved.
3. **Blank line**, then a **body** wrapped at 72 columns that answers *why* this change was needed
   and anything surprising about *how*. Skip the body only for trivial changes.
4. If the project uses Conventional Commits (look for `feat:`/`fix:` in the history the user shares),
   prefix the summary with the right type and scope.
5. Reference issues at the end ("Fixes #123") only when the user gives the number.

## Examples

Good:
```
Retry webhook delivery with exponential backoff

Receivers that were briefly down lost events because we gave up after
one attempt. Retry up to 5 times over ~10 minutes, and stop early on
4xx responses since those won't succeed on retry.
```

Bad: `fixed stuff`, `WIP`, `Update webhook.ts`.
1 file
  • SKILL.md1.4 KB