| description | allowed-tools |
|---|---|
Commit pending changes with context-aware messages based on conversation |
Bash(git status:*), Bash(git diff:*), Bash(git add:*), Bash(git commit:*), Bash(git log:*) |
Commit all pending changes on this branch. Follow these steps:
-
Run
git statusandgit diffto see all pending changes (staged and unstaged) -
Analyze the changes and determine if they should be a single commit or split into multiple commits. Split into multiple commits when:
- Changes affect unrelated features or areas of the codebase
- There are distinct logical units of work (e.g., a refactor + a new feature)
- Separating would make the git history clearer and more useful
-
For each commit, write a message with this format:
- Line 1: Brief one-sentence summary (50 chars or less if possible, max 72)
- Line 2: Blank
- Lines 3+: Detailed description explaining:
- What specifically changed
- Why these changes were made (use context from our conversation)
- Any relevant context that would help someone reviewing later understand the reasoning
-
Stage the appropriate files and create each commit
Use the conversation history to understand the intent and context behind the changes. The detailed description should capture the "why" - not just what changed, but the reasoning and goals behind the changes.