conventional-commits
4
总安装量
3
周安装量
#49885
全站排名
安装命令
npx skills add https://github.com/mrgrauel/skills --skill conventional-commits
Agent 安装分布
amp
3
opencode
3
cursor
3
kimi-cli
3
github-copilot
3
Skill 文档
Conventional Commits
Goal
Produce commit messages in this canonical shape:
<type>[optional scope][!]: <description>
[optional body]
[optional footer(s)]
Workflow
- Inspect staged changes with
git status --shortandgit diff --staged. - Summarize the change in one sentence before writing the message.
- Choose exactly one primary type:
feat: add user-facing behaviorfix: correct a bugdocs: change documentation onlystyle: change formatting only, no behaviorrefactor: change structure without feature or bug fixperf: improve performancetest: add or update tests onlybuild: change build system or dependenciesci: change CI/CD configchore: maintenance work with no user-facing behaviorrevert: revert a previous commit
- Add optional scope when it improves precision (
auth,api,ui,deps). - Write the description as an imperative phrase (
add,fix,remove), concise and specific, with no trailing period. - Mark breaking changes by adding
!and a footer:- Header example:
feat(api)!: rename session token field - Footer:
BREAKING CHANGE: sessionToken was renamed to authToken
- Header example:
- Add body only when useful to explain intent, constraints, or tradeoffs.
- Add footer trailers for references when needed (
Refs: #123,Closes: #456).
Validation Rules
Reject and rewrite any message that:
- misses the
type: descriptionshape - omits the required
:separator - uses vague descriptions (
update stuff,misc changes) - mixes multiple unrelated changes in one commit
- declares a breaking change without
!andBREAKING CHANGE:
Output Contract
When asked to draft a commit message:
- Return a final, copy-ready commit message block.
- Return one short line explaining the selected type (and scope, if used).
- Ask one focused clarification only when the change intent is ambiguous.