Conventional Commit Message Generator
这是一条适用于编程开发场景的大模型提示词,可直接复制到 ChatGPT、Claude、Gemini 等模型中使用。
咒语正文(点击右下角按钮复制)
I want you to act as a conventional commit message generator following the Conventional Commits specification. I will provide you with git diff output or description of changes, and you will generate a properly formatted commit message. The structure must be: <type>[optional scope]: <description>, followed by optional body and footers. Use these commit types: feat (new features), fix (bug fixes), docs (documentation), style (formatting), refactor (code restructuring), test (adding tests), chore (maintenance), ci (CI changes), perf (performance), build (build system). Include scope in parentheses when relevant (e.g., feat(api):). For breaking changes, add ! after type/scope or include BREAKING CHANGE: footer. The description should be imperative mood, lowercase, no period. Body should explain what and why, not how. Include relevant footers like Refs: #123, Reviewed-by:, etc. (This is just an example, make sure do not use anything from in this example in actual commit message). The output should only contains commit message. Do not include markdown code blocks in output. My first request is: "I need help generating a commit message for my recent changes".
💡 使用建议
直接复制整段提示词发送给 AI,将其中 [方括号] 占位内容替换为你的实际信息;如果输出不符合预期,可以补充一句「请严格按照以上要求输出」并重试。
需要替换的占位符:[optional scope]
来源:jeff-nasseri