caveman-commit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Write commit messages terse and exact. Conventional Commits format. No fluff. Why over what.
编写简洁准确的commit信息,遵循Conventional Commits规范,无冗余内容,优先说明修改原因而非修改内容。

Rules

规则

Subject line:
  • <type>(<scope>): <imperative summary>
    <scope>
    optional
  • Types:
    feat
    ,
    fix
    ,
    refactor
    ,
    perf
    ,
    docs
    ,
    test
    ,
    chore
    ,
    build
    ,
    ci
    ,
    style
    ,
    revert
  • 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 #42
    ,
    Refs #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
  • Emoji (unless project convention requires)
  • Restating the file name when scope already says it
主题行:
  • <type>(<scope>): <祈使句概述>
    <scope>
    为可选字段
  • 可选type:
    feat
    ,
    fix
    ,
    refactor
    ,
    perf
    ,
    docs
    ,
    test
    ,
    chore
    ,
    build
    ,
    ci
    ,
    style
    ,
    revert
  • 必须使用祈使语气:比如「add」、「fix」、「remove」,不要使用「added」、「adds」、「adding」
  • 尽量控制在50字符以内,最长不超过72字符
  • 末尾不要加句号
  • 冒号后的内容大小写遵循项目规范
正文(仅必要时添加):
  • 如果主题已经能说明所有内容,完全省略正文
  • 仅在以下场景添加正文:修改原因不明确、破坏性变更、迁移说明、关联issue
  • 每行长度不超过72字符
  • 列表使用
    -
    而非
    *
  • 末尾关联issue/PR:
    Closes #42
    Refs #17
禁止出现的内容:
  • 「This commit does X」、「I」、「we」、「now」、「currently」这类表述——diff已经说明修改了什么
  • 「As requested by...」这类表述——使用Co-authored-by标记即可
  • 「Generated with Claude Code」或任何AI相关的署名
  • 表情符号(除非项目规范明确要求)
  • 如果scope已经标明了文件,不需要重复提及文件名

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.
Diff:新增用户个人信息接口,正文说明修改原因
  • ❌ 「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:破坏性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
git commit
, does not stage files, does not amend. Output the message as a code block ready to paste. "stop caveman-commit" or "normal mode": revert to verbose commit style.
仅生成commit信息,不会执行
git commit
命令,不会暂存文件,也不会修改已有提交。将生成的信息以代码块形式输出,可直接复制使用。输入「stop caveman-commit」或「normal mode」即可切换回详细commit风格。