Commit Msg — Git skill for Claude Code
生成 Git Commit Message.
How to install Commit Msg
Installs to ~/.claude/commands/doccker-cc-use-exp-commit-msg.md
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/doccker/cc-use-exp/HEAD/.claude/commands/commit-msg.md -o ~/.claude/commands/doccker-cc-use-exp-commit-msg.md Restart Claude Code, or start a new session, for it to be picked up.
What Commit Msg does
生成 Git Commit Message
分析未提交的代码变更,生成结构化的 commit message。
执行步骤
1. 获取变更内容
# 查看已暂存的变更
git diff --cached --stat
git diff --cached
# 如果没有暂存内容,查看所有变更
git diff --stat
git diff
2. 分析变更类型
根据变更内容判断类型:
| 类型 | 适用场景 |
|---|---|
| feat | 新功能 |
| fix | 修复 bug |
| refactor | 重构(不改变功能) |
| style | 格式调整(不影响代码逻辑) |
| docs | 文档更新 |
| test | 测试相关 |
| chore | 构建、依赖、配置等 |
3. 生成 commit message
格式要求:
:
规则:
- subject: 简洁描述,不超过 50 字符,中文
- body
Alternatives in Git
- Commit Commands — Git commit workflows: commit, push, and PR creation 14k ★
- Gen Commit Msg — Generate intelligent commit messages based on staged changes 5.7k ★
- Commit Compact — Create a git commit 2k ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
Msg
Suggest a commit message for the current staged changes. Do not commit. Do not stage. Do not run any git write
Merge Commit Msg
Generate a structured merge commit message from PR changes
Git Hooks Setup
Set up pre-commit, pre-push, and commit-msg hooks
Rc Commit Msg
Gera uma mensagem de commit convencional a partir do diff staged (não faz commit).
Husky
by evmts - Sets up and manages Husky Git hooks by configuring pre-commit hooks, establishing commit message st
GitCommit
You are a commit message generator. Read the provided git diff and write a concise imperative commit message.
Related Agents
Commit Craft
Expert at creating clean, logical git commits following conventional commit format. Use when user requests git
Git Hygiene Reviewer
Reviews the shape of the history and the PR meta, never the code. Atomic conventional commits, linear bisectab
Commit Analyzer
Analyzes git changes and generates commit messages. Returns only the message to preserve main thread context.