git-commit-message
/git-commit-message
Generates conventional-commit messages from staged changes: type prefix + English imperative subject (≤50 chars) + optional body explaining why. Use when the user asks to write, generate, or polish a git commit message.
- Author
- alapha888 ↗
- Repository
- agent-skills-en ↗
- Licence
- MIT
- Last repository change
- 22.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 22.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Generates conventional-commit messages from staged changes: type prefix + English imperative subject (≤50 chars) + optional body explaining why. Use when the user asks to write, generate, or polish a git commit message.
Original author description
Generates conventional-commit messages from staged changes: type prefix + English imperative subject (≤50 chars) + optional body explaining why. Use when the user asks to write, generate, or polish a git commit message.
How it works
- Workflow
- Rules
- Minimal example (runnable)
- Anti-patterns
SKILL.md preview
---
name: git-commit-message
description: "Generates conventional-commit messages from staged changes: type prefix + English imperative subject (≤50 chars) + optional body explaining why. Use when the user asks to write, generate, or polish a git commit message."
license: MIT
---
# Git Commit Message Generation
Generate a commit message from the actual staged changes (`git diff --cached`). The message must let a reader know "what changed and why" without opening the diff.
## Workflow
1. **Look at the changes**: run `git status --short` and `git diff --cached --stat` to confirm there is something staged. If the staging area is empty, stop and ask the user — never invent a commit message out of nothing.
2. **Pick a type**: choose exactly one type prefix based on the changes (if one commit mixes types, ask the user to split it):
- `feat`: new feature
- `fix`: bug fix
- `docs`: documentation only
- `refactor`: refactor (behavior unchanged)
- `test`: add or change tests
- `chore`: build, dependencies, misc
3. **Write the subject**: format `type: English imperative phrase`, ≤50 characters. Start with a verb: "Add…", "Fix…", "Remove…", "Unify…". Ban empty subjects like "update code", "some changes", "fix bug".
4. **Write the body (optional but recommended)**: 1–3 lines explaining *why*, not a play-by-play of *how*. Bug fixes must state the trigger conditions; features should describe the user-visible change.
5. **Output**: give a ready-to-run command, not bare text the user has to assemble.
## Rules
- The subject is for skimmers; the body is for future-you in three months. Keep the two jobs separate.
- A change mixing a feature and a refactor should become two commits, not one `feat` that papers over the mess.
- No meta-commentary in the message ("generated by AI", etc.) — the message is about the change, nothing else.
## Minimal example (runnable)
```bash
# 1. Look at the changes first
git status --short
git diff --cached --stat
# 2. Suppose the change: added CAPTCHA verification to the login endpoint
# Generated commit:
git commit -m "feat: add CAPTCHA verification to login endpoint" -m "Blocks automated credential stuffing; CAPTCHA valid 5 minutes, account locks 10 minutes after 3 failures."
```
Another example (bug fixes must state trigger conditions):
```bash
git commit -m "fix: keep order-list filters across pagination" -m "Trigger: filter first, then turn the page. Cause: page turns dropped the query params."
```
## Anti-patterns
- ❌ Writing a message for an empty staging area: no `git diff --cached`, no commit message.
- ❌ Catch-all `chore`: labeling every feat and fix as `chore` until the type system means nothing.
- ❌ Novel-length subjects: `feat: add a really useful feature that greatly improves the user experience` — the subject says *what*, leave praise to the user.
- ❌ Body as implementation log: "first changed line 20 of a.py, then b.py…" — the diff already shows that; the body explains why.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · alapha888/agent-skills-en | 100 | MIT |
| FrancoStino/opencode-skills-collection | 100 | MIT |
| useful-toys/slf4j-toys | 100 | Apache-2.0 |
Database snapshot: 13.11.2026 · package version f8330d3e4d45 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100git-commit-writer-free
Generate conventional commit messages from staged git changes. Use when the user asks to write commit message, generate commit, what should my commit say, or after the user runs git add and wants a commit message for staged files. - 100create-commit-message
Generate a Conventional Commit message from staged git changes when the user asks to write a commit message, create a commit, or format a commit - 84generate-commit-message
Generate well-structured git commit messages. Use when user says "generate commit message", "write a commit", "what should my commit message be", "create commit message for these changes", or needs help crafting conventional commit messages. - 100commit-message-generator
Generates conventional commit messages by analyzing git diffs and changes. Use when writing commit messages, following commit conventions, or documenting changes. - 100conventional-commit
Write a Conventional Commits message for the staged changes. Use when the user asks to commit, write a commit message, or summarize staged changes for git. - 100commit-message
Generate conventional commit messages - use when creating commits, writing commit messages, or asking for git commit help