agent-infra: Skill for Claude Code

.agents/skills/update-agent-infra/SKILL.md

update-agent-infra is a skill for Claude Code, Codex from fitlab-ai/agent-infra. It costs 29 tokens per session (1,743 once invoked), scanned A, original, MIT.

A controlled workflow for updating a project's AI collaboration files from the latest configuration templates.

In plain words
What is it for?
Use it to detect the template version, synchronize managed files, create first-install files, update the project registry, and report protected files, conflicts, and external template-source differences.
Why use it?
It automates template syncing and protects local changes when ownership or conflicts cannot be established safely.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is fitlab-ai/agent-infra's own configuration. It tells Claude Code and Codex how to work on agent-infra 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 agent-infra configures →

Reuse

Borrowing it

Nothing to install: this file belongs to fitlab-ai/agent-infra. 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/fitlab-ai/agent-infra/main/.agents/skills/update-agent-infra/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/fitlab-ai/agent-infra

Made for: Claude Code, Codex.

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 update-agent-infra

README.md
[![agentmods](https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/update-agent-infra/github.svg)](https://agentmods.dev/skills/fitlab-ai/agent-infra/update-agent-infra)
Your own site
<a href="https://agentmods.dev/skills/fitlab-ai/agent-infra/update-agent-infra"><img src="https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/update-agent-infra/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 update-agent-infra

Your own site · 80×15
<a href="https://agentmods.dev/skills/fitlab-ai/agent-infra/update-agent-infra"><img src="https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/update-agent-infra.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,743 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: 1 finding, up to medium

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 →

  • medium Agent Snooping · line 109
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
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.00029 $0.01743
Opus 5 $0.00015 $0.00872
Sonnet 5 $0.00006 $0.00349
Haiku 4.5 $0.00003 $0.00174

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

Security

Grade A, and why

update-agent-infra 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 11d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/sync-templates.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/update-agent-infra/SKILL.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

更新项目

执行约束

  1. 确定性步骤脚本化:managed / ejected 文件处理、注册表同步、配置更新 全部由 sync-templates.js 脚本执行,不得逐文件手工处理。 脚本保证原子性和幂等性。

  2. 禁止委托子代理:阶段 B(merged 文件智能合并)必须在主会话中直接执行, 不得委托给子代理。子代理上下文有限,容易误判文件内容。

阶段 A:运行同步脚本(确定性)

执行以下命令,一次性处理所有确定性步骤:

node .agents/skills/update-agent-infra/scripts/sync-templates.js

脚本读取 .agents/.airc.json,并通过 npm 自动定位已安装的 @fitlab-ai/agent-infra/templates/ 目录。同步前会合并 templates.sources 中配置的外部模板源;相同文件以内置模板为准,多个外部源之间后者覆盖前者,冲突会写入报告。然后自动完成:

  • 检测模板源版本
  • 同步文件注册表(defaults.json.agents/.airc.json
  • 处理所有 managed 文件(语言选择 → 排除 merged/ejected → 占位符渲染 → 写入;内建 guarded managed 文件使用来源基线三方比较)
  • 处理 ejected 文件(仅首次安装时创建)
  • 更新 .agents/.airc.jsontemplateVersion、文件列表)

脚本输出 JSON 到 stdout,解析并记录报告内容。

关键字段

  • error:错误信息(如非空则停止并报告)
  • templateVersion:模板源包的精确 v 前缀 SemVer(可包含 prerelease 或 build metadata)
  • templateRoot:模板文件根目录绝对路径
  • templateSources.conflicts:外部模板源冲突列表;报告中必须显式展示,说明哪些文件因内置模板或后续外部源获胜而被忽略
  • managed.written / managed.created:已更新/新建的 managed 文件
  • managed.protected:检测到用户单边修改或删除、因此保留本地状态的 guarded managed 文件
  • managed.conflicts:来源未知、双边修改或平台切换时无法证明官方所有权的 guarded managed 冲突;必须逐项展示 target、reason 与三方哈希
  • managed.removed:被删除的 managed 文件(包括模板迁移时移除的旧路径)
  • managed.skippedPlatform:因归属其他平台而被跳过的 managed / merged 条目
  • managed.skippedTUI:因对应内建 Agent Client 的 agentClients[].enabledfalse 而被跳过的 managed / merged 条目(落在同一路径前缀下的 customTUI 命令文件会被保留)
  • merged.pending:需要 AI 处理的 merged 文件列表
    • 每项包含 target(项目中的目标路径)和 template(模板根目录下的相对路径)
  • registryAdded:新增的文件注册条目
  • configUpdated.agents/.airc.json 是否已更新

如果 managed.conflicts 非空,输出全部冲突并立即停止,不进入阶段 B;禁止覆盖冲突文件或推进其 files.managedBaselines

阶段 B:处理 merged 文件(AI 智能合并)

根据报告中 merged.pending 列表,逐个文件处理。对于每个条目:

  1. <templateRoot>/<template> 读取模板文件
  2. 渲染占位符:将双花括号包裹的 projectorg 占位符替换为 .agents/.airc.json 中的实际值
  3. 读取本地当前文件(<项目根>/<target>

如果本地文件不存在(首次安装),直接写入渲染后的模板,跳过合并。

如果本地文件存在,执行以下合并算法:

B.1 以模板为基底

使用渲染后的新模板作为输出的基底。模板代表最佳实践,其结构和内容具有权威性。

Read the full file on GitHub · 144 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 144 lines · 29 tokens per session scan A e0ed9523ae72

Subscribe to this mod's changes

update-agent-infra is a skill published in the GitHub repository fitlab-ai/agent-infra (83 stars, last pushed today), licensed MIT. It adds 29 tokens to every session and 1,743 once invoked, about $0.0001 per session on Opus 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.

Related

Other skills, from other repositories

work

Execute an approved wish plan — orchestrate subagents per task group with fix loops, validation, and review handoff.

automagik-dev/genie · 26 tokens

preview-design

Render a real artifact through this branch's local MERIDIAN design code (not the published npm package) so the team can test the new Design Convention on the document / handoff / platform surfaces before it ships. Use for /preview-design, "preview the design convention", "render this with the new design", or Design…

egregore-labs/egregore · 71 tokens

sw-do

Implement a SpecWeave increment task by task through the ledger, with evidence per task and a verified close. Use for "implement this", "start working", "continue the increment", "keep going".

anton-abyzov/specweave · 41 tokens

done

Close an increment: ledger check, specweave verify, optional review, then specweave complete. Use when all tasks are done and saying "close increment", "we are done", or "finish up".

anton-abyzov/specweave · 0 tokens

xiaohongshu-image-creator

An image-making assistant for Xiaohongshu, a Chinese social platform for lifestyle, product, and educational posts. It creates vertical covers and supporting images matched to the post’s topic, audience, and visual style.

huangrichao2020/pretty-skills · 121 tokens

atomic-tdd

Test-first discipline. Auto-triggers on "let's implement X", "add feature Y", "fix bug Z", "write a test for", "implement", "build out", and similar pre-code-change phrases. Iron rule: failing test exists before production code. Skip only for pure docs/config changes with an explicit "skipped because:" note. Explicit…

damusix/atomic-claude · 142 tokens