commit
Installation
SKILL.md
Commit
Write a commit message that follows the project's conventions and clearly explains what changed and why.
Steps
- Run
git diff --cached(orgit diffif nothing is staged) to see all changes. - Run
git log --oneline -5to match the project's existing commit style. - Analyze the changes:
- What was added, changed, or removed?
- Is this a feature, bug fix, refactor, docs update, or chore?
- What is the motivation behind the change?
- Write the commit message:
- First line: imperative mood, under 72 chars (e.g.,
fix: prevent duplicate API calls on rapid tap). - Body (if needed): blank line, then explain why, not what.
- Match the project's commit style (conventional commits, prefixes, etc.).
- First line: imperative mood, under 72 chars (e.g.,
- Stage only relevant files. Don't
git add .blindly — exclude generated files, secrets, unrelated changes. - Create the commit.