sync-library

A workflow for keeping an agent library, which stores reusable skills and service definitions, synchronized between computers through Git.

In plain words
What is it for?
Initializing, committing, pushing, and pulling the central library, including its index and skill files while excluding cached content and resolved secrets.
Why use it?
It avoids unaudited manual copying and keeps library changes versioned while screening out embedded secrets.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/tarekkharsa/agentstack/sync-library
Any agent
npx skills add Tarekkharsa/agentstack --skill sync-library
Clone the repo
git clone --depth 1 https://github.com/Tarekkharsa/agentstack

Made for: Claude Code, Codex.

Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 743 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00046 $0.00743
Opus 5 $0.00023 $0.00371
Sonnet 5 $0.00009 $0.00149
Haiku 4.5 $0.00005 $0.00074

Measured yesterday against content hash 0337a67a22f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sync-library 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 yesterday.

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.

crates/cli/catalog/skills/sync-library/SKILL.md · 85 lines

How it starts

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

Sync the central library

Use when you want your agentstack central library — the skills and MCP servers you reference by name — to be the same on every machine (laptop, desktop, a fresh box).

The idea

The library lives at ~/.agentstack/lib/. Version it as a git repo and push/pull it across machines. git is the right tool here: versioned, offline-friendly, no daemon, and it diffs cleanly.

Never fetch a skill from another machine by hand (scp/rsync/ssh). A raw copy skips the content scan (prompt-injection gate), records no provenance, and has no checksum — an unauditable fork the lockfile can't reproduce. If a skill you need lives on another device, sync the library (below); the skill then resolves by name everywhere.

The built-in way (preferred)

agentstack ships a wrapper that does the whole flow — and refuses to push if a server definition holds a literal secret in any field (headers, env, url, args), can't be parsed (the gate fails closed rather than skipping it), or if one is still buried in an outgoing commit. --allow-secrets overrides, deliberately:

# first machine — set it up and push:
agentstack more lib sync --init --remote <your-remote>
agentstack more lib sync                     # commit local changes, pull, push

# a fresh machine — clone the library into place:
agentstack more lib sync --init --remote <your-remote>

agentstack more lib sync --status            # working-tree changes + ahead/behind

What travels vs. what doesn't

  • Travels: library.toml (the index), skills/ (path-source bodies), servers/ (definitions with ${REF} placeholders only).
  • Stays local: the content store / cache lives outside the library (~/.agentstack/store), so it never travels; resolved secret values are never in the library at all.

Git-source skills carry git:<url>@<rev>#<subpath> provenance, so they re-resolve identically on any machine — only path-source content needs to move.

Doing it by hand (equivalent)

Read the full file on GitHub · 85 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. yesterday First seen · 85 lines · 46 tokens per session scan A 0337a67a22f4

Subscribe to this mod's changes

sync-library is a skill published in the GitHub repository Tarekkharsa/agentstack (3 stars, last pushed 18d ago), licensed Apache-2.0. It adds 46 tokens to every session and 743 once invoked, about $0.0002 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-31.