Git commit generator

From trae-community/trae-skills · View interactive version

Git commit generator is an AI agent skill from the GitHub repository trae-community/trae-skills. Generate clear, standardized git commit messages based on code changes (diffs), following Conventional Commits specification.

How to use this skill

Skill file

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:

Instructions

  1. Analyze the Changes:
  1. Formulate the Commit Message:
  1. Output Format:

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
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.