← Back to Skills Marketplace
wlykan

git commit skill

by Kk_xx · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
158
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install gitcommit
Description
Generate precise git commit messages following Conventional Commits with auto language detection, scope inference, and multi-module support.
README (SKILL.md)

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:

  1. If recent commits contain Chinese characters → Use Chinese
  2. 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-verify unless explicitly requested
  • NEVER amend commits - create NEW commits
  • NEVER force push without explicit request
  • ALWAYS use HEREDOC for commit messages
  • Prefer git add \x3Cfiles> over git add .

Commit Command

git commit -m "$(cat \x3C\x3C'EOF'
\x3Ccommit message>

Co-Authored-By: Claude code \[email protected]>
EOF
)"
Usage Guidance
This skill appears to do what it says: inspect the repository and generate Conventional Commit messages. Before installing or using it: (1) Confirm you are OK with the default language behavior — the skill falls back to Chinese if it can't detect language. (2) Remove or change the example Co-Authored-By line if you do not want an automatic attribution added to your commits. (3) Test the skill in a disposable/local repo first to verify the exact commit commands it runs. (4) If you do not want automatic commits, keep agent autonomous invocation disabled or ensure the skill respects the 'await user approval' step.
Capability Analysis
Type: OpenClaw Skill Name: gitcommit Version: 1.0.0 The git-commit skill is designed to automate the generation of Conventional Commit messages by analyzing git diffs and logs. It includes explicit safety constraints in SKILL.md, such as forbidding force pushes and the use of the --no-verify flag, and employs safe shell practices like HEREDOC for commit message construction to prevent injection. The behavior is entirely consistent with its stated purpose.
Capability Assessment
Purpose & Capability
Name/description line up with the runtime instructions: the skill inspects git status/diff/log and generates Conventional Commit messages. The requirement to analyze repo files and git history is expected. Unusual but not breaking: it defaults to Chinese when language cannot be detected and mandates including a Co-Authored-By line (Claude code <[email protected]>) in every commit message by example — this is not necessary for core functionality and is unexpected.
Instruction Scope
SKILL.md limits actions to git commands (git status, git diff --staged, git log) and message generation, and instructs to present results for user approval before committing. It does not ask to read unrelated system files or environment variables. The notable scope creep is the built-in policy to always use a HEREDOC and to include a Co-Authored-By attribution in the commit message by default; that is a behavioral choice (affects commit content) rather than an external data exfiltration step, but you should verify you want that attribution inserted.
Install Mechanism
Instruction-only skill with no install spec and no code files — lowest-risk installation footprint (nothing is written to disk by an installer).
Credentials
The skill requests no environment variables, no credentials, and no config paths. It only reads repository-local git state (diffs/logs) which is appropriate for commit message generation.
Persistence & Privilege
Skill is not always-enabled and does not request system-wide persistence. It does, however, include instructions to create new commits (and a sample commit command that injects a Co-Authored-By line). If the agent is allowed to invoke skills autonomously, it could create commits; ensure autonomy settings and the SKILL.md's 'await user approval' step are enforced to avoid unexpected commits.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install gitcommit
  3. After installation, invoke the skill by name or use /gitcommit
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of git-commit skill - Generate git commit messages following the Conventional Commits specification. - Automatically detects project language (Chinese/English) from recent commits and adapts message format. - Supports both automatic diff analysis and interactive guided commit message generation. - Enforces best practices: clear type, scope, specific module/file references, numbered multi-change summaries. - Ensures safe commit workflow (no amend/force push unless requested, uses HEREDOC, never --no-verify by default). - Smart commit type and scope inference from file patterns and paths.
Metadata
Slug gitcommit
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

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.

💬 Comments