--- name: aif-commit description: Create conventional commit messages by analyzing staged changes. Generates semantic commit messages following the Conventional Commits specification. Use when user says "commit", "save changes", or "create commit". argument-hint: "[scope or context]" allowed-tools: Bash(git *) disable-model-invocation: true --- # Conventional Commit Generator Generate commit messages following the [Conventional Commits](https://www.conventionalcommits.org/) specification. ## Workflow 1. **Analyze Changes** - Run `git status` to see staged files - Run `git diff --cached` to see staged changes - If nothing staged, show warning and suggest staging 2. **Determine Commit Type** - `feat`: New feature - `fix`: Bug fix - `docs`: Documentation only - `style`: Code style (formatting, semicolons) - `refactor`: Code change that neither fixes a bug nor adds a feature - `perf`: Performance improvement - `test`: Adding or modifying tests - `build`: Build system or dependencies - `ci`: CI configuration - `chore`: Maintenance tasks 3. **Identify Scope** - From file paths (e.g., `src/auth/` → `auth`) - From argument if provided - Optional - omit if changes span multiple areas 4. **Generate Message** - Keep subject line under 72 characters - Use imperative mood ("add" not "added") - Don't capitalize first letter after type - No period at end of subject ## Format ``` ():