DauQuangThanh

git-commit

2
2
# Install this skill:
npx skills add DauQuangThanh/hanoi-rainbow --skill "git-commit"

Install specific skill from multi-skill repository

# Description

Generates well-structured git commit messages following conventional commit standards and best practices. Creates clear, descriptive commits with proper type prefixes (feat, fix, docs, refactor, etc.), concise subjects, and detailed bodies when needed. Use when committing code changes, creating git commits, writing commit messages, or when users mention "commit", "git commit", "commit message", "conventional commits", "changelog", or need help structuring version control messages. Ensures commits are atomic, descriptive, and follow team conventions.

# SKILL.md


name: git-commit
description: Generates well-structured git commit messages following conventional commit standards and best practices. Creates clear, descriptive commits with proper type prefixes (feat, fix, docs, refactor, etc.), concise subjects, and detailed bodies when needed. Use when committing code changes, creating git commits, writing commit messages, or when users mention "commit", "git commit", "commit message", "conventional commits", "changelog", or need help structuring version control messages. Ensures commits are atomic, descriptive, and follow team conventions.


Git Commit

Generates well-structured git commit messages following conventional commit standards and best practices.

Key Principles

  1. Be specific: Describe exactly what changed
  2. Be consistent: Follow conventional commit format
  3. Be atomic: One logical change per commit
  4. Be clear: Write for others (including future you)
  5. Be complete: Include why and context when needed
  6. Be conventional: Follow standard format for automation

Standard Format

<type>(<scope>): <subject>

<body>

<footer>

Components:

  • type: Category of change (required) - feat, fix, docs, refactor, perf, test, build, ci, chore, style, revert
  • scope: Area affected (optional) - auth, api, ui, db, etc.
  • subject: Brief description (required, ≤50 chars)
  • body: Detailed explanation (optional, wrap at 72 chars)
  • footer: Breaking changes, issue refs (optional)

Basic Workflow

  1. Choose the commit type:
  2. feat: New user-facing functionality
  3. fix: Bug fix for users
  4. docs: Documentation only
  5. refactor: Code restructuring without behavior change
  6. perf: Performance improvement
  7. test: Adding/updating tests
  8. build: Dependency/build system changes
  9. ci: CI/CD configuration changes
  10. chore: Maintenance tasks
  11. style: Code formatting
  12. revert: Reverting previous commit

  13. Write subject line (imperative mood, ≤50 chars):

✅ feat(auth): add OAuth2 authentication ✅ fix(api): resolve race condition in user updates ❌ feat: added some stuff ❌ fix: bug fix

  1. Add body if needed (explain why, not just what):
  2. Required for breaking changes
  3. Recommended for complex changes
  4. Wrap lines at 72 characters

  5. Include footer:

  6. Breaking changes: BREAKING CHANGE: description
  7. Issue references: Closes #123, Fixes #456

Quick Examples

Simple feature:

feat(auth): add password reset endpoint

Bug fix with context:

fix(api): prevent null pointer in user preferences

User preferences API crashed when optional fields were null.
Added null checks and default values.

Closes #456

Breaking change:

feat(api)!: change response format to JSON:API spec

BREAKING CHANGE: API responses now follow JSON:API format.
Update client code to parse data from `data` key instead
of root level.

Closes #789

Reference Documentation

For detailed guidance, load these reference files as needed:

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.