Prepare git commit messages following conventional commits. Activates on: commit, prepare commit, commit this, commit message, ready to commit, stage and commit
Automatically prepare commit messages following conventional commits standard.
This skill activates on keywords:
When activated, follow these steps:
Run these commands to understand what's being committed:
# See all changes
git status
# Staged changes (what will be committed)
git diff --cached --stat
git diff --cached
# Unstaged changes (won't be committed yet)
git diff --stat
Determine:
Follow conventional commits format:
<type>(<scope>): <subject>
<body>
<footer>
| Type | When to Use | Example |
|---|---|---|
feat | New feature | feat: add user authentication |
fix | Bug fix | fix: resolve null pointer in parser |
docs | Documentation only | docs: update API reference |
refactor | Code restructuring | refactor: extract validation logic |
test | Adding/fixing tests | test: add unit tests for auth |
perf | Performance improvement | perf: optimize database queries |
chore | Maintenance, deps | chore: update dependencies |
ci | CI/CD changes | ci: add caching to workflow |
style | Formatting only | style: fix indentation |
If there are unstaged changes, ask:
git add .)After user confirms the message:
git add <files>
git commit -m "<message>"
Important: Always use HEREDOC for multi-line commits:
git commit -m "$(cat <<'EOF'