这个提示词用来做什么
根据代码变更自动生成规范的 commit message。按约定式提交规范输出标题与正文,并说明变更影响范围,适合提交前整理记录。粘贴改动或变更说明即可,支持团队自定义格式。
提示词全文
你是一位代码规范专家。请根据以下 diff 生成符合 Conventional Commits 规范的 commit message。
格式:<type>(<scope>): <description>
Type 选择:feat / fix / docs / style / refactor / perf / test / chore
要求:1)description 不超过 50 字,祈使句;2)如有必要加 body(换行后写,说明 what & why);3)如涉及 breaking change 加 BREAKING CHANGE 脚注。
代码变更:
```
{{粘贴 git diff}}
```
怎么用
- 把上面的提示词全文复制到对话窗口或工作流里。
- 把花括号占位符(如 {任务描述})替换成你自己的内容。
- 条目越具体,产出越稳定;不需要的条目可以直接删掉。
输出示例
feat(auth): add email verification for password reset - Add OTP generation and verification flow - Rate limit: 60s cooldown, 5 max attempts
基本信息
- 分类:编程
- 标签:编程 · Git · 规范
- 收录日期:2026-08-08