commit-a-change

Automates git commits compliant with commitlint type/scope and Husky validation.

229|5|Updated May 25, 2026
One-click install
npx skills add https://github.com/compartmentdev/compartment --skill commit-a-change
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit-a-change
Source: https://github.com/compartmentdev/compartment/tree/main/.codex/skills/commit-a-change
Command: npx skills add https://github.com/compartmentdev/compartment --skill commit-a-change

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates preparing a compliant git commit that adheres to commitlint type/scope rules and passes Husky validation.

Core Features & Use Cases

  • Enforces commitlint type and scope constraints for every commit.
  • Validates commit header length and format before the commit is created.
  • Triggers Husky hooks (lint-staged, checks, and commit-msg) during the commit process to ensure code quality and consistency.
  • Guides users to generate a canonical commit title for PR creation unless a different title is requested.

Quick Start

Ask the AI to prepare a compliant commit message for your current change and run the commit through Husky validation.

Frequently Asked Questions about commit-a-change

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

FAQPage Schema
How do I make a git commit that passes commitlint and Husky hooks?

Automating a compliant git commit ensures your changes adhere to commitlint type and scope rules while passing Husky validation. It enforces header length and format constraints, then triggers lint-staged and commit-msg hooks to guarantee code quality and consistency before the commit is created.

What is the format for a commitlint compliant commit message?

A commitlint compliant commit message adheres to strict type and scope constraints defined in your repository's commitlint configuration. The commit header length and format are validated before commit creation to ensure formal commit conventions are met and Husky validation passes.

Does Husky work with commitlint to validate commits before pushing?

Yes, Husky integrates with commitlint by triggering lint-staged, checks, and commit-msg hooks during the git commit process. This integration validates header format and runs code quality checks, ensuring your changes are ready-to-push with consistent commit conventions.

How do I generate a canonical commit title for a PR?

To generate a canonical commit title for PR creation, the system applies commitlint type and scope rules to your staged changes. It produces a standardized, compliant commit header that passes Husky validation, guiding you to create a formal title unless a different one is requested.

Why does my Husky pre-commit hook fail on commit message format?

Your Husky pre-commit hook fails on commit message format when the header does not adhere to commitlint type and scope rules. Enforcing header length and format constraints before the commit is created prevents these validation errors and ensures the commit passes the commit-msg hook.

When do I need to enforce commit conventions with lint-staged and Husky?

You need to enforce commit conventions with lint-staged and Husky when your repository workflow requires formal commit standards and pre-commit checks. This applies to environments where maintaining strict code quality, header format validation, and commit message consistency is required before pushing changes.