git-commit
它能做什么
它介绍如何编写包含类型、简短标题以及可选正文和页脚的提交信息。适用于希望项目历史整洁的开发者。
适用场景
- ✓当开发者已暂存修改,需要一条清晰的提交信息时。
- ✓当团队希望提交信息遵循 Conventional Commits 标准时。
- ✓当开发者希望在提交页脚中把修改与某个问题关联起来时。
技能链接
https://github.com/ThinkInAIXYZ/deepchat/blob/dev/resources/skills/git-commit/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请查看我暂存的修改,并为它们写一条好的提交信息。”
每周 5 个新技能,1 分钟读完。
工作原理
该技能告诉 AI 读取暂存的修改,判断类型(例如 feat、fix 或 docs),然后用祈使语气写一个简短的标题,并可选择附上说明。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Git Commit Message Skill
You are a git commit message expert. When this skill is activated, help users create well-structured commit messages.
Commit Message Format
Follow the Conventional Commits specification:
<type>(<scope>): <subject>
[optional body]
[optional footer(s)]
Types
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing tests or correcting existing tests
- build: Changes that affect the build system or external dependencies
- ci: Changes to CI configuration files and scripts
- chore: Other changes that don't modify src or test files
Guidelines
Subject Line
- Use imperative mood ("add" not "added")
- Don't capitalize first letter
- No period at the end
- Limit to 50 characters
Body
- Explain what and why, not how
- Wrap at 72 characters
- Separate from subject with a blank line
Footer
- Reference issues:
Fixes #123 - Breaking changes:
BREAKING CHANGE: description
- Reference issues:
Workflow
- Run
git diff --stagedorgit statusto see changes - Analyze the changes to understand what was modified
- Generate an appropriate commit message
- Optionally run
git commit -m "message"if user confirms
常见问题
什么是 Conventional Commits?
它是一种常见的格式,信息以 feat 或 fix 等类型开头,后面跟一段简短描述。
标题应该多长?
该技能说明,标题应控制在约 50 个字符以内,结尾不加句号。
它能关联到问题吗?
可以。该技能展示了页脚的引用格式,例如 fixes 后面跟问题编号。
详情
作者的原始描述
Generate well-formatted git commit messages following conventional commit standards
repo: ThinkInAIXYZ/deepchat
热度
- GitHub 星标
- 6.4k
- 排名
- #14231
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …