From ai-dev
Create a conventional commit with auto-generated message based on staged changes.
How this command is triggered — by the user, by Claude, or both
Slash command
/ai-dev:commitgit/This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Commit Command Generate and execute a conventional commit based on staged changes. ## Allowed Operations - `git status` - Check repository state - `git diff --cached` - View staged changes - `git diff --cached --stat` - View change statistics - `git log --oneline -10` - View recent commits for style reference - `git commit -m "..."` - Execute the commit ## Process 1. **Check staged changes** 2. **If nothing staged**: Prompt user to stage files first 3. **Analyze changes** to determine: - What was modified - Type of change (feat, fix, refactor, etc.) - Scope of change ...
Generate and execute a conventional commit based on staged changes.
git status - Check repository stategit diff --cached - View staged changesgit diff --cached --stat - View change statisticsgit log --oneline -10 - View recent commits for style referencegit commit -m "..." - Execute the commitCheck staged changes
git diff --cached --stat
If nothing staged: Prompt user to stage files first
Analyze changes to determine:
Generate commit message following conventional commits:
type(scope): description
[optional body]
[optional footer]
Execute commit
| Type | Description |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Documentation only |
style | Formatting, no code change |
refactor | Code change that neither fixes nor adds |
perf | Performance improvement |
test | Adding or updating tests |
chore | Maintenance, deps, config |
# Feature
git commit -m "feat(auth): add password reset flow"
# Bug fix
git commit -m "fix(api): handle null response from external service"
# Refactor
git commit -m "refactor(utils): extract date formatting to shared module"
If the user provides hints, incorporate them:
commit auth → scope is "auth"commit "add login" → use as description hintcommit fix → type is "fix"Staged changes:
M src/auth/login.py
A src/auth/reset.py
Commit message:
feat(auth): add password reset functionality
Committed: abc1234
npx claudepluginhub drewdresser/ai-dev-settings --plugin ai-dev/commitAnalyzes staged Git changes to generate an intelligent conventional commit message with type, scope, body, and footers; presents for review and commits if approved.
/commitCreates a conventional git commit by analyzing staged changes and auto-generating a message in 'type(scope): description' format. Optional scope or message hint.
/commitStages unstaged changes if needed and creates a git commit with conventional commit format (feat, fix, docs, etc.). Uses arguments as optional message hint.
/commit-smartAnalyzes staged Git changes to generate a conventional commit message (type(scope): description), confirms with user, and commits if approved.
/commitStages unstaged changes based on git status and diff analysis, then creates a commit with a generated message. Uses current branch and recent commit history for context.