agentleFS
SepantaJoshaniSepantaJoshani/agents-skills/skills/generate-commit-message/SKILL.md

generate-commit-message

Skill1 starsChanged 5 months agoApache-2.0View on GitHub

Generate professional git commit messages following cbea.ms guidelines. Outputs plain copy-pasteable commit message text by default.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. anchildress1/awesome-ai★ 66same name
    2. patrick-fu/awesome-skills★ 66same name
    3. tada5hi/skills★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Only ask the user if genuinely uncertain

    line 44
  2. Distinctive:

    Run git diff --staged --stat to see staged changes

    line 48
  3. Distinctive:

    If nothing is staged, ask the user to stage files

    line 49
  4. Very specific:

    Backtick code identifiers: Always wrap component names, hooks, props, and other code references in backticks (e.g.

    line 62
  5. Very specific:

    Test files (*.test.*, *.spec.*) → "Add tests" / "Update tests"

    line 86
  6. Distinctive:

    If changes are too large, suggest splitting into multiple commits

    line 92
  7. Distinctive:

    Keep bullet points action-oriented and concise (3-6 recommended)

    line 93

“Common” is measured: kept by at least 6 in 10 of the 3 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

Generate Commit Message

Generate commit messages following cbea.ms guidelines.

Output Format

Plain text commit message in a code block with NO language tag.

The user should be able to copy the entire content directly. Do NOT include:

  • git commit -m wrapper
  • EOF or HEREDOC syntax
  • bash language tag on the code block
  • Extra commentary outside the code block

Short Example

Add input validation to form components

Detailed Example

Implement input validation for form components

- Create validation utility with reusable validators
- Add validators for email, phone, and text inputs
- Update `Button` and `Input` to use validation

Format: Short vs Detailed

  • Short: Subject line only
  • Detailed: Subject + bullet list body (3–6 bullets)

Decide autonomously based on the nature of the change:

  • Small, focused changes → short
  • Multi-file restructuring, module extraction, or architectural changes → detailed
  • Only ask the user if genuinely uncertain

Workflow

  1. Run git diff --staged --stat to see staged changes
  2. If nothing is staged, ask the user to stage files
  3. Analyze git diff --staged
  4. Generate the commit message based only on staged changes
  5. Output the plain commit message in a code block (no language tag)

Commit Message Rules

  1. Subject line ≤72 chars
  2. Capitalize subject
  3. No period at end
  4. Imperative mood: "Add feature" not "Added feature"
  5. Blank line between subject and body
  6. Body lines ≤72 chars
  7. Backtick code identifiers: Always wrap component names, hooks, props, and other code references in backticks (e.g. OrderForm, useContainerQuery)

Imperative Test

Subject should complete: "If applied, this commit will [subject]"

Imperative Verbs by Change Type

TypeVerbs
FeatureAdd, Implement, Introduce, Create
FixFix, Resolve, Correct
RefactorRefactor, Simplify, Restructure
DocsDocument, Update docs
StyleFormat, Polish, Clean up
TestAdd tests, Update tests
ChoreUpdate deps, Configure

Context Detection

Infer context from file paths in the staged diff:

  • Monorepo app directories (e.g., apps/<name>/*) → mention the app name
  • Shared packages (e.g., packages/<name>/*) → mention the package name
  • Test files (*.test.*, *.spec.*) → "Add tests" / "Update tests"
  • Documentation (*.md) → "Document" / "Update docs"
  • Config files (.eslintrc, tsconfig.json, etc.) → "Configure" / "Update config"

Tips

  • If changes are too large, suggest splitting into multiple commits
  • Keep bullet points action-oriented and concise (3-6 recommended)
  • Focus on WHAT and WHY, not HOW

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.