git-commit
Installation
SKILL.md
Git Commit
Overview
Write commit messages from actual repository changes. Prefer concise, intention-focused messages over file-by-file diff summaries. Treat references/commit-convention.md as the baseline style guide, then adapt scope and wording to the current repository.
Workflow
-
Inspect the change set first.
- Prefer
git diff --stagedwhen changes are staged. - Use
git diffwhen no staged diff exists or when the user asks about unstaged changes. - Use
git status --shortto understand file scope. - If the repository contains a commit convention file, read it before writing the message. Check likely names such as
COMMIT_CONVENTION.md,CONTRIBUTING.md,.github/COMMIT_CONVENTION.md, or.github/CONTRIBUTING.md. - Inspect recent commit subjects with
git log --format=%s -n 20to infer the repository's preferred output language. Follow the dominant language used in history. If recent commit subjects are mixed with no clear dominant language, or if there is no commit history or another error prevents inspection, default to English.
- Prefer
-
Choose one commit intent.
- If changes contain unrelated intents, recommend splitting commits.
- If the user still wants one message, choose the dominant intent and explain the tradeoff briefly.