git-commit
按 GitLab TBID 强制校验规范提交 Git 变更并在对话中总结。提交信息必须以 [TBID:项目ID-任务编号] 开头。用户说「提交」「提交并总结」「帮我 commit」时使用;不写 .cursor/commit-summary 文件。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
按 GitLab TBID 强制校验规范提交 Git 变更并在对话中总结。提交信息必须以 [TBID:项目ID-任务编号] 开头。用户说「提交」「提交并总结」「帮我 commit」时使用;不写 .cursor/commit-summary 文件。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
按用户指定目录扫描并翻译页面标题(navigationBarTitleText、SpPage title、setNavigationBarTitle)。用户说「翻译页面 title」「目录下 title 没翻译」「i18n page title」时触发。
按计划文件顺序逐文件完成 i18n(哈希键 + @/i18n 的 $t/ti,禁止页面使用 globalThis.$t),维护 subpages/i18n/locales 三语,并在对应 plan 中更新进度与统计。用户说「按计划做 i18n」「继续翻译 plans」时触发。
Summarize current code changes and optionally commit. Use when the user asks to summarize what changed, record changes, commit with a message, or "总结这次改了什么并提交"/"帮我 commit".
Use when analyzing a frontend codebase, onboarding into an existing project, or documenting stack, structure, configs, and coding conventions into .f2e-ai/handbook/.
Use when a requirement-id is ready for delivery and the next step is to summarize Git changes, write change-summary.md, commit, push, and prepare a PR.
Use when a requirement-id already has test.spec.ts and the next step is to run Playwright and persist the results in test-result.md.
| name | git-commit |
| description | 按 GitLab TBID 强制校验规范提交 Git 变更并在对话中总结。提交信息必须以 [TBID:项目ID-任务编号] 开头。用户说「提交」「提交并总结」「帮我 commit」时使用;不写 .cursor/commit-summary 文件。 |
2026 年 6 月 12 日起,GitLab 仓库开启 Commit Message 强制校验:所有提交必须包含 [TBID:项目ID-任务编号],否则推送将被拒绝。
[TBID:项目ID-任务编号] <提交类型> <问题/功能简述>
类型后可加冒号(如 feat:),与不加冒号(如 fix )均可;推荐统一为 type: 后接简述。
正确示例:
[TBID:PROJ-1001] fix 解决用户登录超时问题
[TBID:PROJ-1002] feat: 新增用户注册验证码功能
[TBID:WA-641] style: 赠品缩进改为固定 20px
[TBID:项目ID-任务编号],关联 Teambition 任务[TBID:ECX-8754]、[TBID:WA-641]、[TBID:LAXZE-7377]| type | 说明 |
|---|---|
feat | 新功能、新特性 |
fix | 修改 bug |
perf | 性能优化(不改变代码行为) |
refactor | 代码重构(不改变行为与功能) |
docs | 文档修改 |
style | 代码格式修改(非 CSS;删多余行、缩进等) |
test | 测试用例新增、修改 |
build | 影响构建或依赖(如 pom 依赖) |
revert | 恢复上一次提交 |
ci | CI 相关(Dockerfile 等) |
chore | 其他(不在上述类型中) |
release | 发布新版本 |
workflow | 工作流相关文件修改 |
用户指定 type 时以用户为准。
git status -sb
git diff --stat
git diff
若有 staged 变更,再执行 git diff --cached。
用中文简要说明:
禁止创建或更新 .cursor/commit-summary/ 下任何 md 文件。
发现不合理代码时:只指出问题与建议,不得擅自修改;先询问用户是否需要一并处理,待确认后再动代码。
| 用户意图 | 动作 |
|---|---|
| 仅「总结」「看看改了啥」 | 只输出总结,不 git add / git commit |
| 「并提交」「直接 commit」 | 继续步骤 4 |
.env、密钥等勿加入暂存,并提醒用户git commit -m "$(cat <<'EOF'
[TBID:项目ID-任务编号] type: 问题/功能简述
EOF
)"
推送被拦截或发现 message 不符合规范时:
git commit --amend -m "[TBID:XXXX-123] fix: 正确描述"
git rebase -i HEAD~N
将需修改的提交前的 pick 改为 reword,保存后依次修改每条 message。
交互式 rebase 需用户确认;Agent 仅在用户明确要求修正历史提交信息时执行,且不使用
-i以外的 destructive 操作。
git log --oneline origin/<分支名>..HEAD
--no-verify 等),除非用户明确要求--amend / rebase -i reword:仅用于修正 commit message(TBID 规范),且符合用户 amend 规则(HEAD 为自己创建、未 push 等)用户:提交 WA-641,赠品缩进改 20px
Agent:
git commit -m "[TBID:WA-641] style: 赠品缩进改为固定 20px"515c73472用户:推送被拒,上次 commit 没写 TBID
Agent:
git commit --amend -m "[TBID:WA-641] style: 赠品缩进改为固定 20px"用户:先总结我改了啥
Agent:只输出 diff 总结,不 commit,并问是否需要提交及 TBID。