Create an intelligent git commit with analysis of changes
Generates intelligent git commits with AI analysis of changes and conventional commit formatting.
/plugin marketplace add eyadsibai/ltk/plugin install ltk@ltk-marketplace[message]Create a well-crafted git commit by analyzing changes and generating a meaningful commit message.
Check git status: Run git status to see staged and unstaged changes.
Analyze staged changes: If changes are staged, analyze them:
git diff --staged to see what will be committedIf no staged changes: Prompt to stage changes or offer to stage all.
Analyze for commit splits: If changes span multiple concerns:
Pre-commit checks (optional but recommended):
Generate commit message:
type(scope): subjectCreate commit: Execute the commit with the message.
Post-commit: Show commit summary and next steps.
<type>(<scope>): <subject>
<body>
<footer>
Types with Emojis:
| Type | Emoji | Description |
|---|---|---|
feat | ✨ | New feature |
fix | 🐛 | Bug fix |
docs | 📝 | Documentation |
style | 💄 | Formatting/styling |
refactor | ♻️ | Code restructuring |
test | ✅ | Adding tests |
chore | 🔧 | Maintenance |
perf | ⚡ | Performance |
security | 🔒 | Security fix |
deps | 📦 | Dependencies |
Example: ✨ feat(auth): add OAuth2 support
Smart Commit
============
Changes Analysis
----------------
Files changed: X
Insertions: +X
Deletions: -X
Change Type: [feat/fix/refactor/etc.]
Scope: [component/module affected]
Pre-commit Checks
-----------------
[✓] No secrets detected
[✓] Lint check passed
[✓] Type hints valid
Generated Commit Message
------------------------
type(scope): subject line
Detailed description of what changed and why.
- Bullet point 1
- Bullet point 2
Proceed with commit? [Committing...]
Commit Result
-------------
[commit hash] type(scope): subject
Next Steps
----------
- Push with: git push
- Create PR with: /ltk:create-pr