| name | poocommerce-git-commit |
| description | Commit uncommitted changes with well-crafted messages following PooCommerce repo conventions. Use when the user says "commit", "commit changes", "commit this", "git commit", or "save my work". |
Commit Changes
Commit uncommitted work with clear, conventional messages. Groups unrelated changes into separate commits when appropriate.
Dynamic Context
- Current branch: !
git branch --show-current
- Uncommitted changes: !
git status --short
- Diff stat: !
git diff --stat
- Staged diff stat: !
git diff --cached --stat
Procedure
1. Analyze Changes
From the dynamic context above, determine what changed:
- No changes? Stop — tell the user there's nothing to commit.
- Already staged? Respect what the user staged. Only consider unstaged files for additional commits.
- Read full diffs only for files where the stat summary is ambiguous.
2. Decide Commit Grouping
Default to a single commit unless changes are clearly unrelated. Split only when:
- Changelog entries exist alongside source changes (changelog = separate commit)
- Obviously independent changes are mixed (e.g., a bug fix AND an unrelated config change)
Two files changed for the same reason = one commit. Don't over-split.
3. Draft Commit Message(s)
Use the current session context to understand what work was done and why. If motivation is still unclear after reviewing the diff and conversation, infer the best reasonable description from the diff and commit conventions.
Format — verb-first imperative, under 72 chars:
Fix get_item_downloads() not always returning an array