Skip to content
Back to skills

Git Commit Generator

ASecurity

Generate Conventional Commits from staged git diff. Analyzes changes and produces commit messages following the Conventional Commits spec (feat, fix, refactor, etc.). Triggers on "generate commit", "write commit message", "conventional commit".

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 24, 2026
developmentbashgitapi

Works with

  • api

Security analysis

A100/100

Scanned November 24, 2026

npx -y skills add luqiang-code/claude-code-skills --skill git-commit-generator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Commit Generator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Git Commit Generator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/luqiang-code-git-commit-generator/badge)](https://www.skillsdirectory.com/skills/luqiang-code-git-commit-generator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: git-commit-generator
description: |
  Generate Conventional Commits from staged git diff. Analyzes changes and produces
  commit messages following the Conventional Commits spec (feat, fix, refactor, etc.).
  Triggers on "generate commit", "write commit message", "conventional commit".
metadata:
  type: tool
  version: "1.0.0"
  author: community
  tags: [git, commit, conventional-commits]
triggers:
  - "generate commit"
  - "write commit message"
  - "conventional commit"
  - "create commit"
allowed-tools:
  - Bash
---

# Git Commit Generator

Generate [Conventional Commits](https://www.conventionalcommits.org/) from staged changes.

## When to Use
- Ready to commit and want a properly formatted message
- Team enforces Conventional Commits standard
- User mentions "commit", "conventional commit", "commit message"

## When NOT to Use
- No staged changes yet
- Interactive rebase or amend workflows (different context)

## Workflow
1. Run `git diff --cached` to get staged changes
2. Run `git diff --cached --stat` for file overview
3. Analyze: determine type (feat/fix/refactor/docs/test/chore) and scope
4. Generate commit message:
   - Type(scope): short description (under 72 chars)
   - Blank line
   - Body: WHAT changed and WHY (wrapped at 72 chars)
   - Footer: breaking changes or issue references if applicable
5. Show the message and ask user to confirm before committing

## Output Format
```
feat(auth): add JWT refresh token rotation

Introduce automatic refresh token rotation to prevent token replay
attacks. Old refresh tokens are invalidated when a new one is issued.

BREAKING CHANGE: /api/auth/refresh now returns { accessToken, refreshToken }
Closes #234
```

## Key Principles
- Type must be one of: feat, fix, refactor, docs, test, chore, perf, ci, style
- Subject line: imperative mood ("add" not "added"), no period at end
- Body explains WHY, not just WHAT
- Reference issues with "Closes #N" or "Refs #N"
- Breaking changes MUST be flagged in footer

## Notes
- If diff is large (>500 lines), suggest splitting into multiple commits
- If no Conventional Commits type clearly fits, default to "chore"
- Never commit automatically — always ask for confirmation

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.