gitmoji
它能做什么
这个助手可以为程序员生成 commit 提交信息,并用 emoji 表示这次代码改动的类型,帮助整理代码的修改历史。
适用场景
- ✓当你想在提交信息中加入 emoji 时。
- ✓当你不确定该为某次代码改动选哪个 emoji 时。
- ✓当你想遵循 gitmoji 的 emoji 提交信息规范时。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/gitmoji/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“为这次改动写一条 gitmoji 提交信息:我把登录页面更新成了新设计。”
每周 5 个新技能,1 分钟读完。
工作原理
它会分析你对代码做的改动,然后挑选最能代表改动类型的 emoji(比如新增功能、修复 bug 等),并写出完整的提交信息。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Gitmoji
Generates commit messages that follow the gitmoji convention: every commit starts with an emoji that identifies the intent of the change at a glance. Given a diff, a list of staged files, or a plain description of a change, this skill picks the single most appropriate gitmoji and writes a concise, well-formed commit message around it.
This skill only generates the message — it never runs git commit or any other git command. The output is a copyable message for the user to use.
When to Use This Skill
- User says "write a gitmoji commit", "gitmoji this change", or "add an emoji to my commit message"
- User asks "which gitmoji should I use for this?"
- User pastes a git diff or describes a change in a project that uses gitmoji-style commit history
- User wants an expressive, scannable commit history using emojis
When not to use: if the project follows plain Conventional Commits (feat:, fix:, ...) without emojis, use the conventional-commit or commit-message-storyteller skill instead. If unsure which convention the project uses, ask the user to provide recent commit history (for example, the output of git log --oneline -10).
Message Format
The gitmoji specification:
<intention> [scope?][:?] <message>
- intention — exactly one gitmoji expressing the goal of the commit
- scope (optional) — the section of the codebase affected, in parentheses
- message — a brief imperative explanation of the change
Examples:
✨ add multi-tenant support to the billing service
🐛 (auth) prevent token refresh loop on expired sessions
♻️ (api): extract pagination logic into shared helper
Emoji Style: Unicode vs Shortcode
Gitmoji supports two equivalent notations:
| Style | Example | When to prefer |
|---|---|---|
| Unicode | ✨ add dark mode |
Default — renders everywhere, shorter subject line |
| Shortcode | :sparkles: add dark mode |
Platforms that render shortcodes (GitHub, GitLab) or teams that grep commit logs by code |
Match the repository's existing history. If recent commits use :sparkles:-style shortcodes, generate shortcodes; otherwise default to unicode emojis.
How It Works
Step 1: Understand the Change
Work from whatever the user provides:
- A git diff — read it and identify what changed and why
- A list of staged/modified files — infer intent from file names and paths
- A plain description — use it directly
If the intent is genuinely ambiguous (e.g. "updated auth.js" could be a fix, a feature, or a refactor), ask one short clarifying question rather than guessing.
Step 2: Identify the Dominant Intent
Determine the primary purpose of the change. Common intents and their gitmojis:
| Emoji | Shortcode | Intent |
|---|---|---|
| ✨ | :sparkles: |
Introduce new features |
| 🐛 | :bug: |
Fix a bug |
| 🚑️ | :ambulance: |
Critical hotfix |
| 📝 | :memo: |
Add or update documentation |
| ♻️ | :recycle: |
Refactor code (no behavior change) |
| ✅ | :white_check_mark: |
Add, update, or pass tests |
| ⚡️ | :zap: |
Improve performance |
| 🎨 | :art: |
Improve structure / format of the code |
| 🔥 | :fire: |
Remove code or files |
| 🔒️ | :lock: |
Fix security or privacy issues |
| ⬆️ | :arrow_up: |
Upgrade dependencies |
| 🔧 | :wrench: |
Add or update configuration files |
| 💄 | :lipstick: |
Add or update the UI and style files |
| 💥 | :boom: |
Introduce breaking changes |
| 🚨 | :rotating_light: |
Fix compiler / linter warnings |
| 🌐 | :globe_with_meridians: |
Internationalization and localization |
This is only the most common subset — always consult references/gitmoji-reference.md for the full official list of 75 gitmojis before settling on one; a more specific emoji often exists (e.g. 🩹 for a trivial fix, ✏️ for a typo, 🚚 for a file move).
Step 3: Pick Exactly One Emoji
Rules for ambiguous cases:
- Specific beats generic — a typo fix is ✏️, not 🐛; moving files is 🚚, not ♻️; a trivial non-critical fix is 🩹, not 🐛
- Tests: ✅ for adding/updating passing tests; 🧪 only for intentionally failing tests (e.g. TDD red step)
- Fix vs hotfix: 🚑️ only for urgent production fixes; everyday bug fixes are 🐛
- Security fix: 🔒️ wins over 🐛 when the bug is a security issue
…
常见问题
什么是 commit?
可以把它理解为保存代码的进度。每个 commit 记录了一组改动,提交信息则说明这次做了什么。
什么是 gitmoji?
这是一种约定,用 emoji 快速说明每个 commit 的作用,让提交历史更直观,也更容易看懂。
这个助手会帮我修改代码吗?
不会,它只负责生成 commit 的文字信息。你仍然需要把改动应用到代码中,并使用 Git 的 commit 命令来提交。
详情
作者的原始描述
Generates commit messages following the gitmoji convention (https://gitmoji.dev) — picks the right emoji for the intent of the change and writes a well-formed message. Use when asked to "write a gitmoji commit", "add an emoji to my commit message", "which gitmoji should I use", "gitmoji this change", or when a project uses gitmoji-style commit messages. Works from a git diff, staged changes, or a
repo: github/awesome-copilot
热度
- GitHub 星标
- 40k
- 排名
- #7231
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
acreadiness-policy
40k让你的智能体协助制定或应用 AI 项目评估的政策。它有助于规范项目的评估方式,并确保合规。