Setup Conventional Commits
Pack:
engineeringSource:engineering/setup-conventional-commits/SKILL.mdUse this skill when the task is to enforce Conventional Commits in a repo with minimal friction.
commitlintsetup- Husky
commit-msghook setup - local
commit-msgenforcement - choosing a minimal config
- keeping commit flow lightweight
Routing cues
Section titled “Routing cues”- enforce semantic commits, add commitlint, set up conventional commits, validate commit messages, or add a
commit-msghook -> use this skill - if the task is about naming one specific commit well -> use
write-intentional-commit-message - if the task is mainly about broader pre-commit automation -> use
setup-pre-commit
Default path
Section titled “Default path”- Use Conventional Commits as the history format.
- Use
@commitlint/cliwith@commitlint/config-conventional. - Prefer one small config file such as
commitlint.config.cjs. - Add a
commit-msghook through Husky when the repo accepts local hook tooling. - Keep enforcement syntax-focused in tooling and intent-focused in docs or agent guidance.
When to deviate
Section titled “When to deviate”- Extend the default type rules only when the repo has a real semantic need, not just personal preference.
- Skip Husky if the repo deliberately avoids local Git hook tooling.
- Add prompts or commit generators only when the team explicitly wants them; do not make them the default.
Guardrails
Section titled “Guardrails”- keep the config minimal
- syntax enforcement should not pretend to solve poor commit intent by itself
- do not add
commitizenor other interactive tooling unless the repo actually wants that ceremony commit-msgvalidation is the right hook for commit format; do not overloadpre-commit
- introducing a large commit workflow stack for a small repo
- forcing interactive commit tooling when plain Git is enough
- adding extra enforcement layers when the local hook already solves the problem
- treating enforcement as complete when contributors still have no guidance on type selection
Verification checklist
Section titled “Verification checklist”- the repo has one clear Conventional Commit policy
- commitlint config is minimal and readable
commit-msgis used for message validation if local hooks are enabled- contributors still have guidance on choosing the right type, not only passing syntax
Quick example
Section titled “Quick example”npm install -D @commitlint/cli @commitlint/config-conventional huskyecho "module.exports = { extends: ['@commitlint/config-conventional'] };" > commitlint.config.cjsnpx husky initecho "npx --no -- commitlint --edit \$1" > .husky/commit-msgCurrent snapshot
Section titled “Current snapshot”- Checked against official docs on 2026-04-03
- Current npm lines verified live on 2026-04-03:
@commitlint/cli@20.5.0,@commitlint/config-conventional@20.5.0,husky@9.1.7 - Docs in scope: commitlint getting started, commitlint configuration, Husky get started, and Conventional Commits
1.0.0
Official references
Section titled “Official references”- https://www.conventionalcommits.org/en/v1.0.0/
- https://commitlint.js.org/guides/getting-started.html
- https://commitlint.js.org/reference/configuration.html
- https://typicode.github.io/husky/get-started.html