commit-smart
分析已暂存/未暂存的变更,创建语义化的约定式提交,并说明变更原因(WHY),而不仅是变更内容(WHAT)。从差异中自动识别提交类型和范围。支持可选的类型/范围参数。用法——/commit-smart、/commit-smart fix、/commit-smart refactor api
机器翻译查看英文原文
Analyze staged/unstaged changes and create semantic conventional commits with context about WHY, not just WHAT. Auto-detects commit type and scope from the diff. Supports optional type/scope arguments. Usage - /commit-smart, /commit-smart fix, /commit-smart refactor api
适用对象:软件开发与测试。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看英文原文
原文涵盖的主题
- Smart Commit
- Workflow
- Step 1: Assess the working tree
- Step 2: Handle unstaged changes
- Step 3: Analyze the diff
- Step 4: Check for user overrides
- Step 5: Compose the commit message
- Step 6: Confirm and commit
Create meaningful conventional commits by analyzing your actual changes. Run these commands to understand the current state: If nothing is staged (git diff --cached is empty): 1. Show the user what files have changed 2. Suggest what to stage based on logical grouping (e.g., "these 3 files are all related to the auth refactor") 3. Ask if they want to stage all, or select specific files 4. Stage the approved files with git add If changes are already staged, proceed to analysis. Read the full staged diff: Determine the commit type from the changes: | Signal | Type | |--------|------| | New files with new functionality | feat | | New test files or test additions | test | | Changes to existing logic fixing incorrect behavior | fix | | Structural changes without behavior change | refactor | | package.json, tsconfig, CI config changes | chore | | Build/bundler config changes | build | | README, docs, comments only | docs | | Formatting, whitespace, semicolons only | style | | Performance improvements | perf | Determine the scope from the primary directory or module affected: src/api/ -> api src/components/auth/ -> auth tests/ -> tests Root config files -> omit scope Multiple unrelated are
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- davila7/claude-code-templates
- 源文件
- cli-tool/components/skills/git/commit-smart/SKILL.md
- 固定版本
- 21be197f100a12b8d0dd9a211cc244c8179f84d3
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:davila7/claude-code-templates · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T15:01:39.492Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
MIT。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。