Skills commitlint
install
source · Clone the upstream repo
git clone https://github.com/TerminalSkills/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/TerminalSkills/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/commitlint" ~/.claude/skills/terminalskills-skills-commitlint && rm -rf "$T"
manifest:
skills/commitlint/SKILL.mdsource content
commitlint
Overview
commitlint checks commit messages against conventional commit format (
type(scope): description). Pairs with husky for Git hooks and standard-version/changesets for automated changelogs.
Instructions
Step 1: Setup
npm install -D @commitlint/cli @commitlint/config-conventional husky npx husky init echo 'npx --no -- commitlint --edit "$1"' > .husky/commit-msg
Step 2: Configure
// commitlint.config.js — Commit message rules export default { extends: ['@commitlint/config-conventional'], rules: { 'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'build', 'ci', 'chore']], 'scope-case': [2, 'always', 'kebab-case'], 'subject-max-length': [2, 'always', 72], }, }
Step 3: Valid Commits
git commit -m "feat(auth): add Google OAuth login" # valid git commit -m "fix(api): handle null response from /users" # valid git commit -m "updated stuff" # rejected
Guidelines
- Conventional commits enable automated changelog generation and semantic versioning.
- Use with husky to enforce at commit time, not just in CI.
- Types: feat (minor bump), fix (patch bump), BREAKING CHANGE (major bump).