Stats
Actions
Tags
From commit
基于已暂存的变更生成标准化的 git commit message,包含 gitmoji、type/scope、subject/body/footer 规则,以及可选的 commit/push 流程。当用户要求提交信息建议或需要根据 git diff/staged 生成严格格式时使用。
How this skill is triggered — by the user, by Claude, or both
Slash command
/commit:commitThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
- `assets/commit-message-template.md`:提交信息模板与示例
assets/commit-message-template.md:提交信息模板与示例$ARGUMENTS[type] [scope] [subject]type),其余字段自动推断并让用户确认获取改动信息(仅暂存区,先轻后重):
git status --short、git diff --staged --stat、git diff --staged --name-only、git config user.name、git config user.email、git config --local claude.commit.langgit diff --staged 全量内容。分析改动:
feat, fix, refactor, perf, docs, style, test, build, chore, ci。scope,多模块省略 scope。git config --local claude.commit.lang;若未配置,则基于项目变更内容与项目文档主语言联合推断。生成 Commit Message(按改动复杂度自适应生成候选版本数(1-3个)):
<gitmoji> <type>(<scope>): <subject>(多模块省略 scope)。BREAKING CHANGE/Refs/Closes 存在事实差异时允许不同。BREAKING CHANGE: <desc>、Refs: #123、Closes: #456🤖 Generated with <tool> (<model>)Co-Authored-By: <AI tool> <email>Signed-off-by: Name <email>(若 git config 缺失则省略)输出与交互:
y 提交推荐版本 / e 编辑 / n 取消。y 后不再二次确认,直接执行 commit。提交与推送:
y)后直接使用已展示的完整 message 提交。git commit -F <file> 写入完整多行 commit message(避免多行被 -m 压缩),展示 commit hash。git branch --show-current 显示分支并询问是否 git push。e 进入交互式编辑 subject/body 后重新生成;Footer 按规则自动重算并保持结构不变。type/scope/subject)> 当前对话上下文--stat + --name-only,不确定时再读取 git diff --staged 全量-F 保留多行结构git config --local claude.commit.lang;若未配置,则按项目变更内容 + README/文档主语言联合推断,最后英文兜底BREAKING CHANGE 规则)Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub heminwon/claude-code-marketplace --plugin commit