← ClaudeAtlas

git-remote-helperlisted

Git 多远程 parity 检测与 push 验证的共享基础设施。 内部工具, 仅供其他 skills 引用。提供标准化 Bash/Python 执行脚本段 + 输出 JSON schema 契约。
10CG/aria-plugin · ★ 1 · Code & Development · score 68
Install: claude install-skill 10CG/aria-plugin
# git-remote-helper ## 用途 `git-remote-helper` 是一个 **internal skill**, 不直接被用户触发。它为以下消费方提供标准化的 Git 多远程 parity 检测与 push 验证逻辑: - `state-scanner` Phase 1.12: 检测多远程 parity 漂移 - `phase-c-integrator` C.2.5: 合并后强制推送所有配置远程 + post-push SHA 验证 **交付形式**: helper 不是"可调用函数", 而是 SKILL.md 中的指令块 + JSON schema 契约。消费方通过引用本 SKILL.md, 让 LLM 执行标准化的 Bash/Python 脚本段并产出约定的 JSON。 ## 依赖声明 | 工具 | 必须/可选 | 说明 | |------|---------|------| | `jq` | 必须 | JSON 构造 (`jq -n --arg ... --argjson ...`), 禁止 Bash 手工拼接 | | `python3` | 必须 | `verify_post_push.py` 实现 + ls_remote 超时 fallback | | `timeout` | 可选 | Linux 原生, 缺失时降级 `gtimeout` 或 Python wrapper | | `gtimeout` | 可选 | macOS GNU coreutils (`brew install coreutils`), 见 `references/platform-notes.md` | 安装 jq: - Linux: `apt-get install jq` / `yum install jq` - macOS: `brew install jq` ## 写/读权限分离 | 指令块 | 权限 | 允许的消费方 | |--------|------|------------| | `check_parity` | **纯读** — 不修改任何 ref, 无网络写操作 | 任何 skill (state-scanner / phase-c-integrator / 未来消费方) | | `verify_parity_post_push` | **纯读** — 仅 `git ls-remote` 查询 | 任何 skill | | `push_all_remotes` | **写** — 执行 `git push`, 修改远程 ref | 仅 `phase-c-integrator` / `branch-manager` 等明确具有推送权限的 skill | ## 指令块概览 ### 1. `check_parity` (纯读) 检测单个仓库所有远程的 parity 状态, 不做网络写操作。 **脚本**: `scripts/check_parity.sh` **调用示例**: ```bash bash aria/skills/git-remote-helper/scripts/check_parity.sh \ --repo=/home/dev/Aria/aria \ --branch=master \ --verify-mode=local_refs \ --timeout=15 # v1.15.1 默认 (适配 Forgejo SSH over CF Access) ```