360 Secure SkillHub
360 安全技能中心

Caveman Commit

核心功能是生成符合Conventional Commits规范的极简Git提交信息,严格压缩冗余内容,仅保留核心意图与必要背景;主题≤50字符,仅在原因不明确、涉及重大变更等情况添加正文。典型场景为用户输入提交指令或暂存代码变更时自动触发,输出为可直接粘贴的代码块形式,仅生成信息不执行Git操作,可通过指令切换回 verbose 模式。

seanford
seanford
热度 21.24
最近更新 2026-05-27 15:43:02
分类:开发依赖:纯提示词应用场景:DevOps / 模板

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add caveman-commit
Metadata
name
caveman-commit
description
Ultra-compressed commit message generator. Cuts noise from commit messages while preserving intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why" isn't obvious. Use when user says "write a commit", "commit message", "generate commit", "/commit", or invokes /caveman-commit. Auto-triggers when staging changes.

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
  • 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.