committing-with-commitlint
Installation
SKILL.md
Committing in a repository that uses commitlint
commitlint validates commit messages against the repository's configured convention (usually Conventional Commits). The configuration is the contract: read it before writing a commit message, and trust the error output when a commit is rejected.
1. Detect whether the repository uses commitlint
Any of these means commitlint is in play:
- A config file in the repository root:
.commitlintrc,.commitlintrc.{json,yaml,yml,js,cjs,mjs,ts,cts,mts}, orcommitlint.config.{js,cjs,mjs,ts,cts,mts} - A
"commitlint"field inpackage.json - A commit-msg hook that runs commitlint (check
.husky/commit-msg,lefthook.yml, or.git/hooks/commit-msg)