com um clique
git-commit
// 遵循 Angular 规范生成 git commit 消息。在用户请求创建 commit、写 commit message 或暂存并提交时使用。典型场景:改完代码要提交前、或要求按 Angular 规范写 message 时。
// 遵循 Angular 规范生成 git commit 消息。在用户请求创建 commit、写 commit message 或暂存并提交时使用。典型场景:改完代码要提交前、或要求按 Angular 规范写 message 时。
运行提交前检查:代码格式化验证、静态检查和单元测试。在准备提交代码、检查代码质量或验证修改是否通过时使用。
分析 CI 失败原因并给出修复建议。在用户提到 CI 失败、pipeline 失败、构建失败、测试失败时使用。典型场景:PR 合前 CI 红、需要根因与修复建议时。
运行代码生成并检查变更。在修改 API 规范(api-specs/ YAML)或 sandbox OpenAPI/protobuf 后使用。
分析 GitHub issues、PRs 与 discussions,提供见解或实施指导。在用户提供 GitHub URL、issue/PR 编号或询问仓库内容时使用。典型场景:看 issue/PR 状态、拉 diff 与 checks、要结论与建议下一步时。
检查发布版本号是否在三处保持一致(conf/conf.go、CHANGELOG.md、README.md)。在准备发布新版本时使用。
| name | git-commit |
| description | 遵循 Angular 规范生成 git commit 消息。在用户请求创建 commit、写 commit message 或暂存并提交时使用。典型场景:改完代码要提交前、或要求按 Angular 规范写 message 时。 |
| argument-hint | <附加上下文(可选)> [push=true] |
| allowed-tools | ["Bash(git add:*)","Bash(git branch:*)","Bash(git commit:*)","Bash(git diff:*)","Bash(git log:*)","Bash(git status:*)","Bash(git push:*)"] |
开始时声明:"我正在使用 git-commit skill 生成并提交规范化 commit。"
status/diff/log,确认提交范围与语言风格。git commit。# 基本提交
git-commit 修复上传逻辑
# 提交并 push
git-commit push=true
git status --short
git diff HEAD
git branch --show-current
git log --oneline -10
Header:<type>(<scope>): <summary>
Type:
feat 新功能fix 缺陷修复docs 文档改动refactor 重构perf 性能优化test 测试相关chore 杂项维护style 代码格式调整Scope 建议值(本项目常用):
storage / storagev2 / auth / cdn / pili / rtc / sms / linking / qvsiam / media / audit / sandboxclient / conf / reqidinternal / examplesSummary 规则:祈使句、现在时、首字母小写、不加句号。
Body 规则:
docs 可省略,其他类型建议必须有docs 类型时,body 至少 20 个字符Footer(按需):
BREAKING CHANGE: ...Fixes #123 / Closes #456git add(按文件名添加,避免 git add -A)。git commit。git pushgit push -u origin <current-branch>提交代码前提醒用户确认已通过:
make unittest — 单元测试make staticcheck — 静态检查gofmt -s -w . — 代码格式化如果是生成代码相关修改,还需确认已运行 make generate。
--no-verify 跳过 hooks已提交: <commit-hash>
标题: <type(scope): summary>
分支: <branch>
Push: 成功/失败/未执行
git status 结果,提示无可提交内容。git commit 失败(hook 报错):输出完整报错,建议修复后重试,不跳过 hook。git push 失败(远端冲突):输出报错,建议先 pull/rebase 再重试。执行本 skill 时同时遵守 AGENTS.md 中的系统规范;与本 skill 冲突时以本 skill 为准。