conventional-commits

Validate Git commit messages against the Conventional Commits specification.

1|Updated Dec 1, 2016
One-click install
npx skills add https://github.com/aaron-vaz/dotfiles --skill conventional-commits-aaron-vaz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: conventional-commits
Source: https://github.com/aaron-vaz/dotfiles/tree/main/opencode/.opencode/skills/conventional-commits
Command: npx skills add https://github.com/aaron-vaz/dotfiles --skill conventional-commits-aaron-vaz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures that all code commits adhere to the Conventional Commits specification, which is crucial for automated changelog generation and semantic versioning.

Core Features & Use Cases

  • Commit Message Validation: Automatically checks if your commit messages follow the type(scope): description format.
  • Semantic Versioning Enforcement: Prevents commits that don't meet the standard, ensuring a predictable release process.
  • Use Case: Before committing a new feature, this Skill will verify your commit message is formatted correctly (e.g., feat: add user authentication) and reject it if it's not, guiding you to the correct format.

Quick Start

Commit your code changes using a message that starts with a valid type like 'feat:', 'fix:', or 'chore:'.

Frequently Asked Questions about conventional-commits

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

FAQPage Schema
How do I enforce conventional commits in a Git pre-commit hook?

To enforce conventional commits in Git, this Skill validates commit messages against the specification by checking for the required type, optional scope, and description format. It integrates as a pre-commit hook to reject non-compliant messages before code is committed.

What is the correct format for conventional commit messages?

The correct format for conventional commit messages is `type(scope): description`. This Skill validates that your messages use strict formatting with specific rules for types like 'feat' for features, 'fix' for bug fixes, and 'BREAKING CHANGE' for major updates.

How does semantic versioning work with conventional commits?

Semantic versioning with conventional commits works by using commit message types to determine version bumps automatically. This Skill ensures your commits follow the specification, enabling predictable release processes and automated changelog generation based on 'feat' or 'fix' types.

Can I use this Skill to generate a changelog from Git commit history?

Yes, you can use this Skill to enable automated changelog generation from Git commit history. By validating that every commit message strictly follows the conventional commits specification, it ensures your Git log contains the structured data needed for reliable changelog automation.

Does this commit message validator support custom scopes and breaking changes?

This commit message validator supports optional scopes and specific rules for breaking changes. It enforces the conventional commits specification by checking the `type(scope): description` structure and verifying that 'BREAKING CHANGE' footers are formatted correctly.

Why are my Git commits being rejected before committing?

Your Git commits are being rejected because the pre-commit hook detected messages that do not follow the conventional commits specification. This Skill enforces the strict `type(scope): description` format, rejecting commits lacking valid types like 'feat', 'fix', or 'chore'.