🦀 ClawHub
GI Git Commit Helper
by @laimiaohua
Generate descriptive commit messages by analyzing git diffs. Use when the user asks for help writing commit messages or reviewing staged changes.
TERMINAL
clawhub install gi-git-commit-helper📖 About This Skill
name: gi-git-commit-helper description: Generate descriptive commit messages by analyzing git diffs. Use when the user asks for help writing commit messages or reviewing staged changes. tags: ["git", "commit", "conventional-commits", "changelog"]
Git Commit 提交信息生成
根据 git diff 分析变更内容,生成符合 Conventional Commits 规范的提交信息。
何时使用
提交格式
遵循 Conventional Commits:
(): [optional body]
type 类型
| 类型 | 说明 | |------|------| | feat | 新功能 | | fix | 修复 bug | | docs | 文档 | | style | 格式(不影响逻辑) | | refactor | 重构 | | perf | 性能优化 | | test | 测试 | | chore | 构建/工具/依赖 |
scope 范围(可选)
api、service、dao、router、authcomponent、view、router、storeconfig、deps、dbsubject 主题
示例
示例 1:
feat(auth): add JWT login endpoint示例 2:
fix(reports): correct date timezone in report generation示例 3:
refactor(service): extract payment logic from order service示例 4:
chore(deps): upgrade vue to 3.4.x生成流程
1. 运行 git diff --staged 或 git diff 获取变更
2. 分析变更文件与内容(新增/修改/删除)
3. 确定 type 和 scope
4. 用中文或英文写出简洁的 subject
5. 若变更复杂,可加简短 body 说明