git-commit-validator

Validate Git commit messages for Conventional Commits format and limits.

406|64|Updated Dec 6, 2022
One-click install
npx skills add https://github.com/TechDufus/dotfiles --skill git-commit-validator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit-validator
Source: https://github.com/TechDufus/dotfiles/tree/main/roles/claude/files/skills/git-commit-validator
Command: npx skills add https://github.com/TechDufus/dotfiles --skill git-commit-validator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solves? This Skill automates the enforcement of strict Git commit message standards, preventing messy commit histories, ensuring consistency, and improving project maintainability. It eliminates the need for manual review of commit messages, saving time and reducing errors.

Core Features & Use Cases

  • Conventional Commit Enforcement: Validates commit messages against the Conventional Commits specification, including type, scope, and description.
  • Character Limit Checks: Automatically verifies subject lines (max 50 chars) and body lines (max 72 chars) to maintain readability.
  • Content Policy Adherence: Prohibits AI attribution, branding, and emojis to keep commit messages professional and clean.
  • Use Case: Before pushing code, use this skill to automatically check your commit message for format, length, and content, ensuring it meets project standards without manual effort.

Quick Start

Validate the following Git commit message: 'feat(auth): implement user login functionality with OAuth support. This change introduces new authentication flows and updates existing user models.'

Frequently Asked Questions about git-commit-validator

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

FAQPage Schema
How do I enforce conventional commit format in Git?

Conventional commit format requires messages structured as <type>[optional scope]: <description>, where type indicates the change nature (feat, fix, etc.). This Skill validates that your commit messages follow this specification, checking type and scope syntax before allowing commits. It ensures consistency across your project's Git history.

What are Git commit message length limits and why do they matter?

Git commit message length limits maintain readability: subject lines should not exceed 50 characters, and body lines should not exceed 72 characters. This Skill automatically enforces these caps, preventing unwieldy messages that break formatting in logs and tools. Consistent limits improve code review and historical navigation.

Can I automate commit message validation before pushing code?

Yes, this Skill validates commit messages automatically during your commit workflow, before code is pushed. It checks format, length, and content policies in real time, reporting success or errors via exit codes. This eliminates manual review and catches violations early in the development cycle.

How do I keep commit messages professional and free of branding?

This Skill enforces content policies that prohibit AI attribution, branding statements, and emojis in commit messages. It scans your message text against these rules and rejects violations, ensuring your Git history remains professional and standardized across your team.

Does commit message validation work across all Git workflows?

Yes, this Skill applies during all commit workflows: drafting messages for approval, regenerating rejected messages, and before executing git commit commands. It ignores comment lines and integrates into your development process at any stage where validation adds value.

What happens if a commit message fails validation?

If validation fails, the Skill reports errors via exit codes and standard messages, describing which rules were violated. You can then regenerate or revise the message and revalidate. This prevents non-compliant messages from being committed, maintaining history quality without blocking your workflow.