About git-commit
A Git commit skill for reviewing project changes and proposing a conventional commit message. It requires confirmation before committing or pushing and accounts for pre-commit hooks and quality checks.
Key features
- 01Fetches remote changes
- 02Reviews staged and unstaged diffs
- 03Suggests a conventional commit message
- 04Requires confirmation before commit and push
- 05Checks pre-commit hooks and quality checks
Use cases
- 01Prepare a commit message from current changes
- 02Review changes before committing
- 03Run required checks before commit and push
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ dzhuneyt/ skills --skill git-commitAfter installing, type/git-commitin Claude Code to confirm it loaded.
Details
From the project READMEExecute the following steps: 0. Always navigate to the project root directory.
- Run
git fetchto get the latest changes from the remote. - Use local
gitto view staged and unstaged changes. Prefer a one-liner that lists files and diffs. - Based on the changes, generate a concise commit message suggestion, that follows the conventional commit format.
- ALWAYS ask for confirmation before executing the commit and push. The confirmation should follow the format specified below.
Confirmation format:
- Commit message:
- Changed files:
- (<concise info about added/modified/removed files, use emojis to indicate "added" and "removed" and avoid unnencessary text>) - <max 10 words summary of what and why was changed in this file>
- Same as above for , , ... up to 10 files.
The commit message should be:
- Under 50 characters for the subject line
- Clear and descriptive of what actually changed
- Follow conventional commit format:
type(scope): description
Rules to follow:
- NEVER add Co-Authored-By lines to commit messages
- Try to execute commands from the project root directory, when possible
- When pre-commits fail, try to fix them and commit again
- Try chaining commands when possible (e.g.
git diffof multiple files) - If the project has a pre-commit hook, try to execute the pre-commit hook commands locally and only then move forward with the commit and push.
- If the project has "quality checks" or other similar requirements, try to execute them locally and only then move forward with the commit and push.
Comments
Markdown supported