git-commit-message
Installation
SKILL.md
Git Commit Message Generation
When asked to generate a git commit message, satisfy the following rules:
-
Gather Context (read-only — do not stage anything):
- Run
git statusto identify all modified, deleted, staged, and untracked files. - Run
git diffto see all unstaged changes. - Run
git diff --cachedto see all already-staged changes. - Untracked files: Read the full content of new files.
- Deleted files: Note the removal.
- Combine all of the above to form a complete picture of what will be committed.
- Run
-
Draft Message:
- Create a conventional commit message based on the actual changes found.
- Header: Start with a Conventional Commit header (e.g.,
feat:,fix:,refactor:) that captures the key change. - Body: Leave one empty line after the header, then a list of details.
- Format: Use a simple bulleted list (
-) for the details. - Style: Use the imperative mood (e.g., "Create", "Update", "Fix", "Refactor").
- Quotes: NEVER use double quotes (") in the commit message content. Use single quotes (') instead if you need to quote something.