Git Commit Helper
Instructions
When the user requests a git commit or help with a commit message, follow these steps:
- •Analyze changes: Review staged and unstaged changes to understand the scope and purpose of the work.
- •Determine Domain: Identify the primary component or domain affected (e.g.,
(nfs),(open-webui)). Use lowercase and kebab-case. - •Select Type & Gitmoji: Choose the appropriate type and its corresponding gitmoji from the table below.
- •Draft Message: Create the message in English using the required format.
Format
code
<gitmoji> <type>(<domain>): <title> <description> Co-Authored-By: Cursor Agent <cursoragent@cursor.com>
- •Title: Concise, imperative mood, lowercase after the type.
- •Description: Optional, explain "why" or provide context.
- •Co-Authored-By: Always include
Co-Authored-By: Cursor Agent <cursoragent@cursor.com>.
Gitmoji & Type Mapping
| Gitmoji | Type | Description |
|---|---|---|
| 🔧 | chore | Routine maintenance or minor corrections |
| 🛠️ | fix | Intentional functional configuration changes |
| ✨ | feat | New features |
| ✏️ | typo | Fix a typo |
| 🐛 | bug | Fix a bug |
| ⬆️ | dep | Upgrade dependencies |
| 🔐 | security | Add or update secrets |
| 🗑️ | remove | Deprecate or clean up code |
| ♻️ | refactor | Refactor code |
| 📝 | docs | Add or update documentation |
| 🎨 | style | Improve structure / format |
| ⚡ | perf | Improve performance |
| ✅ | test | Add, update, or pass tests |
| 🔨 | build | Add or update development scripts |
Workflow
- •Propose message: Present the drafted message in a markdown code block.
- •Request confirmation: Ask the user if they want to proceed with the commit.
- •Commit & Push:
- •Only execute
git commitafter explicit user approval. - •After committing, ask if they want to push to the remote.
- •Only execute
git pushafter receiving explicit user approval.
- •Only execute
Additional Resources
- •For concrete usage examples, see examples.md