
commit-helper
Generates clear, conventional commit messages from git diffs. Use when writing commit messages, revi
by gregorwang|Open Source
Commit Helper
帮助生成清晰、规范的 Git 提交信息。
Instructions
- 分析变更: 首先运行
git diff --staged查看暂存的更改 - 理解上下文: 分析文件类型、修改范围和目的
- 生成提交信息: 按照以下格式生成
Commit Message Format
使用 Conventional Commits 格式:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types
feat: 新功能fix: Bug 修复docs: 文档更新style: 代码格式(不影响代码运行的变动)refactor: 重构(既不是新功能也不是修复 bug)perf: 性能优化test: 测试相关chore: 构建过程或辅助工具的变动
Best Practices
- 标题行不超过 50 字符
- 使用现在时态("Add feature" 而不是 "Added feature")
- 正文每行不超过 72 字符
- 解释 什么 和 为什么,而不是 怎么做
Example
feat(auth): add OAuth2 login support
- Implement Google OAuth2 authentication flow
- Add token refresh mechanism
- Create user session management
Closes #123