跳到正文
Skillpedia
通用编程117k · #745

caveman-commit

它能做什么

这个技能撰写简短、准确并遵循 Conventional Commits 格式的提交信息。适合希望保持整洁提交历史、又不想手动写长信息的开发者。

适用场景

  • ✓当你让智能体为你的改动撰写提交信息的时候。
  • ✓当你希望提交标题遵循 Conventional Commits 格式的时候。
  • ✓当一项改动需要简短正文来说明原因的时候。

技能链接

https://github.com/JuliusBrussee/caveman/blob/main/skills/caveman-commit/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/JuliusBrussee/caveman/blob/main/skills/caveman-commit/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我为改动写一条提交信息。标题保持简短,只有在原因不明显时才添加正文。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体阅读改动内容,按照类型、范围和摘要的形式撰写标题,并使用祈使语气。只有在标题无法说明原因时,才添加正文。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Write commit messages terse and exact. Conventional Commits format. No fluff. Why over what.

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 — unless the user's own rule requires an Assisted-by/AI-attribution trailer, then add it as a trailer
  • Emoji (unless project convention requires)
  • Restating the file name when scope already says it

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.
    

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.

常见问题

它使用什么格式?

Conventional Commits,类型包括 feat、fix、refactor 和 docs 等。

它会添加 AI 署名吗?

不会,除非你自己的规则要求添加署名行。

标题应该多长?

理想情况下 50 个字符,最多不超过 72 个字符。

详情

作者的原始描述

Write a Conventional Commits message compressed to intent only. Use for "write a commit", "commit message", /commit or /caveman-commit.

repo: JuliusBrussee/caveman

热度

GitHub 星标
117k
排名
#745
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能