commitlisted
Install: claude install-skill afine907/skills
# Commit - Git Commit Generator
## Goal
Analyze staged changes and generate conventional commit messages automatically, following semantic commit conventions with proper type, scope, and subject formatting.
## Trigger
- User says "commit", "/commit", "generate commit message"
- User has staged changes and wants a semantic commit message
- User wants to follow conventional commits format
## Commands
| Command | Description |
|---------|-------------|
| `/commit` | Analyze staged changes and generate commit |
| `/commit -m "message"` | Commit with custom message |
| `/commit --amend` | Amend previous commit |
| `/commit --dry-run` | Preview commit message without committing |
## Workflow
### Step 1: Pre-flight Check
```bash
# Verify git repository
git rev-parse --is-inside-work-tree
# Check staged changes
git diff --staged --quiet
# Get staged files
git diff --staged --name-only
```
**If no staged changes**: Check `git status`, prompt user to stage changes first.
### Step 2: Analyze Staged Changes
```bash
git diff --staged
git diff --staged --stat
```
**Analysis Focus**:
1. **Change Type Detection**
- New files → `feat`
- Modified files → Based on content
- Deleted files → `refactor` or `chore`
2. **Semantic Type Classification**
- `feat`: New feature/functionality
- `fix`: Bug fix
- `refactor`: Code restructuring without behavior change
- `docs`: Documentation only
- `style`: