commit
Original:🇺🇸 English
Translated
Guidance for writing git commit messages that follow the Conventional Commits 1.0.0 specification. Use when preparing commit messages, summarizing code changes for a commit, or validating commit text for compliance.
1installs
Sourcetrancong12102/pi-skills
Added on
NPX Install
npx skill4agent add trancong12102/pi-skills commitTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Conventional Commits
Overview
The commit skill summarizes the Conventional Commits 1.0.0 specification and
common best practices, supporting compliant commit messages. Reference:
Conventional Commits 1.0.0.
Commit Format
text
<type>[optional scope][!]: <description>
[optional body]
[optional footer(s)]Elements:
- type (required): Primary intent of the change. and
featmap to semantic versioning. Additional allowed types include:fix,docs,style,refactor,perf,test,build,ci,chore.revert - scope (optional): Short component or package name in parentheses, e.g.,
.
feat(parser): ... - ! (optional): Indicates a breaking change and can appear after type or scope.
- description (required): Short, imperative summary in lower case (no trailing period). Aim for ≤ 72 characters.
- body (optional): Explain what/why; wrap at ~72 characters.
- footers (optional): Git trailer format, e.g., ,
BREAKING CHANGE: ...,Refs: #123.Closes: #123
Workflow
- Review changes and identify the primary intent (feature, fix, docs, etc.).
- Choose the and optional
type. If changes span multiple intents, prefer separate commits; otherwise pick the highest-impact type.scope - Determine whether the change is breaking. If yes, add and/or a
!footer.BREAKING CHANGE: - Write a concise description in imperative mood.
- Add body and footers as needed for context, rationale, or issue links.
- Validate against the checklist below.
Checklist
- Header matches format.
<type>(<scope>): <description> - Type is correct for the change (/
featfor user-facing behavior).fix - Description is imperative, ≤ 72 chars, and has no trailing period.
- Breaking changes are marked with and/or
!.BREAKING CHANGE: - Footers follow format.
Token: value
Examples
feat(auth): add refresh token rotationfix(api): handle empty payloadsdocs: add migration guiderefactor(ui): extract button variantsperf(db): batch writes to reduce roundtripschore(deps): bump eslint to 9.0.0
Breaking change:
text
feat(api)!: drop deprecated v1 endpoints
BREAKING CHANGE: v1 endpoints were removed. Use /v2 instead.Revert:
text
revert: feat(auth): add refresh token rotation
This reverts commit 1234abcd.Tips
- Use scopes for packages or subsystems (e.g., ,
api,ui).cli - Avoid mixing unrelated changes in a single commit.
- Use or
stylefor formatting-only changes.chore - Use or
cifor pipeline and dependency changes.build - Use for changes limited to tests.
test