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,898 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,898 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.01898
Opus 5.5 $0.00012 $0.00759
Sonnet 5.5 $0.00006 $0.00380
Haiku 4.5 $0.00003 $0.00190

Measured 24d ago against content hash 78e2676bdf62, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 24d 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 · 147 lines

How it starts

The opening of the file, as written. The whole thing — 147 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.json(templateVersion、文件列表)

脚本输出 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[].enabled 为 false 而被跳过的 managed / merged 条目
  • merged.pending:需要 AI 处理的 merged 文件列表
    • 每项包含 target(项目中的目标路径)和 template(模板根目录下的相对路径)
  • registryAdded:新增的文件注册条目
  • configUpdated:.agents/.airc.json 是否已更新

managed.conflicts 是逐文件冲突,不是整轮同步的中止条件。同步脚本会跳过冲突目标,并保留该目标的当前文件和 files.managedBaselines;其它无冲突的 managed / ejected 文件及配置照常处理。即使冲突列表非空,也继续阶段 B 处理全部 merged.pending,最后在阶段 C 汇总报告所有冲突。任何阶段都不得覆盖冲突文件或推进该文件的基线。

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

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

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

Read the full file on GitHub · 147 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. 24d ago Changed · +3 lines 78e2676bdf62
  2. 26d ago Changed cbb49169183c
  3. 1mo 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 (86 stars, last pushed yesterday), licensed MIT. It adds 29 tokens to every session and 1,898 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

plan-tree

Maintain a structured planning document tree made of roadmap/status files, implementation status or handoff TODO files, topic notes, decision records, open questions, ideas/inspiration pools, and repository/file-structure hygiene plans. Use when Codex needs to create, reorganize, audit, or update a multi-file plan…

SeemSeam/claude_codex_bridge · 143 tokens

ccb-github

Maintain this CCB project's GitHub-facing release and npm publication surface. Use when preparing, publishing, auditing, or fixing CCB releases; updating README.md, README/zh.md, localized README files, CHANGELOG.md, VERSION, package.json, GitHub release notes/assets, repository description/topics, npm registry state…

SeemSeam/claude_codex_bridge · 76 tokens

planner-task-packet

Draft CCB workflow task packets, readiness recommendations, and candidate clarification questions without mutating authoritative state.

SeemSeam/claude_codex_bridge · 25 tokens

orchestration-bundle-candidate

Select one route and return one adaptive one-to-four-workgroup bundle candidate as reply-only evidence.

SeemSeam/claude_codex_bridge · 27 tokens

planner-closure-backfill

Produce one revision-fenced Planner backfill proposal for either a Detailer replan or task-set closure, with compact Frontdesk status evidence.

SeemSeam/claude_codex_bridge · 34 tokens

ccb-diagnose

Diagnose a named CCB agent by combining authoritative runtime and job lineage with deep read-only pane inspection, apply bounded recovery when evidence supports it, verify the result, and request authorization before submitting a redacted GitHub issue. Use for $ccbdiagnose agentname, $ccb-diagnose agentname, or…

SeemSeam/claude_codex_bridge · 91 tokens