kunchenguid-updatefirstmate

在船长调用 /updatefirstmate 时,自我更新正在运行的大副及其所有二副到源仓库的最新版本。示例触发词包括“/updatefirstmate”、“update firstmate”、“pull the latest firstmate”。更新此大副仓库的默认分支以及每个本地或远程二副,通过其受保护的收敛路径(绝不强制、绝不中断),然后重新读取 AGENTS.md 并通过持久化门控重启所有活跃的二副;对于无法确认完成重启的情况,仅执行备用重新读取提示。

仓库最近推送
GitHub Stars
9,083
Forks
2,798
Issues / PRs
848

预览截图

来自skillπ 实验室的展示

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "kunchenguid-updatefirstmate":https://skillpi.com/zh/skills/deepskill-2cbfc22dff9405d4160c626ef174a65cadbdc6ddb62e053ff6ed8ec76bf24cf9。安装前核对上游来源和版本:https://github.com/kunchenguid/firstmate。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

在船长调用 /updatefirstmate 时,自我更新正在运行的大副及其所有二副到源仓库的最新版本。示例触发词包括“/updatefirstmate”、“update firstmate”、“pull the latest firstmate”。更新此大副仓库的默认分支以及每个本地或远程二副,通过其受保护的收敛路径(绝不强制、绝不中断),然后重新读取 AGENTS.md 并通过持久化门控重启所有活跃的二副;对于无法确认完成重启的情况,仅执行备用重新读取提示。

0 下载

介绍来源: third_party · kunchenguid · 0.0.1 参考来源

SkillPi 解读

能完成的任务
来源文档未说明。
适合谁
来源文档未说明。
输入和输出
来源文档未说明。
软件、账号及付费要求
来源文档未说明。
限制与区别
来源文档未说明。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: updatefirstmate
description: >-
  Self-update a running firstmate and its secondmates to the latest from origin.
  Use when the captain invokes /updatefirstmate (e.g. "/updatefirstmate", "update firstmate", "pull the latest firstmate").
  Updates this firstmate repo's default branch and every local or remote secondmate through its guarded convergence path (never forced, never disruptive), then re-reads AGENTS.md and restarts every live second mate through the persist-gated restart, with a fallback re-read nudge only where a restart cannot be proven.
user-invocable: true
metadata:
  internal: true

updatefirstmate

Self-update firstmate in place. Firstmate is its own repo, behind the same no-mistakes gate as any project, so new tracked material (AGENTS.md, bin/, .agents/skills/, and public skills/) reaches main and then sits there until each running firstmate pulls it. Only AGENTS.md, bin/, and .agents/skills/ are a running firstmate instruction surface; public skills/ is installer-facing and is not loaded by firstmate. This skill performs that pull for the running main firstmate and every secondmate, without disturbing any in-flight work.

Pulling the files is only half of it. A running agent holds AGENTS.md and every skill it has already loaded frozen from the moment it launched, and no verified harness offers a reload, so new bytes on disk change nothing for it until it starts a fresh conversation. A re-read cannot substitute: it appends a second copy of the mate's own job description with no defined precedence, and it cannot reach a skill that is already loaded. Replacing the agent is also the only thing that re-resolves the launch-time wiring - turn-end hooks, harness flags, per-harness feature switches - which the mate froze when it started and which nothing on disk describes.

That is why every live second mate is restarted after a successful update, including one that was already on the target commit. Launch-time wiring is not derivable from a file diff, so an unchanged tracked surface is not evidence the running agent is already on the current behavior. The only live mates that do not restart are the ones whose home the update pass had to skip, and the ones whose runtime cannot prove a restart; the updater keeps both cases honest and neither is reported as a reload.

One-time rollout note: the update that carries this change is still executed by the previous release, which restarts only the mates whose AGENTS.md or .agents/skills/ moved on that pass. After it completes, run bin/fm-secondmate-restart.sh <fm-id>... once with every live second mate ID, not only the ones that release named; later updates follow the normal flow below.

The primary update is fast-forward only, while each secondmate uses the same guarded convergence path plus one narrow recovery for squash-merged local history. For a remote route, it updates the configured Firstmate code root on that host from its own origin, then guardedly fast-forwards the persistent home to that code-root commit. It never forces, never creates a merge commit, and never stashes. A clean secondmate divergence advances with reset --keep only when a three-way tree proof shows its complete local result is already present at the target, which recognizes squash-merged contributions without discarding unique content. Every other dirty, diverged, offline, or wrong-branch target is skipped and reported, and a genuine divergence leaves a durable state/.secondmate-update-reconcile/<id>.pending record that future bootstrap and update passes surface until convergence clears it. A tracked-files fast-forward leaves the gitignored operational dirs (data/, state/, config/, projects/, .no-mistakes/) untouched, so a secondmate's in-flight work is never disrupted. This touches only the firstmate repo and its own worktrees, never anything under projects/.

What it does

  1. Run the updater:

    bin/fm-update.sh

    It fast-forwards this firstmate repo's default branch from origin, then updates every registered local or remote secondmate home through its placement-specific guarded path. It prints one status line per target (updated <old>..<new> / reconciled redundant divergence <old>..<new> / already current / skipped: <reason>), followed by three action lines that tell you exactly what to do next:

    • reread-firstmate: yes|no
    • restart-secondmates: fm-<id>...|none
    • nudge-secondmates: fm-<id>...|none

    The two second-mate sets are disjoint and the script owns the split; do not re-derive it. restart-secondmates: carries every live mate the pass left on the latest commit, whether it advanced or was already there. A mate reaches neither set only because its home was skipped, because it has no live endpoint recorded here, or because its endpoint was positively classified as dead or missing. A skipped genuine divergence still requires attention through its durable reconciliation record; the other two cases need no update action from you.

  2. Re-read AGENTS.md if your own instructions changed. When the updater printed reread-firstmate: yes, the tracked instruction surface (AGENTS.md, bin/, or .agents/skills/) just advanced under you. Read AGENTS.md now (CLAUDE.md is a real @AGENTS.md pointer to it) to refresh your operating instructions before doing anything else, so you are acting on the new instructions rather than the stale ones you were started with. When it printed reread-firstmate: no, nothing changed for you - skip the re-read.

  3. Restart every second mate the updater named. Pass the whole restart-secondmates: list to one command (skip this step entirely when it says none):

    FM_HOME=<this-firstmate-home> bin/fm-secondmate-restart.sh <fm-id>...

    Include FM_HOME=<this-firstmate-home> unless FM_HOME is already set to the active firstmate home. This is automatic and needs no per-mate confirmation from the captain. Local and remote mates go in the same list; the command owns the transport, the profile each replacement runs on, and the wait.

    It asks every listed mate first to write down the open work it holds only in its conversation, and restarts one only after that mate's own answer comes back. A mate that is mid-turn queues the request behind that turn. That is the whole point of the step, so do not work around it: it is what keeps a captain call the mate had formed but never registered from being lost with the conversation. Its header owns the request, the bound, and the two knobs that change them.

    Read its per-mate lines and its closing summary: line as the outcome:

    • restarted: <id> - that mate is now genuinely running the current instructions and launch-time settings.
    • nudged: <id>: <reason> - the restart was not safe, so the mate got the older re-read message instead and is still running the conversation and launch-time settings it started with. Never report one of these as a clean reload.
    • unreached: <id>: <reason> - no safe running outcome could be confirmed, including an ambiguous relaunch result.
  4. Send the re-read message to the rest. For every target on the nudge-secondmates: line (do nothing when it says none), send the one-line re-read steer:

    FM_HOME=<this-firstmate-home> bin/fm-send.sh <id> 'firstmate was updated to the latest - please re-read your AGENTS.md to pick up the new instructions.'

    These are the mates that are on the latest bytes but could not be restarted provably, so the steer is the most this pass can honestly do for them. It is a gentle steer, not an interruption: the mate already got a safe tracked-files fast-forward, and the steer never forces, tears down, or discards its work. Never describe one of these as reloaded; its agent is still running the wiring it launched with.

  5. Report to the captain in plain outcomes, in one line where you can. Summarize what landed under AGENTS.md section 9 without firstmate's internal vocabulary: which parts of the fleet are now on the latest, and which were left as-is and why. For example: "Captain, firstmate and both second mates are now on the latest." Say plainly when a mate got the message rather than a clean reload, and why - never let a partial reload read as a full one. Surface any skipped target whose reason needs the captain's attention - for instance a home with its own un-landed changes (diverged) or local edits (dirty), which were left untouched on purpose.

Safety

  • Guarded convergence only. A dirty, offline, non-default, or uniquely diverged target is skipped and reported, never forced or stashed. Only a clean secondmate divergence whose complete local result is already present upstream may move without ancestry, and reset --keep still refuses conflicting working-tree changes. Nothing with unlanded work is ever discarded - this is prime directive #3.
  • Only the firstmate repo and its worktrees are touched, never projects/. It is the same sanctioned self-write as the fleet sync.
  • Nothing with work in it is disrupted. A local or remote second mate gets a tracked-files fast-forward only when its own checkout is safe to advance, and a mate whose home was skipped is not restarted either. A restart replaces that mate's agent in the same home and endpoint after its open work is written down; it is never a teardown and never forced. Its crewmates keep running in their own endpoints, and every durable record - backlog, held captain calls, unread status, unhandled instructions - is re-presented to the replacement at startup. A restart refused before it is attempted leaves that mate on the re-read path; once a relaunch is attempted, any failed or ambiguous result is reported as unknown rather than attributed to either incarnation.

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值95/100

亮点

  • 解决系统运维中的高频刚需:自动化更新代理集群至最新版本
  • 确保更新过程不影响正在进行的任务,具备完善的异常处理机制
  • 提供端到端的完整更新流程,涵盖主代理和所有子代理
触发精准95/100

亮点

  • 触发词覆盖完整且精准:'/updatefirstmate', 'update firstmate', 'pull the latest firstmate'
  • 边界清晰,不易产生误触或漏触
结构规范95/100

亮点

  • 五步式清晰执行流程,每步都有明确出口条件和具体命令
  • frontmatter 完整规范,包含必要的元数据信息
  • 文档结构合理,包含安全说明和详细技术细节
执行可靠95/100

亮点

  • 工具来源明确,参数使用正确
  • 覆盖所有主要异常情况并提供相应处理策略
  • 重启操作具备确认机制和fallback方案,确保系统稳定性
证据可验 (前四项均值)95/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

来源文档未说明。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。