360 Secure SkillHub
360 安全技能中心

conventional-commits

该 Skill 规定了 Conventional Commits 的格式、类型清单和撰写规则,工作流为读取当前 git diff、判断主要变更意图、选定单一 type 并按规则起草,最后以代码块形式输出可直接复制的提交信息。仅涉及提交信息撰写,不涉及实际提交或其他 git 操作。

widoxm
widoxm
热度 41.05
最近更新 2026-08-31 20:25:48
分类:开发依赖:代码执行应用场景:工作流 / 摘要总结

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add widoxm/conventional-commits
Metadata
name
conventional-commits
description
Write git commit messages that follow the Conventional Commits spec. Use whenever the user asks to write, draft, or improve a commit message, or says "commit".

Conventional Commits

Write concise, conventional commit messages based on the current diff.

Format

<type>(<scope>): <subject>

<body>       # optional, explain the "why"
<footer>     # optional, e.g. "BREAKING CHANGE: ..." or issue refs

Types

  • feat — new feature
  • fix — bug fix
  • docs — documentation only
  • style — formatting, no logic change
  • refactor — code change that neither fixes a bug nor adds a feature
  • perf — performance improvement
  • test — adding/updating tests
  • build — build system or external dependencies
  • ci — CI configuration
  • chore — other maintenance

Rules

  1. Subject is imperative, present tense, no trailing period (e.g. "add", not "added" or "adds").
  2. Keep the subject under 72 characters.
  3. Include scope only when it clarifies the affected area.
  4. Body explains why, not what — the diff already shows what.
  5. Separate subject from body with a blank line.

Workflow

  1. Read the diff: git diff (staged) or git diff HEAD.
  2. Identify the single primary intent — pick one type.
  3. Draft the message, then apply the rules above.
  4. Output only the final message in a fenced code block for easy copy-paste.