commit-convention

Validate Git commit messages against type, scope, and description conventions.

Updated Oct 21, 2022
One-click install
npx skills add https://github.com/Chengxufeng1994/dotfiles --skill commit-convention-chengxufeng1994
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit-convention
Source: https://github.com/Chengxufeng1994/dotfiles/tree/main/claude/skills/commit-convention
Command: npx skills add https://github.com/Chengxufeng1994/dotfiles --skill commit-convention-chengxufeng1994

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures consistency and clarity in Git commit messages across all projects, making code history more readable and maintainable.

Core Features & Use Cases

  • Enforces a Standard Format: Guides users to follow the <type>[(<scope>)]: <description> structure.
  • Defines Commit Types: Provides a clear list of valid types (feat, fix, refactor, etc.) and their meanings.
  • Validates Messages: Checks commit messages against defined rules for format, length, and content.
  • Use Case: Before committing code, ask the Skill to help you write a commit message that follows the established convention, or have it review a message you've already written.

Quick Start

Use the commit-convention skill to validate the following commit message: "feat: add user login functionality".

Frequently Asked Questions about commit-convention

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a standardized Git commit message?

To write a standardized Git commit message, use the <type>[(<scope>)]: <description> format, ensuring you use imperative mood, lowercase descriptions, and specific character limits for readability and automated tooling integration.

What are the valid commit types for Git commit conventions?

Valid commit types for Git commit conventions include feat, fix, and refactor, among others. Each type has a specific meaning to categorize the nature of changes within your version control history accurately.

How do I validate a Git commit message format?

You can validate a Git commit message format by checking it against defined rules for structure, length, and content, ensuring it strictly follows the type, scope, and description conventions before finalizing the code commit.

Why does a Git commit message need to use imperative mood?

A Git commit message needs imperative mood to improve code history readability and ensure compatibility with automated tooling. Standardized conventions require lowercase descriptions and strict character limits to maintain repository consistency.

Can I use the commit convention skill for existing repositories?

Yes, you can use the commit convention skill for existing repositories to validate messages you have already written or generate new ones, ensuring all future code commits adhere to the established format and type rules.

What is the character limit for a Git commit description?

The Git commit description requires strict adherence to character limits to improve code history readability, though the exact limit value is defined by the specific validation rules enforced within your project configuration.