agentleFS
lukasrepubliclukasrepublic/agentic-foundry/skills/repos/SKILL.md

repos

Skill1 starsChanged 3 months agoMITView on GitHub

The governed-repo fleet verbs (/foundry:repos <sync|status|foreach|validate>) over the repos{} registry — clone the not-cloned, fetch the matching, report the rest; never confused with /foundry:fleet, the SESSION ROSTER (one row per active Claude Code session, no repository governed at all). Trigger to bring a fresh clone of the workspace up to date, check every hosted repo's status at a glance, run a command across them, or catch an undeclared checkout.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No checkout, reset, merge, rebase, pull, push, clean, stash, branch, remote or submodule command — and no --force/-f/--hard/--force-sync — …

    line 36

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/foundry:repos

The control plane's fleet verbs over .claude/foundry-project.json's repos{} — the repo/vcstool/meta/myrepos category's universal triad (sync / status / foreach), plus the round-trip validator (validate). scripts/foundry_repo_fleet.py consumes scripts/foundry_repo_registry.py's read-only classification — it does not re-derive it — and adds the one thing the registry atom deliberately left out: verbs that act.

Not to be confused with /foundry:fleet. /foundry:fleet is the session roster — one row per active Claude Code session, governing no repository at all. /foundry:repos governs the repos{} manifest's hosted repositories. The two are fleet-shaped and share nothing else.

The four verbs

verbwhat it does
syncidempotent reconcile: clone every not-cloned row that declares a remote, fetch every present row whose origin is exactly match, report everything else untouched
statusone honest line per repos.<key> entry: present · origin · branch · ahead/behind · dirty
foreach -- <cmd…>shell-free argv fan-out of <cmd…> over the present repos, fail-collecting — one failing repo never stops the rest
validatethe manifest ⟷ reality ⟷ gitignore round trip, including the reverse direction: a git checkout on disk with no repos{} row is reported undeclared-checkout
scripts/foundry_repo_fleet.py sync     --root . [--json] [--timeout SECONDS]
scripts/foundry_repo_fleet.py status   --root . [--json]
scripts/foundry_repo_fleet.py foreach  --root . [--json] [--timeout SECONDS] -- git status --short
scripts/foundry_repo_fleet.py validate --root . [--json] [--max-depth N]

Clone and fetch are the entire mutation vocabulary

No checkout, reset, merge, rebase, pull, push, clean, stash, branch, remote or submodule command — and no --force/-f/--hard/--force-sync — exists anywhere in this tool's vocabulary. An existing checkout is never rewritten: a dirty, diverged, or origin-mismatched row is reported, never touched. fetch moves remote-tracking refs and nothing else; advancing a working tree is the operator's move (or the child repo's own loop), never this control plane's.

Security posture — read before running sync against an unfamiliar manifest

  • Egress is bounded. clone/fetch only ever reach a remote a repos.<key> row declares — re-validated at the boundary (admitted form, no leading -, no control character, physical path confinement) independently of what the row classification claims, before any socket opens.
  • Every git child this tool itself invokes is hardened, network-capable or not: credential.helper=, core.askPass= with the askpass env removed, core.fsmonitor=, core.sshCommand=ssh -o BatchMode=yes with GIT_SSH_COMMAND removed, protocol.allow=never with only https/ssh/file admitted, submodule recursion off. A cloned or fetched-into checkout's own hostile .git/config cannot direct or execute anything at one of those invocations. Stated residual: foreach children run with the ambient environment minus only GIT_DIR and GIT_WORK_TREE (per AC-WRV-5 as authorized) and receive no -c hardening at all — if the child command you pass to foreach is itself git (e.g. foreach -- git status), a governed checkout's own .git/config (core.fsmonitor, core.pager, and anything else it sets) can direct that child. Approving foreach -- git status at the ask tier means trusting the governed checkouts' own configs, not this tool's hardening.
  • No promise that a cloned tree is inert. A cloned repository's content is untrusted: this tool clones and fetches, it does not sandbox, review, or vouch for what it retrieves. Inside a Claude Code workspace root, a cloned repo's CLAUDE.md, .claude/** and .mcp.json become discoverable configuration for sessions rooted there — the same blast radius docs/how-to/multi-repo-control-plane.md's session section already states for the control plane generally.
  • The manifest IS the declared consent. A repos.<key> row with a remote is a committed, reviewable statement that this workspace governs that repository; sync never prompts before a first clone — write access to .claude/foundry-project.json is the egress authority.

Exercise

python3 -m pytest tests/test_repo_fleet.py -q — the real module driven over materialized tmp_path fixtures (git-init'd checkouts, local-path remotes, planted hostile .git/config values, captured argv + child env). No gate consumes any verb's exit code; every exit code here is advisory (0 clean, 2 findings, 1 when the manifest is absent/unreadable/unparseable).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.