commitlint
Skill1 starsChanged 5 months agoMITView on GitHub
Use when writing a git commit message in a repository that uses commitlint — read the enforced convention first, write a compliant message, and self-correct from hook rejections instead of bypassing them.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- dirien/yet-another-agent-harnesstheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- dirien/yet-another-agent-harness★ 19same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
If this exits non-zero, the configuration itself is broken (for example an unresolvable extends) — read the error on stderr instead of …
- Very specific: line 38
Look at the rules object. Each rule is [severity, applicability, value]:
- Distinctive: line 109
NEVER bypass the hook with git commit --no-verify — fixing the message is always the correct action.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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)
2. Read the enforced rules
npx commitlint --print-config jsonIf this exits non-zero, the configuration itself is broken (for example an
unresolvable extends) — read the error on stderr instead of guessing.
Look at the rules object. Each rule is [severity, applicability, value]:
- severity —
0= disabled,1= warning,2= error (only errors block commits) - applicability —
"always"= the condition must hold,"never"= it must not - value — the rule's parameter (list, number, or string)
The rules that matter most when writing a message:
| Rule | What it controls |
type-enum | Allowed types (e.g. feat, fix, chore, ...) |
scope-enum | Allowed scopes (empty list = any scope allowed) |
scope-empty | [2, "never"] = scope is required; [2, "always"] = scope is forbidden |
subject-case | With "never": cases the subject must NOT use |
subject-full-stop | With "never" and ".": subject must not end with a period |
header-max-length | Maximum length of the first line |
body-leading-blank | Blank line required between subject and body |
body-max-line-length | Maximum length of each body line |
A rule that is absent or disabled (severity 0) is simply not enforced. When unsure, use
a conservative baseline that passes the common presets: lower-case type, no trailing
period, header under 72 characters (config-conventional allows up to 100). Note that
running commitlint with no config at all fails with an empty-rules error rather than
falling back to any default convention.
3. Write the message
Format: type(scope): subject — the scope is optional unless scope-empty is [2, "never"].
An example that satisfies @commitlint/config-conventional:
feat(parser): add support for inline issue references
Explain what changed and why. Separate the body from the subject with a blank
line (body-leading-blank) and keep lines within body-max-line-length.
Closes #1234. Validate before committing
printf '%s' "feat(parser): add support for inline issue references
Explain what changed and why.
Closes #123" | npx commitlintExit code 0 with no output means the message passes. Validate the complete message (header and body), not just the first line — body rules are checked too. Doing this before committing is cheaper than a failed commit.
5. Self-correct when the commit-msg hook rejects
Rejection output names each violated rule in brackets:
⧗ --- input ---
Feat: Added new parser.
✖ subject must not be sentence-case, start-case, pascal-case, upper-case [subject-case]
✖ subject may not end with full stop [subject-full-stop]
✖ type must be lower-case [type-case]
✖ type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum]
✖ found 4 problems, 0 warnings- Fix ONLY the rules named in brackets; keep everything else identical.
- Re-validate via stdin (step 4), then retry the commit.
- NEVER bypass the hook with
git commit --no-verify— fixing the message is always the correct action.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

