AgentSkillsCN

aide-sync

同步分支与远程仓库,并验证会话结束时的状态是否干净无误。当用户输入 `/sync` 或请求“安全着陆”时使用。执行 `git pull --rebase` 和 `git push`,并确认状态干净且最新。除非明确指定 `-AllowMain` 参数,否则拒绝在主分支上运行此操作。

SKILL.md
--- frontmatter
name: aide-sync
description: Sync branch with remote and verify a clean end-of-session state. Use when the user types /sync or asks to "land the plane". Runs git pull --rebase, git push, and verifies status is clean and up to date. Refuses to run on main unless -AllowMain is provided.

AIDE Sync

Overview

Standardize the end-of-session workflow: update, push, and confirm nothing is left unpushed.

Workflow

Inputs

  • Optional -DryRun to print actions only.
  • Optional -AllowMain to permit syncing on main.

Actions

  1. Confirm current branch is not main.
  2. Confirm working tree is clean (or warn and stop).
  3. Run git pull --rebase.
  4. Run git push.
  5. Run git status -sb and confirm branch is up to date.

Output

  • A short summary including the final git status -sb.

Notes

  • If git pull --rebase fails, stop and request help (do not force).