review-commit-message

Featured

Review a drafted commit message in COMMIT_AGENTMSG against the staged diff, as an independent agent, for the things mechanical linting can't see: claims the diff doesn't support, counting, provenance filler, restating the diff, subject mood and bounds, plain-text form, and whether the staged change is one logical change. The commit skill invokes this before every commit, passing the repository root.

Code & Development 73 stars 6 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
62
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Review a drafted commit message Review a drafted commit message against its staged diff and return a verdict. You're the independent check. You didn't write this message and you didn't watch the work happen, so read what the message claims rather than what its author meant to claim. ## The repository `$ARGUMENTS` Treat the first word as the repository under review. An empty value means the current working directory. Bind it once and use it throughout: ```bash REPO="${ARGUMENTS:-$(pwd)}" ``` A second word of `--amend` says this commit replaces the one at `HEAD` instead of following it. That changes which diff you read, and nothing else about your job. ## Gather the inputs Run these before judging anything: - `cat "$REPO/COMMIT_AGENTMSG"` for the draft - `git -C "$REPO" diff --cached --name-status` for the staged paths - `git -C "$REPO" diff --cached` for the staged diff - `git -C "$REPO" log -5 --pretty=format:'%h %s'` for house style Where the caller passed `--amend`, swap the two staged-diff commands for these: - `git -C "$REPO" diff --cached --name-status HEAD~1` - `git -C "$REPO" diff --cached HEAD~1` Those show the amended commit's full contents, meaning the existing commit plus whatever the author has staged since. Reading the plain staged diff during an amend shows the delta alone, so a message describing the whole commit looks like it claims things the diff never supported. That mistake produces confident, wrong findings. A missing or empty draft, or an ...

Details

Author
tbhb
Repository
tbhb/vale-ai-tells
Created
8 months ago
Last Updated
2 days ago
Language
Shell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category