| 名称 | commit-message-writer slug: commit-message-writer displayName: “提交信息生成器” |
| 版本 | 1.0.0 summary: “分析代码变更并生成符合 Conventional Commits 规范的提交信息。” |
| 描述 | “当用户完成改动、提供 git diff 或要求编写提交信息时使用。” |
| 开源协议 | MIT tags: - 开发 - git - 生产力 agent_created: true |
提交信息生成器
何时使用
用户需要为一次改动生成提交信息,或提供 git diff 要求规范化描述时使用。
工作流程
- 读取 diff 或用户描述,识别变更类型:feat / fix / docs / style / refactor / perf / test / chore。
- 判断影响范围 scope,用简短中文或英文概括主题,不超过 50 字符。
- 若有破坏性变更,在 type 后加
!,并在 footer 写BREAKING CHANGE:。 - 输出格式:
type(scope): subject,必要时补充 body 与 footer。
资源
scripts/parse_diff.py:统计 diff 中增删行数,辅助判断改动规模。
限制
不代替用户执行 git commit;信息必须基于真实改动,不虚构功能。