commit
16
总安装量
15
周安装量
#21752
全站排名
安装命令
npx skills add https://github.com/hrdtbs/agent-skills --skill commit
Agent 安装分布
gemini-cli
15
github-copilot
15
codex
15
cursor
15
opencode
14
antigravity
14
Skill 文档
Conventional Commit
Enforces Conventional Commits format for all git commit messages. This skill applies to both AI agents and human users.
Commit Message Format
<type>[optional scope][optional !]: <description>
[optional body]
[optional footer(s)]
Types (Required)
| Type | Description |
|---|---|
feat |
A new feature |
fix |
A bug fix |
docs |
Documentation only changes |
style |
Changes that do not affect the meaning of the code (white-space, formatting, etc.) |
refactor |
A code change that neither fixes a bug nor adds a feature |
perf |
A code change that improves performance |
test |
Adding missing tests or correcting existing tests |
build |
Changes that affect the build system or external dependencies |
ci |
Changes to CI configuration files and scripts |
chore |
Other changes that don’t modify src or test files |
revert |
Reverts a previous commit |
Scope (Optional)
Scope provides additional context. Determine scope by checking recent commits:
git log --oneline -10
Common scope patterns:
- Feature/module name:
feat(auth):,fix(api): - File/directory:
docs(readme):,refactor(utils): - Component:
style(button):,test(login):
Breaking Changes
Add ! before the colon for breaking changes:
feat(api)!: change authentication endpoint
Or add BREAKING CHANGE: in the footer.
Examples
Basic (No Scope)
feat: add user registration form
fix: resolve memory leak in event handler
docs: update installation instructions
With Scope
feat(auth): implement OAuth2 login
fix(api): handle null response from server
refactor(utils): simplify date formatting logic
With Body (Japanese)
feat(æ¤ç´¢): å
¨ææ¤ç´¢æ©è½ã追å
Elasticsearchã使ç¨ããå
¨ææ¤ç´¢æ©è½ãå®è£
ã
æ¥æ¬èªå½¢æ
ç´ è§£æã«ã¯kuromojiã使ç¨ã
Breaking Change
feat(api)!: change response format to JSON:API
BREAKING CHANGE: API responses now follow JSON:API specification.
Clients need to update their response parsers.
Validation
To validate a commit message before committing:
bash /mnt/skills/user/conventional-commit/scripts/validate-commit.sh "feat: add new feature"
For AI Agents
When creating commits:
- Always use Conventional Commits format
- Check recent commits for scope patterns:
git log --oneline -10 - Use the appropriate type based on the change
- Do NOT use emojis in commit messages
- Write clear, concise descriptions
- Add body for complex changes
- Mark breaking changes with
!orBREAKING CHANGE:
Language
- Use the same language as the codebase or user’s preference
- Japanese descriptions are fully supported
- Keep type prefixes in English (feat, fix, etc.)
Git Hooks (Optional)
To enforce validation via git hooks, add to .git/hooks/commit-msg:
#!/bin/bash
bash /mnt/skills/user/conventional-commit/scripts/validate-commit.sh "$(cat $1)" || exit 1