firstmate: Skill for Claude Code

.agents/skills/updatefirstmate/SKILL.md

updatefirstmate is a skill for Claude Code from kunchenguid/firstmate. It costs 50 tokens per session (2,185 once invoked), scanned A, original, MIT.

A procedure for updating a running firstmate and its local or remote secondmates from the latest fast-forwardable version in Git. Firstmate is the main agent workspace; a secondmate is a persistent workspace for another responsibility.

In plain words
What is it for?
Use it when the firstmate or its secondmates need to pull the latest repository instructions and tracked files from the default branch.
Why use it?
It reduces the risk of overwriting work or creating unwanted merges by skipping dirty, diverged, offline, or incorrectly configured targets.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions CLAUDE.md; installed under .agents/ (shared by several agents); mentions AGENTS.md.

This is kunchenguid/firstmate's own configuration. It tells Claude Code how to work on firstmate itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything firstmate configures →

About the project

firstmate is an agent distribution that lets one coding agent coordinate a crew of autonomous agents working in separate git worktrees. It is for running parallel fixes, investigations, plans, and audits while receiving completed pull requests, merges, or reports through one supervising agent. The catalogue entries provide skills, hooks, instructions, and settings for operating this workflow.

kunchenguid/firstmate · 8,295 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to kunchenguid/firstmate. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kunchenguid/firstmate/main/.agents/skills/updatefirstmate/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/kunchenguid/firstmate

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for updatefirstmate

README.md
[![agentmods](https://agentmods.dev/badge/skills/kunchenguid/firstmate/updatefirstmate/github.svg)](https://agentmods.dev/skills/kunchenguid/firstmate/updatefirstmate)
Your own site
<a href="https://agentmods.dev/skills/kunchenguid/firstmate/updatefirstmate"><img src="https://agentmods.dev/badge/skills/kunchenguid/firstmate/updatefirstmate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for updatefirstmate

Your own site · 80×15
<a href="https://agentmods.dev/skills/kunchenguid/firstmate/updatefirstmate"><img src="https://agentmods.dev/badge/skills/kunchenguid/firstmate/updatefirstmate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,185 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Rogue Agent · line 4
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
  • high Rogue Agent · line 14
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.02185
Opus 5.5 $0.00020 $0.00874
Sonnet 5.5 $0.00010 $0.00437
Haiku 4.5 $0.00005 $0.00218

Measured 4d ago against content hash c95261f822c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

updatefirstmate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/updatefirstmate/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on 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 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/.

Read the full file on GitHub · 108 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · -1 lines · -63 tokens per session c95261f822c1
  2. 11d ago Changed · +1 lines 7c53e6128c08
  3. 1mo ago Changed · +4 lines · -2 tokens per session 989b44fd3c11
  4. 1mo ago Changed · +6 lines · +8 tokens per session 81108aefcddb
  5. 1mo ago Changed · +33 lines · -3 tokens per session c8e2c7bceacf
  6. 1mo ago First seen · 65 lines · 110 tokens per session scan A f0ef8bda095e

Subscribe to this mod's changes

updatefirstmate is a skill published in the GitHub repository kunchenguid/firstmate (8,295 stars, last pushed today), licensed MIT. It adds 50 tokens to every session and 2,185 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.