agentleFS
tada5hitada5hi/skills/skills/generate-commit-message/SKILL.md

generate-commit-message

Skill2 starsChanged 28 days agoApache-2.0View on GitHub

Generate a Conventional Commits message for uncommitted changes in the working directory. Use when user wants to "generate commit message", "write commit message", "conventional commit", or before committing staged changes.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run these commands to understand the current state:

    line 49
  2. Distinctive:

    If there are no staged changes and no unstaged changes, inform the user there is nothing to commit and stop.

    line 71
  3. Distinctive:

    If there are both staged and unstaged changes, generate the message based on staged changes only (what git commit would include).

    line 72
  4. Distinctive:

    If nothing is staged but there are unstaged changes, generate the message for all unstaged changes and note that the user will need to …

    line 73
  5. Distinctive:

    Read the diffs carefully and determine:

    line 77
  6. Distinctive:

    Description: Use imperative mood ("add", "fix", "remove", not "added", "fixes", "removed").

    line 89
  7. Very specific:

    Scope: Use a noun describing the affected area (e.g., parser, auth, cli, deps).

    line 90
  8. Very specific:

    Footer: Use for breaking changes (BREAKING CHANGE: ...), issue references (Closes #123), or co-authors.

    line 92
  9. Very specific:

    Do not add a Co-Authored-By: Claude ...

    line 93
  10. Distinctive:

    If you recommended splitting into multiple commits, present each message separately with a brief note on which changes belong to each …

    line 104
  11. Distinctive:

    Do NOT automatically run git commit.

    line 106

“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

Analyze uncommitted changes in the working directory and generate a commit message following the Conventional Commits 1.0.0 specification.

Conventional Commits Format

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Types

TypeWhen to use
featA new feature (SemVer MINOR)
fixA bug fix (SemVer PATCH)
buildChanges to the build system or external dependencies
choreMaintenance tasks that don't modify src or test files
ciChanges to CI configuration files and scripts
docsDocumentation-only changes
styleFormatting, whitespace, semicolons — no code logic change
refactorCode change that neither fixes a bug nor adds a feature
perfA code change that improves performance
testAdding or correcting tests

Breaking changes

Indicate breaking changes (SemVer MAJOR) by either:

  • Adding ! after the type/scope: feat(api)!: remove deprecated endpoint
  • Adding a BREAKING CHANGE: footer (must be uppercase)

Step 1: Gather changes

Run these commands to understand the current state:

# Check what's staged vs unstaged
git status --short

# Show staged changes (if any)
git diff --cached --stat
git diff --cached

# Show unstaged changes (if any)
git diff --stat
git diff

# Show untracked files that might be relevant
git ls-files --others --exclude-standard

# Get recent commit messages for style reference
git log --oneline -10

Important:

  • If there are no staged changes and no unstaged changes, inform the user there is nothing to commit and stop.
  • If there are both staged and unstaged changes, generate the message based on staged changes only (what git commit would include). Mention that unstaged changes exist but won't be included.
  • If nothing is staged but there are unstaged changes, generate the message for all unstaged changes and note that the user will need to stage them first.

Step 2: Analyze the changes

Read the diffs carefully and determine:

  1. What changed — which files, functions, or modules were modified, added, or removed.
  2. Why it changed — infer the purpose from the diff context, file names, and surrounding code. If the purpose is ambiguous, read the relevant source files for context.
  3. Scope — identify if changes are confined to a single module/package/area. If so, use it as the scope. If changes span multiple areas, omit the scope or use the most prominent one.
  4. Breaking changes — look for removed public APIs, changed function signatures, renamed exports, deleted files, or config format changes that would break consumers.
  5. Single or multiple commits — if the changes clearly address multiple unrelated concerns (e.g., a bug fix AND a new feature), recommend splitting into separate commits and provide a message for each.

Step 3: Compose the message

Follow these rules:

  • Description: Use imperative mood ("add", "fix", "remove", not "added", "fixes", "removed"). Keep it under 72 characters. Do not end with a period. Start with lowercase.
  • Scope: Use a noun describing the affected area (e.g., parser, auth, cli, deps). Omit if changes are broad.
  • Body: Include only if the description alone doesn't convey the full picture. Separate from description with a blank line. Wrap at 72 characters. Explain what and why, not how.
  • Footer: Use for breaking changes (BREAKING CHANGE: ...), issue references (Closes #123), or co-authors.
  • Do not add a Co-Authored-By: Claude ... (or any AI-attribution) trailer.
  • Match the style and conventions of recent commits in the repository.

Step 4: Present to the user

Present the generated commit message in a fenced code block:

<the generated message>

If you recommended splitting into multiple commits, present each message separately with a brief note on which changes belong to each commit.

Do NOT automatically run git commit. The user decides when and how to commit.

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.