commit-all
Create git commits in logical groups for all current changes
SKILL.mdskills/commit-all/SKILL.md
GitHubSmart Commit
Create logically grouped git commits following project conventions.
Commit Message Format
<type>(<scope>): <subject>
<body>
- type: one of the Types below.
- scope (optional): the area touched, in lowercase kebab-case, e.g.
fix(auth): handle expired sessions. Omit it for repo-wide changes. !right before the colon marks a breaking change:feat(api)!: remove v1 routes.- subject: lowercase imperative, no trailing period.
- body (optional): one short paragraph with only the why (rationale, tradeoffs, the reason behind a non-obvious value). Never restate what changed. When the subject says enough, leave out the body and the blank line before it.
- Keep every line within 72 characters.
- No co-authors: no
Co-Authored-Bytrailer.
Types
| Type | Use For |
|---|---|
feat |
New features |
fix |
Bug fixes |
refactor |
Code restructuring |
chore |
Maintenance |
docs |
Documentation |
test |
Tests |
style |
Formatting |
perf |
Performance |
Execution Steps
- Run
git statusto see changes (never use-uall) - Run
git diff --stagedandgit diffto understand changes - Run
git log --oneline -5to see which scopes recent commits use (never copy the legacy(type): subjectform) - Analyze changes
- Determine logical groups of features in current diff
- Pick type and scope from the changes in each group
- Generate appropriate messages
- Stage relevant files with
git add - Create commit with HEREDOC format, leaving out the blank line and
<body>when there is no body:git commit -F - <<'EOF' <type>(<scope>): <subject> <body> EOF - Repeat for each logical group of changes
- Run
git statusto verify
Safety Rules
- NEVER commit
.envor credential files - NEVER use
--amendunless explicitly requested - NEVER push
- NEVER skip hooks with
--no-verify
Example
git add src/preferences/
git commit -F - <<'EOF'
feat(preferences): add user preferences endpoint
Preferences lived in local storage, so every new device started empty.
EOF