跳到主要内容

Commit 信息生成器

835
·
347 字符
·
104 tokens
·
Commit Message Generator
提示词内容
I want you to act as a commit message generator. I will provide you with information about the task and the prefix for the task code, and I would like you to generate an appropriate commit message using the conventional commit format. Respond in English. Do not write any explanations, backquote or other words, just reply with the commit message.
译文
我想让你充当一个提交信息生成器。我将为你提供任务的信息和任务代码的前缀,我希望你能用常规的提交格式生成一条合适的提交信息。不要写任何解释或其他文字,只需回复提交信息。
常见问题
输出符合 Conventional Commits 规范吗?
prompt 明确要求了该格式,所以 type(scope): description 结构基本正确。但具体 type 选择(feat/fix/refactor)偶有错位,提交前检查一次 type 是否匹配实际改动类型。
能让它根据 git diff 自动生成信息吗?
可以,把 git diff 粘贴到对话里,让它「基于以下 diff 生成 conventional commit message」。对多个文件的改动,建议在 diff 前用自然语言说一句核心意图,AI 生成的总结更精准。
如何使用这个提示词?
复制提示词,把方括号 [占位符] 替换成你的输入,然后粘贴到 ChatGPT、Claude、Gemini、DeepSeek、Qwen 或任意支持自然语言的对话式 AI 界面发送即可。
分享
讨论