| name | commit |
| description | Create a git commit with conventional commit message |
| argument-hint | [message] |
Smart Commit
Create a git commit following project conventions.
Commit Message Format
(<type>): <description>
No body, no co-authors.
Types
| Type | Use For |
|---|
feat | New features |
fix | Bug fixes |
refactor | Code restructuring |
docs | Documentation |
test | Tests |
chore | Maintenance |
perf | Performance |
style | Formatting |
Execution Steps
- Run
git status to see changes (never use -uall)
- Run
git diff --staged and git diff to understand changes
- Run
git log --oneline -5 to see recent commit style
- If
$ARGUMENTS provided, use as commit message
- If no
$ARGUMENTS:
- Analyze changes
- Generate appropriate message
- Use type prefix based on changes
- Stage relevant files with
git add
- Create commit with HEREDOC format:
git commit -m "$(cat <<'EOF'
(type): description
EOF
)"
- Run
git status to verify
Safety Rules
- NEVER commit
.env or credential files
- NEVER use
--amend unless explicitly requested
- NEVER use
--force push
- NEVER skip hooks with
--no-verify
Example
git add server/http/src/main/kotlin/
git commit -m "$(cat <<'EOF'
(feat): Add user preferences endpoint
EOF
)"