/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
)"
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install gitcommit - 安装完成后,直接呼叫该 Skill 的名称或使用
/gitcommit触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
git commit skill 是什么?
Generate precise git commit messages following Conventional Commits with auto language detection, scope inference, and multi-module support. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 158 次。
如何安装 git commit skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install gitcommit」即可一键安装,无需额外配置。
git commit skill 是免费的吗?
是的,git commit skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
git commit skill 支持哪些平台?
git commit skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 git commit skill?
由 Kk_xx(@wlykan)开发并维护,当前版本 v1.0.0。