commit
SKILL.md
Commit — 快速 Git 提交
创建 git commit,支持指定 message 或自动生成。
当前仓库状态
!`git status`
暂存区 Diff
!`git diff --staged`
Steps
- 根据上方
git status输出判断:- 若无 staged 改动 → 提示用户先
git add,立即结束
- 若无 staged 改动 → 提示用户先
- 根据上方
git diff --staged输出生成 commit message(纯推理,不调用任何命令):- 若提供了
$ARGUMENTS→ 直接使用 - 否则 → 分析 diff 生成符合 Conventional Commits 的 message
- 若提供了
- 必须调用 Bash 工具执行:
git commit -m "<message>"(禁止模拟输出) - 必须调用 Bash 工具执行:
git show --stat --pretty=format:"✓ Committed: %s (%h)" -1,将真实输出展示给用户
Commit Message 格式
格式:<type>[optional scope]: <description>
常用 type:
feat— 新功能(触发 minor 版本)fix— Bug 修复(触发 patch 版本)docs— 文档变更style— 代码格式(不影响逻辑)refactor— 重构(非 feat/fix)perf— 性能优化test— 测试相关build— 构建系统/依赖ci— CI 配置chore— 其他杂项revert— 回滚
规则:
- 简洁但有描述性,第一行不超过 72 字符
- scope 可选:
feat(auth): add OAuth2 login - 破坏性变更:type 后加
!或 footer 写BREAKING CHANGE: <描述>
示例:
feat: add user authentication with JWTfix(api): handle null response from upstreamfeat!: remove deprecated /v1/users endpoint
输出
直接展示 Step 4 的 Bash 真实输出,不得手动拼接或模拟。
Weekly Installs
14
Repository
jssfy/k-skillsGitHub Stars
1
First Seen
4 days ago
Security Audits
Installed on
claude-code14
gemini-cli13
github-copilot13
codex13
kimi-cli13
cursor13