/install gitcommit
Git Commit Message Generator
Generate conventional commit messages with automatic language style detection.
Commit Format
\x3Ctype>[optional scope]: \x3Cdescription>
[optional body]
[optional footer(s)]
Types: feat fix docs style refactor perf test build ci chore revert
Rules:
- Type: lowercase English
- Description: \x3C72 chars, imperative mood, no period
- Body: explain what/why, not how
Content Requirements:
- Concise: Summarize clearly, no redundant words
- Complete: Don't omit important changes
- Numbered: Multiple changes use
1. 2. 3.format - Specific: Must clearly indicate which modules/files were modified
Module Reference Format:
- For each change, specify the affected module or file
- Format:
\x3CAction> \x3Cmodule/file> - Example:
Fix bug in UserService,Update Button component
Language Detection
Auto-detect by checking recent commits:
git log -10 --oneline
Detection Logic:
- If recent commits contain Chinese characters → Use Chinese
- If unable to determine → Default to Chinese
| Style | Format Example |
|---|---|
| English | feat(api): add user authentication endpoint |
| Chinese | feat(用户管理): 添加登录功能 |
Language Rules:
- Type: Always English (
feat,fix,refactor) - Scope: Follow project style (English/Chinese)
- Description/Body: Chinese by default, or match project language
Workflow
1. Parallel Analysis (single response)
git status
git diff --staged
git log -10 --oneline
2. Smart Type Inference
| Pattern | Type |
|---|---|
*.test.*, *.spec.*, __tests__/ |
test |
package.json, *.lock |
build |
.github/, *.yml (CI) |
ci |
*.md, docs/, README* |
docs |
| Only whitespace changes | style |
| Keywords: fix/bug/resolve | fix |
| Keywords: add/implement/create | feat |
| Keywords: refactor/extract | refactor |
| Keywords: optimize/cache/performance | perf |
3. Scope Inference
Extract from file paths:
src/api/user/*→(api)or(user)src/components/Button/*→(Button)src/views/目标管理/*→(目标管理)
4. Present & Confirm
Show the generated message and await user approval before committing.
Examples
English
feat(api): add user authentication endpoint
1. Implement JWT-based authentication in AuthService for login/logout.
2. Add token refresh mechanism and session management in TokenManager.
3. Update routes/auth.ts with authentication middleware.
Closes #123
Chinese
feat(用户管理): 添加登录功能
1. AuthService实现基于JWT的用户认证,支持登录和登出。
2. TokenManager添加令牌刷新机制和会话管理。
3. routes/auth.ts更新API路由增加认证中间件。
关联 #123
Multi-Module Example
fix: resolve null pointer and update UI
1. UserService修复空指针异常,添加用户数据验证。
2. components/UserList.vue更新列表渲染逻辑。
3. utils/validator.ts添加空值检查工具函数。
关联 #456
Git Safety
- NEVER use
--no-verifyunless explicitly requested - NEVER amend commits - create NEW commits
- NEVER force push without explicit request
- ALWAYS use HEREDOC for commit messages
- Prefer
git add \x3Cfiles>overgit add .
Commit Command
git commit -m "$(cat \x3C\x3C'EOF'
\x3Ccommit message>
Co-Authored-By: Claude code \[email protected]>
EOF
)"
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install gitcommit - After installation, invoke the skill by name or use
/gitcommit - Provide required inputs per the skill's parameter spec and get structured output
What is git commit skill?
Generate precise git commit messages following Conventional Commits with auto language detection, scope inference, and multi-module support. It is an AI Agent Skill for Claude Code / OpenClaw, with 158 downloads so far.
How do I install git commit skill?
Run "/install gitcommit" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is git commit skill free?
Yes, git commit skill is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does git commit skill support?
git commit skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created git commit skill?
It is built and maintained by Kk_xx (@wlykan); the current version is v1.0.0.