ワンクリックで
git-remote-helper
Git 多远程 parity 检测与 push 验证的共享基础设施。 内部工具, 仅供其他 skills 引用。提供标准化 Bash/Python 执行脚本段 + 输出 JSON schema 契约。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Git 多远程 parity 检测与 push 验证的共享基础设施。 内部工具, 仅供其他 skills 引用。提供标准化 Bash/Python 执行脚本段 + 输出 JSON schema 契约。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | git-remote-helper |
| description | Git 多远程 parity 检测与 push 验证的共享基础设施。 内部工具, 仅供其他 skills 引用。提供标准化 Bash/Python 执行脚本段 + 输出 JSON schema 契约。 |
| user-invocable | false |
| disable-model-invocation | true |
| allowed-tools | Bash, Read |
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:
apt-get install jq / yum install jqbrew 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 |
check_parity (纯读)检测单个仓库所有远程的 parity 状态, 不做网络写操作。
脚本: scripts/check_parity.sh
调用示例:
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)
输出: canonical JSON, schema 见 references/schema.md
边界处理:
parity: unknown, reason: shallow_clonedetached_head: true, 用 HEAD SHA 比较各 remoteparity: unknown, reason: no_local_tracking_refreachable: false, reason: network_timeoutreachable: false, reason: auth_failedpush_all_remotes (写 — 仅授权 skill 调用)对单个仓库推送所有 (或白名单内的) remote, 记录 pre/post SHA 状态。
脚本: scripts/push_all_remotes.sh
调用示例:
bash aria/skills/git-remote-helper/scripts/push_all_remotes.sh \
--repo=/home/dev/Aria/aria \
--branch=master \
--remotes=origin,github
success 判定 (严格, 不依赖 "Everything up-to-date" 文本):
success = (exit_code == 0) AND (post_remote_head == pre_local_head)
输出: JSON 包含 pre_remote_head / post_remote_head / success 字段, 供消费方验证。
verify_parity_post_push (纯读, Python 实现)权威验证远程实际接收到推送, 应对 Forgejo/GitHub 10-30s 复制延迟。
脚本: scripts/verify_post_push.py
调用示例:
python3 aria/skills/git-remote-helper/scripts/verify_post_push.py \
--repo=/home/dev/Aria/aria \
--branch=master \
--expected-sha=19f2861a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9 \
--max-retries=3 \
--initial-backoff=2 \
--timeout=15 \
--remotes=origin,github
重试策略: 立即 + 2s + 4s + 8s = 4 次 attempt
per-remote 时间上界 (v1.15.1 默认): 4 × 15s (ls-remote) + 14s (sleep) = 74s
快速网络: 设 --timeout=5 回到 v1.15.0 的 34s 上界
| 文档 | 内容 |
|---|---|
references/api.md | 3 个指令块的完整调用契约 (参数 / 输出 / 错误枚举 / 调用示例) |
references/schema.md | canonical JSON schema 定义 (parity 枚举 / reason 枚举 / 字段清单) |
references/platform-notes.md | macOS/Linux 差异 / shallow clone / detached HEAD / jq 安装 |
Aria 项目级配置加载器(内部基础设施)。 查找、解析、验证 .aria/config.json 并合并默认值。 此 Skill 不直接触发,由其他 Skills 引用以读取项目配置。
项目状态扫描与智能工作流推荐,十步循环的统一入口。 收集项目状态、分析变更、推荐最佳工作流、引导用户确认执行。 使用场景:"查看项目当前状态"、"我要提交代码"、"开发新功能"
会话收尾 —— 在任意对话(含未走完十步循环的探索/调试/讨论 session)把"未交接成果" 固化为 handoff。**与十步循环正交平级的会话仪式**(非周期收尾): AI 先内省本对话出 未完成线程 + 待固化经验, 再用机械 autofill 交叉核验补漏, 写 docs/handoff/。leaf — 终结于写交接, 不拖入十步循环。 使用场景: "对话收尾" / "执行对话收尾" / "会话收尾" / "session closeout" / "收尾这次对话" / "写交接" / "写 handoff" / "收工" / "结束本次对话" / context 快满时主动收尾。 不适用 (用 phase-d-closer): "Phase D" / "周期收尾" / "归档 Spec" / "更新 cycle 进度" —— 那是开发周期收尾, 不是会话收尾。
任务到 Agent 的智能路由器,根据任务类型、文件路径自动选择最合适的 Agent。 使用场景:subagent-driver 需要为任务选择 Agent、不确定应该使用哪个 Agent
向 Aria 维护团队报告 Bug 或提交功能建议。自动收集环境信息, 自动路由到 Forgejo(内部用户)或 GitHub(外部用户)。 使用场景:"报告 bug"、"report an issue"、"提交功能建议"、 "aria 有个问题想反馈"、"feature request"、"提 issue"、 "反馈问题"、"report bug to aria"
十步循环 Phase B - 开发阶段执行器,编排 B.1-B.3 步骤。 使用场景:"执行开发阶段"、"Phase B"、"创建分支并运行测试"