Command Palette

Search for a command to run...

Back to skills
skill № 93115

git-commit-generator

Generate clear, standardized git commit messages based on code changes (diffs), following Conventional Commits specification.

FreeNo executable scripts
trae-communityby trae-community★ 21 GitHub stars

Install git-commit-generator in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

Git Commit Generator

Description

This skill analyzes code changes (git diffs) and generates semantic, structured commit messages. It ensures that commit messages are concise, descriptive, and follow the Conventional Commits standard (e.g., feat:, fix:, docs:).

Usage Scenario

Trigger this skill when:

  • The user asks to "write a commit message" or "generate a commit".
  • The user asks "what did I change?" and expects a summary suitable for a commit.
  • You need to propose a commit message for a set of changes you just made.

Instructions

  1. Analyze the Changes:

    • Read the provided git diff or the changes in the current context.
    • Identify the scope of changes (e.g., specific component, file, or module).
    • Determine the type of change: Refer to resources/conventional-commits-types.md for the strict definition of types (feat, fix, docs, etc.).
  2. Formulate the Commit Message:

    • Follow the structure defined in templates/commit-message.txt.
    • Subject Line:
      • Format: <type>(<scope>): <subject>
      • Use imperative mood ("add" not "added", "change" not "changes").
      • No period at the end.
      • Keep it under 50 characters if possible.
    • Body (Optional but recommended for non-trivial changes):
      • Separate from subject with a blank line.
      • Explain what and why vs. how.
      • Use bullet points for multiple changes.
  3. Output Format:

    • Provide the commit message in a code block.
    • If there are multiple logical changes, suggest splitting them into multiple commits or provide alternative messages.

Examples

Example 1: Simple Documentation Update

Input: User: "Write a commit message for these changes." Diff:

diff --git a/README.md b/README.md
index 431f2eb..e727fe1 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,6 @@
 ## Quickstart
 
-1. Clone the repo.
+1. Clone this repository.

Output:

docs: update quickstart instructions in README

Refine the cloning step for better clarity.

Example 2: Feature with multiple files

Input: User: "Commit these changes for the login button." Diff shows changes in src/components/Button.tsx (added isLoading prop) and src/views/Login.tsx (passed loading state).

Output:

feat(auth): add loading state to login button

- Add `isLoading` prop to Button component to support visual feedback
- Connect login form submission state to Button in Login view
- Prevent double submission while request is in progress
Full SKILL.md on GitHub

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

  • examples/input.md
  • examples/output.md
  • resources/conventional-commits-types.md
  • templates/commit-message.txt

FAQ

What does the git-commit-generator skill do?

Generate clear, standardized git commit messages based on code changes (diffs), following Conventional Commits specification.

How do I install the git-commit-generator skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the git-commit-generator skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare git-commit-generator with