/commit-msg
分析未提交的代码变更,生成结构化的 commit message。
> /plugin marketplace add doccker/cc-use-exp > /plugin install cc-use-exp@cc-use-exp
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/commit-msg
Context preview
What this command does when you run it.
分析未提交的代码变更,生成结构化的 commit message。
Command definition
commit-msg.md生成 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
格式要求:
<type>: <subject> <body>
规则:
- subject: 简洁描述,不超过 50 字符,中文
- body: 变更详情,用列表形式,中文
- 不要加 emoji
- 不要加 AI 生成声明
- 不要加 Co-Authored-By
4. 输出格式
## 建议的 Commit Message --- <type>: <subject> - <变更点1> - <变更点2> - <变更点3> --- ## 变更文件 | 文件 | 变更类型 | 说明 | |------|---------|------| | file1 | 新增/修改/删除 | 简要说明 | ## 快速提交 复制以下命令手动执行(不要由 Claude Code 代执行): git add <文件列表> && git commit -m "<生成的message>"
---
参数说明:
- 无参数:分析已暂存的变更
- `$ARGUMENTS` 包含 "all":分析所有变更(含未暂存)
保留你熟悉的 CLI/IDE,让 Claude Code、Gemini CLI、Codex、Cursor、GitHub Copilot 开箱即用 按费力度从低到高,用最少操作获得最大帮助 不是提示词集合,而是一套可维护的 AI 协作配置系统。
Repo: doccker/cc-use-exp
Other commands on cc-use-exp.
- /cache-patch
**参数说明**:`$ARGUMENTS` 由 Claude Code 自动传递,对应用户输入的参数部分(如 `/cache-patch status` 中的 `status`)。
Open command - /check-toolsearch
检查 ToolSearch(WebSearch)是否可用
Open command - /design
技术设计(doc 文档框架 / checklist 质量检查)
Open command - /fix
问题修复(fix 快速修复 / debug 系统化调试)
Open command - /new-feature
新功能全流程(需求审问 → 设计 → 实现)
Open command - /optimize
系统优化扫描(full/ux/perf/code 四种模式)
Open command

