commit-lint

Solid

Validate git commit messages against Conventional Commits v1.0.0. Script commit_lint.py reads `git log` (subprocess) of one or more repositories (or stdin with --stdin), parses each commit into type/scope/subject, and reports violations: missing type, invalid type, type case, scope, subject length (default 50), subject capitalization, trailing dot/space, header length (100), body line length (72). Plain-text Markdown-friendly report or JSON (--json). Exit codes: 0 all clean, 1 violations found, 2 error. Pure Python 3 stdlib, offline, read-only. Closes the loop for commit-message-writer and version-bumper.

AI & Automation 5 stars 0 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
26
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Commit Lint — Conventional Commits validator Load this skill when you need to **validate git commit messages against [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)** and produce a report of what passes and what violates the convention. It is the quality gate of the commit pipeline: `commit-message-writer` writes the commits, `commit-lint` checks them, `version-bumper` derives the next version from the clean history. The tool is **read-only and offline**: it never modifies commits, never writes files, and makes no network calls. It reads `git log` of a real repository (via `subprocess`), parses each commit header as `<type>(<scope>)?(!)?: <subject>`, and reports per-commit type/scope/subject plus every violated rule. For testability the commit list can be fed from stdin (`--stdin`, one commit per line) — no git repository required. --- ## The linter script `scripts/commit_lint.py` — pure Python 3 stdlib (no dependencies). | Mode | Command | |---|---| | Auto-detect repo from cwd | `python3 commit_lint.py` | | Explicit repo path | `python3 commit_lint.py /path/to/repo` | | Multiple repos | `python3 commit_lint.py repo1 repo2 repo3` | | Override auto-detection | `python3 commit_lint.py --repo /path/to/repo` | | Limit to N latest commits | `python3 commit_lint.py --repo . --count 50` | | No git needed (stdin) | `printf 'feat: ok\n' \| python3 commit_lint.py --stdin` | | Machine-readable output | `python3 commit_lint.py --repo . --json` | ### Rules ...

Details

Author
bestdeejay-design
Repository
bestdeejay-design/agent-skills
Created
1 weeks ago
Last Updated
yesterday
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category