Enforces Conventional Commits format when creating git commits. Use this skill whenever you need to create a commit message. Triggers on "commit", "git commit", "コミット", "変更をコミット".
Resources
1Install
npx skillscat add hrdtbs/agent-skills/commit Install via the SkillsCat registry.
SKILL.md
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 -10Common 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 endpointOr 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 instructionsWith Scope
feat(auth): implement OAuth2 login
fix(api): handle null response from server
refactor(utils): simplify date formatting logicWith 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