hui-commit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWrite commit messages terse and exact. Conventional Commits format. No fluff. Why over what.
撰写简洁精准的提交消息。遵循Conventional Commits格式。无冗余内容。优先说明原因而非内容。
Rules
规则
Subject line:
- —
<type>(<scope>): <imperative summary>optional<scope> - Types: ,
feat,fix,refactor,perf,docs,test,chore,build,ci,stylerevert - Imperative mood: "add", "fix", "remove" — not "added", "adds", "adding"
- ≤50 chars when possible, hard cap 72
- No trailing period
- Match project convention for capitalization after the colon
Body (only if needed):
- Skip entirely when subject is self-explanatory
- Add body only for: non-obvious why, breaking changes, migration notes, linked issues
- Wrap at 72 chars
- Bullets not
-* - Reference issues/PRs at end: ,
Closes #42Refs #17
What NEVER goes in:
- "This commit does X", "I", "we", "now", "currently" — the diff says what
- "As requested by..." — use Co-authored-by trailer
- "Generated with Claude Code" or any AI attribution — unless the user's own rule requires an /AI-attribution trailer, then add it as a trailer
Assisted-by - Emoji (unless project convention requires)
- Restating the file name when scope already says it
主题行:
- —
<type>(<scope>): <imperative summary>可选<scope> - 类型:,
feat,fix,refactor,perf,docs,test,chore,build,ci,stylerevert - 使用祈使语气:"add"、"fix"、"remove" — 而非"added"、"adds"、"adding"
- 尽可能≤50字符,硬上限72字符
- 末尾无句号
- 冒号后的大小写遵循项目约定
正文(仅在必要时添加):
- 若主题已不言自明,则完全省略正文
- 仅在以下情况添加正文:原因不明确、破坏性变更、迁移说明、关联议题
- 每行最多72字符
- 使用 作为项目符号,而非
-* - 在末尾引用议题/PR:,
Closes #42Refs #17
绝对禁止包含的内容:
- "This commit does X"、"I"、"we"、"now"、"currently" — 差异记录会说明内容
- "As requested by..." — 使用Co-authored-by trailer
- "Generated with Claude Code"或任何AI归因 — 除非用户自身规则要求添加/AI归因trailer,否则不要添加
Assisted-by - 表情符号(除非项目约定要求)
- 当范围已说明时,重复文件名
Examples
示例
Diff: new endpoint for user profile with body explaining the why
- ❌ "feat: add a new endpoint to get user profile information from the database"
- ✅
feat(api): add GET /users/:id/profile Mobile client needs profile data without the full user payload to reduce LTE bandwidth on cold-launch screens. Closes #128
Diff: breaking API change
- ✅
feat(api)!: rename /v1/orders to /v1/checkout BREAKING CHANGE: clients on /v1/orders must migrate to /v1/checkout before 2026-06-01. Old route returns 410 after that date.
差异:新增用户资料端点,正文说明原因
- ❌ "feat: add a new endpoint to get user profile information from the database"
- ✅
feat(api): add GET /users/:id/profile Mobile client needs profile data without the full user payload to reduce LTE bandwidth on cold-launch screens. Closes #128
差异:破坏性API变更
- ✅
feat(api)!: rename /v1/orders to /v1/checkout BREAKING CHANGE: clients on /v1/orders must migrate to /v1/checkout before 2026-06-01. Old route returns 410 after that date.
Auto-Clarity
自动明晰原则
Always include body for: breaking changes, security fixes, data migrations, anything reverting a prior commit. Never compress these into subject-only — future debuggers need the context.
对于以下情况必须包含正文:破坏性变更、安全修复、数据迁移、任何回滚先前提交的操作。绝不能将这些内容压缩为仅主题的形式——未来的调试人员需要上下文信息。
Boundaries
边界限制
Only generates the commit message. Does not run , does not stage files, does not amend. Output the message as a code block ready to paste. "stop hui-commit" or "normal mode": revert to verbose commit style.
git commit仅生成提交消息。不执行,不暂存文件,不修改提交。输出消息为可直接粘贴的代码块。输入"stop hui-commit"或"normal mode":恢复为冗长的提交风格。
git commit