Catch bad commits before they merge.
Docs · Rules · GitHub Action · GitHub App · MCP server
Commit Check is commit policy as code for teams and AI agents. It validates commit messages, branch names, authors, sign-offs, tags, committed files and AI attribution against one cchk.toml — in your commit hook, in CI, on every pull request and inside your AI agent. When the fix is obvious, it hands you the line.
On GitHub? Install the Commit Check App and every push and pull request gets a check run, with no workflow file. It is free for public repositories and personal accounts.
pip install commit-check # Python 3.11+ commit-check --message --branch No config needed: out of the box it checks Conventional Commits and Conventional Branch.
Stop bad commits before they exist. In .pre-commit-config.yaml:
repos: - repo: https://github.com/commit-check/commit-check rev: v2.23.1 hooks: - id: check-message - id: check-branch Add args: [--fix] to check-message and the hook corrects mechanical slips itself — a type's case, a missing colon — instead of rejecting the commit. The hooks for the other checks (check-author-name, check-author-email, check-no-force-push, check-tag, check-files) are listed in the pre-commit guide.
The same cchk.toml drives all of them:
Every rule, with examples: commit-check.com/rules
Put a cchk.toml (or commit-check.toml) in the repository root or in .github/:
[commit] subject_max_length = 72 require_signed_off_by = true ai_attribution = "disclose" ignore_authors = ["dependabot[bot]", "renovate[bot]"] [branch] conventional_branch = true Roll out gently: warn = ["CC003"] reports a rule in full without failing the run. One policy per organization: inherit_from = "github:my-org/.github:cchk.toml" — see organization config. Override anywhere: every key has a CLI flag and a CCHK_* environment variable. Editor support: the schema is on SchemaStore, so VS Code and JetBrains autocomplete cchk.toml. Configuration reference — every key, its default, CLI flag and environment variable Priority: CLI > env > TOML > default. Booleans accept true/false, yes/no, 1/0; lists are comma-separated on the CLI and in env vars.
Output and appearance are per-run flags, not configuration: --format json, --no-banner, --compact, --dry-run, --rev, --config. Color follows NO_COLOR / FORCE_COLOR. Long-form descriptions: commit-check.com/configuration
--format json gives each check a stable rule ID, the value it saw and a suggestion — plus the corrected value itself when the correction is mechanical, so an agent can apply it without interpreting anything:
echo "Fix: add streaming support" | commit-check -m --format json The failing entry of its checks array:
{ "rule_id": "CC001", "check": "message", "status": "fail", "value": "Fix: add streaming support", "error": "The commit message should follow Conventional Commits. See https://www.conventionalcommits.org", "suggest": "Use \"fix: add streaming support\"", "fix": "fix: add streaming support", "docs_url": "https://commit-check.com/rules/#cc001", "reason": "" } A check that did not run has status skip, and reason says why when the author is on an ignore_authors list: "author dependabot[bot] is in [commit].ignore_authors".
With a message checked, the output also has ai_tools: the AI tools found by their known signatures in the message (and by a commit's author), under any ai_attribution policy. --ai-attribution-only runs only the AI rules (CC013 to CC016), for text that is not a commit message, such as a pull request description. With [pull_request] ai_declaration_checkboxes set, it also checks that the description ticks exactly one of those boxes (CC501). Under the default ai_attribution = "ignore" no AI rule runs, so the result passes and only ai_tools reports what was found; set forbid or disclose to enforce a policy:
commit-check --ai-attribution-only --format json < pr-description.md Validate a commit message with the Python API, without a subprocess:
from commit_check.api import validate_message validate_message("feat: add streaming support")["status"] # "pass" commit_check.api also has validate_branch, validate_author, validate_tag, validate_push and validate_all, all returning the same shape. Unlike the CLI they do not read cchk.toml: pass the policy as a config dict. The Python API page covers each function and how to load a repository's file.
Exit codes: 0 passed · 1 a check failed · 2 nothing was checked — bad usage, or a config that is missing, is not valid TOML, names an unknown rule, holds a regex that does not compile or gives a [commit] or [branch] setting a value of the wrong type (subject_max_length = "abc"), or git cannot read the repository (not a repository, or "dubious ownership"). A [files] value it cannot use turns that rule off with a notice instead. --dry-run reports everything and exits 0. More output formats: examples.
skills/commit-check teaches a coding agent to read the project's cchk.toml, check a message before it commits, follow the AI attribution policy and never skip the hook. It uses the Agent Skills format, which Claude Code, GitHub Copilot, Codex, Cursor and others load:
npx skills add https://github.com/commit-check/commit-check --skill commit-check Or copy the folder into your agent's skills directory, such as .claude/skills/commit-check/ for Claude Code.
*Push rulesets need a Team or Enterprise plan for private repositories. The full comparison, including YACC and custom hooks: commit-check.com/compare
[](https://commit-check.com) Community Questions and ideas go to Discussions, bugs to Issues. Releases follow Semantic Versioning. Released under the MIT License.
Thanks to everyone who has contributed. Want to join them? Start with CONTRIBUTING.md.
1 file in this release has provenance metadata.
commit conventions conventional commits conventional branch branch naming commit-check message lint message devops policy as code ai agents
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
1 file in this release has been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Nov 20, 2026 1 release file Full provenance
Nov 19, 2026 1 release file Full provenance
Nov 18, 2026 1 release file Full provenance
Nov 16, 2026 1 release file Full provenance
Nov 11, 2026 1 release file Full provenance
Nov 10, 2026 1 release file No provenance
Nov 8, 2026 1 release file No provenance
Nov 4, 2026 1 release file No provenance
Oct 29, 2026 1 release file No provenance
Oct 21, 2026 1 release file No provenance
Oct 18, 2026 1 release file No provenance
Oct 16, 2026 1 release file No provenance
Oct 14, 2026 1 release file No provenance
Oct 7, 2026 1 release file No provenance
Sep 28, 2026 1 release file No provenance
Sep 24, 2026 1 release file No provenance
Sep 13, 2026 1 release file No provenance
Sep 6, 2026 1 release file No provenance
Aug 31, 2026 1 release file No provenance
Aug 16, 2026 1 release file No provenance
Aug 13, 2026 1 release file No provenance
Aug 12, 2026 1 release file No provenance
Aug 7, 2026 1 release file No provenance
Aug 4, 2026 1 release file No provenance
Jul 31, 2026 1 release file No provenance
Jul 30, 2026 1 release file No provenance
Jul 24, 2026 1 release file No provenance
Jul 9, 2026 1 release file No provenance
Jul 6, 2026 1 release file No provenance
Jun 30, 2026 1 release file No provenance
Jun 28, 2026 1 release file No provenance
Jun 22, 2026 1 release file No provenance
Jun 21, 2026 1 release file No provenance
Jun 13, 2026 1 release file No provenance
May 16, 2026 1 release file No provenance
May 14, 2026 1 release file No provenance
Apr 20, 2026 1 release file No provenance
Apr 2, 2026 1 release file No provenance
Mar 16, 2026 1 release file No provenance
Feb 11, 2026 1 release file No provenance
Feb 3, 2026 1 release file No provenance
Feb 1, 2026 1 release file No provenance
Jan 31, 2026 1 release file No provenance
Jan 3, 2026 1 release file No provenance
Dec 15, 2025 1 release file No provenance
Nov 5, 2025 1 release file No provenance
Nov 4, 2025 1 release file No provenance
Oct 20, 2025 1 release file No provenance
Oct 12, 2025 1 release file No provenance
Aug 25, 2025 1 release file No provenance
Jul 14, 2025 1 release file No provenance
Jul 12, 2025 1 release file No provenance
Jul 9, 2025 1 release file No provenance
Jul 6, 2025 1 release file No provenance
Jun 13, 2025 1 release file No provenance
Jun 1, 2025 1 release file No provenance
Mar 30, 2025 1 release file No provenance
Feb 23, 2025 1 release file No provenance
Feb 3, 2025 1 release file No provenance
Nov 14, 2024 1 release file No provenance
Nov 12, 2024 1 release file No provenance
Nov 11, 2024 1 release file No provenance
Oct 29, 2024 1 release file No provenance
Oct 28, 2024 1 release file No provenance
Oct 4, 2024 1 release file No provenance
Sep 24, 2024 1 release file No provenance
Aug 6, 2024 1 release file No provenance
Jun 6, 2024 1 release file No provenance
Apr 7, 2024 1 release file No provenance
Mar 11, 2024 1 release file No provenance
Mar 10, 2024 1 release file No provenance
Jan 16, 2024 1 release file No provenance
Dec 26, 2023 1 release file No provenance
Dec 19, 2023 1 release file No provenance
Nov 2, 2023 1 release file No provenance
Apr 14, 2023 1 release file No provenance
Apr 12, 2023 1 release file No provenance
Apr 7, 2023 1 release file No provenance
Feb 24, 2023 1 release file No provenance
Feb 15, 2023 1 release file No provenance
Feb 9, 2023 1 release file No provenance
Feb 1, 2023 1 release file No provenance
Jan 23, 2023 1 release file No provenance
Jan 21, 2023 1 release file No provenance
Jan 12, 2023 1 release file No provenance
Jan 10, 2023 1 release file No provenance
Dec 28, 2022 1 release file No provenance
Dec 14, 2022 1 release file No provenance
Nov 25, 2022 1 release file No provenance
Nov 21, 2022 1 release file No provenance
Nov 16, 2022 1 release file No provenance
Nov 11, 2022 1 release file No provenance
Nov 4, 2022 1 release file No provenance
Nov 3, 2022 1 release file No provenance
Nov 2, 2022 1 release file No provenance




