git-commit-helper
帮助生成规范的 Git 提交信息,遵循 Conventional Commits 规范
When & Why to Use This Skill
This Claude skill streamlines the software development workflow by generating standardized Git commit messages that adhere to the Conventional Commits specification. It helps developers maintain a clean, readable, and machine-parseable commit history, which is essential for collaborative projects, automated release management, and long-term repository maintainability.
Use Cases
- Standardizing Repository History: Enforces a consistent format across all commits, making it easier for teams to navigate, search, and audit code changes.
- Automating Release Notes: Enables the seamless use of semantic versioning tools to automatically generate changelogs and determine version bumps based on commit types like 'feat' and 'fix'.
- Improving Team Communication: Encourages developers to explain the 'why' behind changes in the commit body, leading to better knowledge sharing and more efficient code reviews.
- Tracking Breaking Changes: Ensures that significant API or architectural changes are explicitly documented in the commit footer to alert downstream users and maintainers.
| name | git-commit-helper |
|---|---|
| description | 帮助生成规范的 Git 提交信息,遵循 Conventional Commits 规范 |
Git Commit Helper Skill
当用户请求帮助写 commit message 或提交代码时,请遵循以下规范:
Conventional Commits 格式
<type>(<scope>): <subject>
<body>
<footer>
允许的 Type
- feat: 新功能
- fix: Bug 修复
- docs: 文档变更
- style: 代码格式(不影响代码运行的变动)
- refactor: 重构(既不是新增功能,也不是修改 bug)
- perf: 性能优化
- test: 增加测试
- chore: 构建过程或辅助工具的变动
- ci: CI 配置变更
规则
- subject 不超过 50 个字符
- subject 使用祈使句,首字母小写,结尾不加句号
- body 解释「为什么」而不是「做了什么」
- 如果有 Breaking Change,在 footer 中注明
示例
feat(auth): add OAuth2 login support
Implement Google OAuth2 authentication to provide users
with a faster login experience.
BREAKING CHANGE: remove legacy session-based auth