agents-sync

A tool for generating and updating instruction files for different coding assistants from one shared project description. It can create files such as AGENTS.md, CLAUDE.md, .cursorrules, and editor-specific rule files.

In plain words
What is it for?
Use it when setting up a new project or refreshing assistant instructions after changes to the project's structure, dependencies, documentation, or conventions.
Why use it?
Without synchronization, each coding tool may follow different or outdated project guidance. A shared source keeps those instructions aligned as the codebase changes.

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/googlarz/agents-sync/skill
Any agent
npx skills add googlarz/agents-sync --skill skill
Clone the repo
git clone --depth 1 https://github.com/googlarz/agents-sync

Made for: Claude Code, Codex.

Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,575 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.00082 $0.01575
Opus 5 $0.00041 $0.00788
Sonnet 5 $0.00016 $0.00315
Haiku 4.5 $0.00008 $0.00158

Measured 2d ago against content hash 668d6a58597e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agents-sync 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 2d 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.

skill/SKILL.md · 209 lines

How it starts

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

agents-sync

Generate and sync AI context files across every coding tool you use.

Prerequisites

Add to your Claude Code MCP config (.claude/settings.json or ~/.claude/claude_desktop_config.json):

{
  "mcpServers": {
    "agents-sync": {
      "command": "npx",
      "args": ["@googlarz/agents-sync"],
      "env": { "ANTHROPIC_API_KEY": "sk-ant-..." }
    }
  }
}

Then restart Claude Code to connect.

Commands

/agents-sync init

First-time setup. Reads your codebase and generates all context files.

When to use: New project, or starting from scratch.

What it does:

  1. Scans your codebase (manifests, structure, source samples, docs, TODO/FIXME comments)
  2. Extracts project metadata via Claude API
  3. Generates canonical AGENTS.md
  4. Derives CLAUDE.md, .cursorrules, .github/copilot-instructions.md, GEMINI.md, .windsurfrules, .clinerules, .roomodes, CONVENTIONS.md, .kiro/steering/agents-sync.md, .trae/rules/agents-sync.md
  5. Saves a snapshot for drift detection

Usage:

Run /agents-sync init on this project

Claude will call agents_sync_init with the current project path.


/agents-sync sync

Re-sync after your codebase has changed. Preserves any manual customizations.

When to use: After major refactors, new dependencies, architecture changes.

Options:

  • Add --fast to skip Claude API call when drift is minor (re-derives from existing AGENTS.md, still refreshes MCP + codegraph sections for free)
  • Add --dry-run to preview changes without writing

Usage:

Sync my AI context files /agents-sync sync --fast


/agents-sync derive

Re-derive all tool files from the current AGENTS.md without re-running the scanner or calling the Claude API.

When to use: After manually editing AGENTS.md and wanting all tool files to reflect the changes immediately.

Usage:

/agents-sync derive I edited AGENTS.md, update all tool files


/agents-sync drift

Read the full file on GitHub · 209 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. 2d ago First seen · 209 lines · 82 tokens per session scan A 668d6a58597e

Subscribe to this mod's changes

agents-sync is a skill published in the GitHub repository googlarz/agents-sync (5 stars, last pushed 3mo ago), licensed MIT. It adds 82 tokens to every session and 1,575 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

agent-config-setup

Generate AI agent config files for any project — Cursor, Claude Code, Copilot, Windsurf, Cline, AGENTS.md. Use when setting up a new project for AI agents.

ofershap/create-agent-config · 43 tokens

project-spine-kickoff

Use when the user wants to set up Project Spine for a new project — phrases like "new client project", "kickoff", "create AGENTS.md from scratch", "generate agent instructions for this repo", "set up project context". Runs spine init → edits brief → spine compile → reviews outputs. For stale files use…

PetriLahdelma/project-spine · 84 tokens

project-spine

Use when the user mentions AGENTS.md, CLAUDE.md, copilot-instructions, Cursor rules, project brief, context for coding agents, agency kickoff, onboarding a new project, or asks "how do I set up Project Spine". This is the orientation skill — reach for it FIRST when the user's intent involves Project Spine, then chain…

PetriLahdelma/project-spine · 80 tokens

project-spine-drift

Use when the user mentions drift, says AGENTS.md / CLAUDE.md / copilot-instructions / Cursor rules are "stale" or "out of date", asks about CI catching docs drift, or says "check if my spine is still current". Runs spine drift check, interprets each drift category, and guides resolution. For initial setup use…

PetriLahdelma/project-spine · 87 tokens

project-spine-template

Use when the user wants to apply a bundled, user-local, or project-local template to a new project, or save the current project as a reusable template. Phrases like "use our agency starter", "save this as a template for future clients", "apply the shared saas-marketing starter".

PetriLahdelma/project-spine · 66 tokens

project-spine-rationale

Use when the user wants to review, polish, or share the generated Project Spine rationale file locally. Phrases like "show the project rationale", "send the client a project summary", "review rationale.md", or "make the client-facing overview safer".

PetriLahdelma/project-spine · 57 tokens