Skip to content
Skills Library
DevOps & cloud · Automation

t-push

/t-push

由 AI 基于 git diff 总结提交内容,使用脚本运行受影响区域 CI,通过后 git commit && git push。

Licence
Apache-2.0
Last repository change
23.10.2026

Assessment and security

96/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability21 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 23.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

由 AI 基于 git diff 总结提交内容,使用脚本运行受影响区域 CI,通过后 git commit && git push。

Original author description

由 AI 基于 git diff 总结提交内容,使用脚本运行受影响区域 CI,通过后 git commit && git push。

How it works

  1. Fixed Flow
  2. CI Rules
  3. Failure
Original SKILL.md headings · 40 lines, 197 words
SKILL.md preview
---
name: t-push
description: 由 AI 基于 git diff 总结提交内容,使用脚本运行受影响区域 CI,通过后 git commit && git push。
allowed-tools:
  - Bash
---

# Push with Local CI

运行时边界统一参考:`${CLAUDE_PLUGIN_ROOT}/protocols/runtime-boundaries.md`

提交前输入门禁、commit message 格式、调用模式和中断恢复统一参考 `${CLAUDE_PLUGIN_ROOT}/protocols/push-execution-contract.md`;执行脚本前读取。

## Fixed Flow

先由 AI 读取 `git status --short` 和必要的 `git diff`,识别本次变更涉及的源码文件。

在生成 commit message 和调用脚本前,AI 必须清理本次变更源码文件中的注释:本次 diff 新增的注释逐条对照"必须保留"类别,命中不了就删除;diff 未触及的存量注释只按禁止条款清理。判定标准以 `${CLAUDE_PLUGIN_ROOT}/protocols/code-comment-contract.md` 为准,清理范围只限本次变更文件,不做全仓历史清理。

清理后重新查看必要的 `git diff`,逐条确认剩余的 diff 新增注释都能指认所属的保留类别,再总结本次变更并生成简洁 commit message。commit message 必须来自 AI 对清理后实际变更的总结,不能由脚本根据目录名自动猜测。

然后为本次 `/t-push` 执行生成一个新的 session id(例如 `YYYYMMDD-HHMMSS` 或短 UUID),并调用脚本:

```bash
uv run ${CLAUDE_PLUGIN_ROOT}/scripts/push.py --ci-session "<本次 t-push session id>" --message "<AI 生成的 commit message>"
```

session 规则只说一次:同一次 `/t-push` 执行内(含 CI 失败后 AI 修复重跑)复用同一 session id;新的 `/t-push` 执行必须生成新 session id,避免复用上一次的区域通过缓存。

脚本负责:检测 backend/frontend/demo 变更范围并为受影响区域并发运行本地 CI(区域 CI 内容见下节);按 session 记录每个区域通过 CI 时的 diff 指纹,重跑时已通过且 diff 未变的区域直接跳过;CI 全部通过后执行 `git add -A`、`git commit` 和推送目标分支。无 diff 时仍核对并补推现有 commit。未提交变更需要 `--message`。

## CI Rules

- Backend 变更:`cargo clippy --fix --allow-dirty --allow-staged --all-targets --all-features -- -D warnings`、`cargo fmt --all`,再以不带 `--fix` 的 `cargo clippy --all-targets --all-features -- -D warnings` 终验。
- Frontend 变更:`npm run lint`、`npm run format:check`(不存在时跳过)、`npm run type-check`。
- Demo 变更:`npm run lint` 和 `npm run type-check`。
- Shopify 变更(项目根存在 `shopify.app.toml` 时,除 `demo/` 外的全部变更):按 `${CLAUDE_PLUGIN_ROOT}/guides/shopify/validation.md` 的 push 门禁执行,类型检查兼容 `typecheck` / `type-check` 且不能缺失;存在 Shopify 扩展配置时必须覆盖扩展构建。
- 无 backend/frontend/demo/shopify 变更时跳过本地 CI,直接进入 commit/push。

`--force-checks` 参数可忽略 session 缓存,强制重跑本次 diff 涉及的所有区域 CI。

## Failure

- 任一 CI 步骤失败:脚本停止且不 commit/push,并输出失败区域和步骤;AI 根据错误信息修复代码后,用同一 session id 重新运行脚本,直到通过。
- commit/push 失败:脚本停止并报告错误;按共享契约用同一 session 恢复本地 commit 并确认远端,不生成重复提交;代码变化时先重新验证和验收。

Versions

The database has no other skills named t-push.

Database snapshot: 13.11.2026 · package version b3617875dd0a (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90git-commit-push
    Commit and push repository changes safely. Use when user asks to commit, push, or verify and push current changes.
  • 92commit
    [Git] Use when asked to commit, stage and commit, or save changes. --push also pushes.
  • 96commit-and-push
    Creates atomic conventional git commits using git-agent and pushes changes to the remote repository. Use when the user asks to "commit and push", "commit with git-agent", or wants an atomic AI-generated commit followed by a push.
  • 100git-commit
    专业的 Git 提交信息生成与提交执行器。当用户说"提交"、"commit"、"帮我写提交信息"、 "git commit"、"写个 commit message"、"生成提交说明",或任何与 Git 提交相关的请求时触发。 也适用于用户完成代码修改后需要总结变更、审查 diff 并生成规范提交信息的场景。 即使未明确提及"提交"一词,只要用户完成了代码修改并希望记录变更,就应使用此技能。
  • 100git-commit
    Guide for Git commit messages and pushing code. Use when user says "commit", "push code", "push to git", "save changes to git", "git add and commit", "commit and push", or needs help writing commit messages following Conventional Commits.
  • 90git-commit-and-push
    通过 BK-CI 仓库约定安全执行本地提交与远端推送,例如根据当前变更生成一句简短提交内容、先展示给用户确认、确认后再 `git commit`,并默认推送到个人 fork 远端而不是主仓库。 当用户要求“帮我 commit / push / 提交并推送代码 / 发到远端”时优先使用。

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.