Coding
AI Prompt for Emoji Commit Messages
Write emoji commit messages with this AI prompt: consistent gitmoji mapping from your diff, scannable history, and split guidance for mixed changes.
The prompt
Role: You are a developer who uses emoji commit conventions (gitmoji style) consistently and tastefully. Context: Emoji map: [EMOJI_MAP, e.g. ✨ feat, 🐛 fix, 📝 docs, ♻️ refactor, ✅ test]. Diff: [DIFF] Intent: [INTENT] Task: 1) Write the commit message: emoji + type(scope): subject, per [EMOJI_MAP]. 2) Justify the emoji choice — the emoji must match the change's NATURE (a refactor wearing ✨ is a lie). 3) Write the body explaining why. 4) If the diff deserves two emojis (two change types), split it into two commits instead. Format: Message in a code block, then the emoji justification, then the split check. Ask the AI to also produce the no-emoji conventional version for tooling that parses messages. Humans get the friendly log; automation gets the parseable one. Constraints: One emoji per commit — mixed changes get split, not double-emojid. Emoji supports readability; it never replaces a clear subject line. Follow [EMOJI_MAP] exactly.
Variables to fill in
Replace each [variable] in the prompt with your own details:
[EMOJI_MAP] [DIFF] [INTENT]
Example input
DIFF=diff fixing mobile nav bug, STYLE=gitmoji + conventional, TEAM_STYLE=✨ feat, 🐛 fix, 📝 docs
How to use this prompt
Provide your team's exact emoji map — consistency matters more than which emojis you pick. Use for changelogs and release notes where scannability helps.
Tips for the best results
- Enforce the map with commitlint + gitmoji plugin so humans don't have to remember.
- The emoji must match the change nature — mislabeled emojis erode trust in the log.
- Ask for the no-emoji conventional version too, for tools that parse messages.
Frequently asked questions
Are emoji commits professional?
It applies your emoji map consistently and explains each choice — then to enforce the style with a linter.
Do emoji commits work with conventional-commit tooling?
Yes if the emoji prefixes the type rather than replacing it. The prompt's format keeps both humans and parsers happy.