claude-plugins: Skill for Claude Code

.claude/skills/repo-operator/SKILL.md

repo-operator is a skill for Claude Code from anthony-spruyt/claude-plugins. It costs 83 tokens per session (1,592 once invoked), scanned A, original, MIT.

A guide to managing shared repository files with xfg, a synchronisation tool that copies configuration from a central repository into other repositories. It explains where changes belong and which files can be overwritten.

In plain words
What is it for?
Use it when changing xfg-managed files, repository groups, CI workflows, lint.sh, development-container settings, synced agent files, Renovate, Mergify, rulesets, or repository settings.
Why use it?
It prevents edits in generated repositories from being lost and clarifies how shared CI, development-container, lint, and repository settings are distributed.

Skill for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: names the NotebookEdit tool.

This is anthony-spruyt/claude-plugins's own configuration. It tells Claude Code how to work on claude-plugins 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 claude-plugins configures →

Reuse

Borrowing it

Nothing to install: this file belongs to anthony-spruyt/claude-plugins. 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/anthony-spruyt/claude-plugins/main/.claude/skills/repo-operator/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/anthony-spruyt/claude-plugins

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 repo-operator

README.md
[![agentmods](https://agentmods.dev/badge/skills/anthony-spruyt/claude-plugins/repo-operator/github.svg)](https://agentmods.dev/skills/anthony-spruyt/claude-plugins/repo-operator)
Your own site
<a href="https://agentmods.dev/skills/anthony-spruyt/claude-plugins/repo-operator"><img src="https://agentmods.dev/badge/skills/anthony-spruyt/claude-plugins/repo-operator/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 repo-operator

Your own site · 80×15
<a href="https://agentmods.dev/skills/anthony-spruyt/claude-plugins/repo-operator"><img src="https://agentmods.dev/badge/skills/anthony-spruyt/claude-plugins/repo-operator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,592 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.
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.00083 $0.01592
Opus 5.5 $0.00033 $0.00637
Sonnet 5.5 $0.00017 $0.00318
Haiku 4.5 $0.00008 $0.00159

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

Security

Grade A, and why

repo-operator 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 6d 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.

.claude/skills/repo-operator/SKILL.md · 60 lines

How it starts

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

repo-operator

repo-operator syncs shared config to its repos with xfg. A synced file is overwritten on every sync, so a change made in the target repo is lost. Change the source in repo-operator.

How xfg works

  • Config is src/ in repo-operator: base.yaml (id, deleteOrphaned, prOptions) plus the fragment files named in the table below.
  • content: "@templates/<path>" points at src/templates/<path>, resolved relative to the fragment file. Everything distributed lives in src/templates/.
  • Groups are named bundles of files and settings and can extends other groups. A repo opts in through groups: in repos.yaml.
  • Conditional groups apply files or settings by which groups a repo has, with allOf, anyOf and noneOf. Use them for cross-cutting rules (for example rulesets that differ when mergify is present).
  • createOnly: true seeds a file once and never overwrites it. Use it for files a repo customises (.gitignore, .mega-linter.yml, renovate-overrides.json5). Without it the file is overwritten on every sync.
  • $arrayMerge: append with $values: [...] appends to an array (pre-commit repos, devcontainer extensions). Plain YAML keys replace the array.
  • deleteOrphaned: true plus the .xfg.json manifest: xfg records what it synced under the config id, and deletes a recorded file from the repos once it leaves src/.
  • template: true with vars substitutes ${xfg:name} and built-ins such as ${xfg:repo.fullName} in a file. An unknown variable fails the sync.
  • xfg substitutes an env reference in any synced content: a dollar sign, a brace, an identifier and a closing brace, with an optional :-default or :?message. An unset one fails the sync. Double the dollar sign ($$ before the brace) to emit it literally, as lint.sh.tmpl does for shell expansions. GitHub expressions and ${xfg:...} in a non-template file pass through unchanged. A shell template that holds ${xfg:...} takes a .tmpl extension (lint.sh.tmpl) so shellcheck skips it.
  • Comments in YAML/JSON templates are not synced: xfg parses and regenerates them with only the header: lines from groups.yaml. Explain non-obvious config via a header: link or repo-operator's docs. Shell and markdown templates keep their comments.
  • .github/xfg-managed.json maps each repo to the files xfg overwrites there (not createOnly ones). .claude/xfg-managed.sh reads it from repo-operator's main (cached 15 minutes in the git dir). A PreToolUse hook blocks Edit, MultiEdit, Write, NotebookEdit and Bash writes to a listed file, and a pre-commit hook refuses commits that change one. The claude group syncs all three. In repo-operator the root copies are synced too: edit src/templates/ and let Apply write them.

Read the full file on GitHub · 60 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. 6d ago First seen · 60 lines · 83 tokens per session scan A f54c002b7f18

Subscribe to this mod's changes

repo-operator is a skill published in the GitHub repository anthony-spruyt/claude-plugins (2 stars, last pushed yesterday), licensed MIT. It adds 83 tokens to every session and 1,592 once invoked, about $0.0003 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-10-13.