commit-hygiene

Enforce Conventional Commits rules on Git commit messages.

1|Updated Apr 22, 2026
One-click install
npx skills add https://github.com/unrealandychan/AgentFoundry --skill commit-hygiene-unrealandychan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit-hygiene
Source: https://github.com/unrealandychan/AgentFoundry/tree/main/skills/commit-hygiene
Command: npx skills add https://github.com/unrealandychan/AgentFoundry --skill commit-hygiene-unrealandychan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Conventional commit hygiene is essential for readable history and reliable automation; this skill enforces the Conventional Commits format and ensures proper git hooks configuration so teams can't bypass checks.

Core Features & Use Cases

  • Enforces type/scope subject rules for commits, ensuring consistent messages across a codebase.
  • Validates and optionally fixes messages, supports --setup to install hooks (husky, lint-staged, commitlint), --check-history to audit past commits, and --scope for targeted scoping.
  • Provides phase-by-phase guidance to parse and enforce messages, making it suitable for CI pipelines and local development.

Quick Start

Run the setup to install commit hooks, then use /commit-hygiene with your commit message to validate or fix it.

Frequently Asked Questions about commit-hygiene

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

FAQPage Schema
How do I enforce Conventional Commits across a git repository?

To enforce Conventional Commits across a git repository, you can automate validation of type, scope, subject, and length using git hooks. This skill configures husky and lint-staged to ensure messages meet conventional rules during local development and CI pipelines.

What is the best way to validate and fix non-compliant git commit messages?

The best way to validate and fix non-compliant git commit messages is using an automated linter. This skill parses messages against the Conventional Commits specification and provides a --fix mode to automatically correct formatting issues before they reach your history.

How do I set up commitlint and husky hooks for local development?

To set up commitlint and husky hooks for local development, run the --setup command. This installs the necessary git hooks to enforce Conventional Commits, preventing team members from bypassing message validation checks during the commit process.

Can I audit past git history for Conventional Commits compliance?

Yes, you can audit past git history for Conventional Commits compliance. By running the --check-history command, this skill reviews previous repository commits to identify any messages that violate the conventional type, scope, and length rules.

Does this commit linting approach work in CI pipelines?

Yes, this commit linting approach works in CI pipelines. It provides phase-by-phase guidance to parse and enforce messages, making it suitable for CI pipelines and local development to ensure consistent histories and automated hooks.