跳到正文
Skillpedia
部署与云(DevOps)8.5k · #12449

updatefirstmate

它能做什么

这项技能把正在运行的 Firstmate 及其次要辅助助手更新到最新版本。适合希望获得 Firstmate 最新功能和修复的人。

适用场景

  • ✓当你想把 Firstmate 更新到最新版本的时候。
  • ✓当你听说新版 Firstmate 已经发布,并希望你的版本与之保持一致时。
  • ✓当 Firstmate 更新后,某个辅助助手仍在使用旧指令的时候。

技能链接

https://github.com/kunchenguid/firstmate/blob/main/.agents/skills/updatefirstmate/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/kunchenguid/firstmate/blob/main/.agents/skills/updatefirstmate/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请把 Firstmate 更新到最新版本,但不要打断我当前的任务。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会从主要来源拉取主辅助手和每个次要辅助助手的最新文件。它还会说明,辅助助手需要一个全新的对话,才能读取新的指令。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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. Updating is consumption, not publication: it only pulls from upstream, so every home runs it regardless of role, and the firstmate-repository publication boundary (firstmate-self-repo) never applies to it.

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 source is origin unless this home has config/self-update-source, which names one remote branch for the primary to follow instead, with local secondmates following the primary's resulting commit; docs/configuration.md owns that contract, including its remote-secondmate limit. 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, or from the configured self-update source, then updates every registered local or remote secondmate home through its placement-specific guarded path. When a source is configured it prints a self-update source: line first, and an unusable config file stops the whole update before anything moves; report that file to the captain rather than editing or removing it. It prints one status line per target (updated <old>..<new> / reconciled redundant divergence <old>..<new> /
常见问题

它会打断当前的工作吗?

不会。这项技能说明它在更新时不会打扰正在进行的工作。

为什么辅助助手需要重新开始?

正在运行的辅助助手会在内存中保留原始指令,因此新文件只有在新的对话中才会生效。

我需要是高级用户吗?

不需要。这项技能会执行更新步骤,并解释结果。

详情

作者的原始描述

Self-update a running firstmate and its secondmates to the latest from origin, or from a configured self-update source. Use when the captain invokes /updatefirstmate (e.g. "/updatefirstmate", "update firstmate", "pull the latest firstmate").

repo: kunchenguid/firstmate

热度

GitHub 星标
8.5k
排名
#12449
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能