From cc-best
Executes Git commit workflow following Conventional Commits: checks status and diffs, stages files, generates message, commits changes.
npx claudepluginhub xiaobei930/cc-best --plugin cc-best# /commit - Git 提交 执行 Git 提交操作,遵循 Conventional Commits 规范。 ## 提交流程 ## Conventional Commits 规范 ### 类型前缀 | 类型 | 说明 | 示例 | | ---------- | --------- | ---------------------------- | | `feat` | 新功能 | `feat: 添加用户登录功能` | | `fix` | Bug 修复 | `fix: 修复音频播放崩溃问题` | | `docs` | 文档更新 | `docs: 更新 API 文档` | | `style` | 代码格式 | `style: 格式化代码` | | `refactor` | 重构 | `refactor: 重构音频处理模块` | | `test` | 测试 | `test: 添加用户服务单元测试` | | `chore` | 构建/工具 | `chore: 更新依赖版本` | | `perf` | 性能优化 | `perf: 优化图片加载速度` ...
/commitAnalyzes git changes to generate conventional commit messages, stages files appropriately, runs pre-commit checks like linting and tests, and creates atomic commits.
/commitStages unstaged changes based on git status and diff analysis, then creates a commit with a generated message. Uses current branch and recent commit history for context.
/commitStages changes and commits locally using Conventional Commits format. Analyzes git status/diffs, drafts typed message with scope, confirms with user before git add and commit.
/commitCreates well-formatted git commits with conventional messages and emojis. Runs pre-commit checks (lint/format/build/docs), auto-stages files if needed, analyzes diffs, and suggests splitting multi-change commits unless --no-verify.
/commitCreates well-formatted git commits with conventional messages and emojis. Runs pre-commit checks (lint/format/build/docs), auto-stages files if needed, analyzes diffs, and suggests splitting multi-change commits unless --no-verify.
/commitRuns pre-commit git checks, quality gates (lint, typecheck, tests), code review for issues; drafts conventional commit message; stages specific files and commits. Supports --no-verify, --amend, --push options.
Share bugs, ideas, or general feedback.
执行 Git 提交操作,遵循 Conventional Commits 规范。
1. 检查状态
└─ git status 查看变更文件
└─ git diff 查看具体变更
2. 暂存文件
└─ git add <files>
3. 生成提交信息
└─ 分析变更内容
└─ 选择合适的类型前缀
└─ 编写简洁的描述
4. 执行提交
└─ git commit -m "type: description"
| 类型 | 说明 | 示例 |
|---|---|---|
feat | 新功能 | feat: 添加用户登录功能 |
fix | Bug 修复 | fix: 修复音频播放崩溃问题 |
docs | 文档更新 | docs: 更新 API 文档 |
style | 代码格式 | style: 格式化代码 |
refactor | 重构 | refactor: 重构音频处理模块 |
test | 测试 | test: 添加用户服务单元测试 |
chore | 构建/工具 | chore: 更新依赖版本 |
perf | 性能优化 | perf: 优化图片加载速度 |
<type>(<scope>): <subject>
[optional body]
[optional footer]
# 简单提交
git commit -m "feat: 添加语音识别功能"
# 带范围的提交
git commit -m "fix(auth): 修复 token 过期处理"
# 带详细说明的提交
git commit -m "$(cat <<'EOF'
feat(audio): 实现实时音频处理
- 添加 AudioProcessor 类
- 支持 PCM 和 WAV 格式
- 集成 FunASR 进行识别
Closes #123
EOF
)"
git push --forcegit reset --hard(已推送的提交)git commit --amend(已推送的提交)提交完成后根据当前状态决定下一步:
在 /iterate 模式中:
├─ 还有待办任务 → 更新 progress.md → 执行下一任务
├─ 所有任务完成 → /cc-best:checkpoint 保存检查点
└─ 上下文较长 → /cc-best:compact-context 压缩后继续
skills/git/SKILL.md记住: 好的提交是原子的、清晰的,每个提交只做一件事,message 说明"为什么"而非"做了什么"。