agentleFS
bilals2008bilals2008/bilal-skills/skills/commit-message-writer/SKILL.md

commit-message-writer

Skill0 starsChanged 4 months agoMITView on GitHub

Write short, accurate Git commit messages in English. Use when the user asks to commit, create a PR, or write a commit message. ALWAYS check the actual git diff first. ALWAYS write the commit message in English regardless of what language the user speaks.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 13 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write concise, accurate Git commit messages based on real file changes.

    line 10
  2. Distinctive:

    Run this command immediately:

    line 16
  3. Distinctive:

    If nothing is staged:

    line 22
  4. Distinctive:

    NEVER guess or fabricate changes: Only write what you actually see in the diff.

    line 39
  5. Distinctive:

    Check git diff --name-only or git diff --staged --name-only.

    line 43
  6. Distinctive:

    First try to fit into 1-2 commits: If all changes are related (e.g., all in the same feature or all are small fixes), one commit is better …

    line 45
  7. Distinctive:

    All files in same component/feature → 1 commit

    line 49
  8. Distinctive:

    All files in same feature/component?

    line 61
  9. Distinctive:

    Only 2-4 files? → 1 commit usually enough

    line 64
  10. Distinctive:

    If user says "commit everything together", one commit for everything

    line 71
  11. Distinctive:

    Example: If git diff --name-only shows:

    line 73
  12. Distinctive:

    Use this format (Conventional Commits):

    line 93
  13. Distinctive:

    Always English. Always accurate.

    line 171

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Commit Message Writer

Purpose

Write concise, accurate Git commit messages based on real file changes. Never fabricate. Never write long paragraphs.

Instructions

Step 1 — Read actual changes FIRST

Run this command immediately:

git diff --staged

If nothing is staged:

git diff

If still nothing:

git log --oneline -5

Step 2 — Analyze changes

Look at:

  • Which files changed
  • What actually changed (added, removed, modified)
  • The real diff content

NEVER guess or fabricate changes. Only write what you actually see in the diff.

Step 3 — Group changes wisely (1-2 commits preferred)

Check git diff --name-only or git diff --staged --name-only.

First try to fit into 1-2 commits. If all changes are related (e.g., all in the same feature or all are small fixes), one commit is better than 4 unnecessary splits.

Split only when changes are clearly unrelated:

  • A new feature AND a docs update AND a dependency change → 2-3 commits max
  • All files in same component/feature → 1 commit
GroupExample filesType
New feature filesfeat-*.ts, api/*.tsfeat
Bug fixesfix-*.tsfix
Styling/CSS*.css, *.scss, tailwind classesstyle
Refactoringfiles where only structure changedrefactor
Config/buildpackage.json, .gitignore, configschore
Docs*.md, README, commentsdocs

Decision guide:

  • All files in same feature/component? → 1 commit
  • One feature + some styling? → 1 commit (feat: add feature and update styles)
  • Feature + docs + package change? → 2-3 commits max
  • Only 2-4 files? → 1 commit usually enough
  • Many files with clearly different concerns? → 2-3 commits max

How to execute:

  1. Decide groups (aim for 1-2, max 3)
  2. Show plan to user
  3. Wait for approval
  4. If user says "commit everything together", one commit for everything

Example: If git diff --name-only shows:

src/api/login.ts
src/api/logout.ts
src/styles/button.css
src/styles/form.css
README.md
package.json

Then propose 4 commits:

feat(api): add login and logout endpoints
style: update button and form styling
docs: update readme
chore: update package.json

Step 4 — Write each commit message

Use this format (Conventional Commits):

<type>(<scope>): <short description>
TypeWhen to use
featNew feature
fixBug fix
refactorCode change without fix/feature
styleFormatting, CSS
docsDocumentation
choreBuild, deps, config
perfPerformance improvement

Rules:

  • Short description: max 10 words, no period at end
  • Body (optional): max 2 lines, each line under 72 chars
  • ALWAYS write the commit message in English — regardless of what language the user speaks (Urdu, Hindi, Chinese, Spanish, Arabic, etc.)
  • One logical change = one commit. Don't bundle unrelated changes together

Step 5 — Show user before committing

Show the plan (splits + messages) and wait for approval before running git commit.

Examples

User says:

"I changed the button color and removed extra spacing"

You write:

style(button): update color and remove extra spacing

User says:

"commit everything"

You check diff, find files:

src/auth/login.ts
src/auth/register.ts
src/styles/button.css
README.md

Propose:

1. feat(auth): add login and register pages
2. style: update button styling
3. docs: update readme

User says:

"commit all changes"

You check diff, then:

refactor(api): clean up unused endpoints

What NOT to do

  • Long commit messages like "This commit adds a new feature for the login functionality which include..."
  • Fabricating changes you didn't see in the diff
  • Writing commit messages in any language other than English
  • Writing "fix: fix some issues" — be specific about what was fixed
  • Writing commit for files that haven't changed

Expected Output

type(scope): short description (max 10 words)

Optional body (max 2 lines)

Always English. Always accurate. Always short.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.