[FEATURE] Detect low-quality manual commits and offer to clean up the message
Summary
When a commit is made manually (outside of Claude Code — e.g. directly via git commit in a terminal or another tool) in a repo that Claude Code has previously worked in, there's no offer to help clean up a terse or low-quality commit message. Please add an optional check (e.g. a git hook Claude Code can install) that offers to improve a manual commit's message before/after it lands.
Current behavior
Reviewing my own commit history across repos: some repos have consistently good conventional-commit messages (evidently written with Claude Code in the loop), while others have commits like "changes", "chnages" (typo), repeated verbatim across consecutive commits — clearly written manually, without any assistance, in a hurry. There's no mechanism today that notices this pattern and offers help, even in a repo where Claude Code is otherwise actively used.
Motivation
Commit message quality directly affects how useful git log/git blame are later — both for the user themselves and for any Claude Code session that later relies on git history for context. A repo with "changes" x3 in a row has effectively no usable history for that stretch. This is a small thing per-commit, but compounds over a project's lifetime, and it's exactly the kind of low-effort-to-fix, easy-to-forget task an assistant is well suited to catch.
Proposed behavior
- Opt-in git hook (e.g.
commit-msgorpost-commit) that Claude Code can install per-repo on request. - When a commit's message looks low-quality (very short, no type prefix, generic words like "changes"/"fix"/"wip" with nothing else, or literally identical to the previous commit's message), offer to regenerate/expand it based on the actual diff — either by amending immediately (if not yet pushed) or logging a suggestion for the next Claude Code session in that repo to review.
- Entirely optional and easy to disable — this should never block or silently rewrite a commit the user didn't ask for help with.
Why it matters
- Keeps commit history usable long-term without requiring the user to remember commit hygiene every single time, especially for the exact moments (in a hurry, committing outside Claude Code) when hygiene tends to slip.
- Directly improves the quality of context available to future Claude Code sessions in that repo, since commit history is a common source of "what happened and why" context.
Related issues (adjacent, not duplicates)
None found describing this specific ask.
Notes
- Reviewed for duplicates before filing (searched "git hook detect manual commit clean up message suggest") — nothing found describing this as of 2026-07-19.
- Should be scoped to unpushed/local commits only for auto-amend, to avoid ever rewriting shared history without explicit confirmation.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗