--- allowed-tools: Bash, AskUserQuestion description: AI-generated git commit messages from staged changes argument-hint: [optional: type or scope hint] --- # AI Git Commit Message Generator Analyzes your staged git changes and generates a well-structured conventional commit message using AI. Perfect for creating meaningful, consistent commit messages that follow best practices. ## Task Review staged changes, analyze the modifications, and generate a descriptive conventional commit message that accurately describes what was changed and why. ## Process ### 1. **Check Git Status** First, verify there are changes to commit: ```bash git status ``` If no changes are staged, check if there are unstaged changes: - If yes: Ask user if they want to stage all changes - If no: Exit with message "No changes to commit" ### 2. **Review Changes** Show detailed diff of staged changes: ```bash # Show staged changes git diff --cached --stat git diff --cached ``` Also check recent commits for context on commit message style: ```bash git log --oneline -5 ``` ### 3. **Analyze Changes** Examine the diff output to understand: - **What changed**: Files modified, added, or deleted - **Scope**: Which modules/components are affected - **Type**: Is this a feature, fix, refactor, docs, etc.? - **Impact**: Breaking changes, new functionality, bug fixes - **Details**: Specific changes worth mentioning ### 4. **Generate Commit Message** Create a conventional commit message following this format: ``` ():