agents-md-sync
NewSTUB MODE. Reads canonical AGENTS.md plus per-agent/<name>.md stubs from chirag127/agents-md and writes a small pointer-stub at each per-agent instruction file (CLAUDE.md, GEMINI.md, .codex/AGENTS.md, .cursor/rules/00-agents.mdc, .clinerules, .windsurfrules, .continuerules, CONVENTIONS.md, .junie/guidelines.md). The full AGENTS.md only lands at ~/AGENTS.md; everything else is a 6-line stub that points at it. Use when AGENTS.md or any per-agent stub changes, or on fresh-laptop bootstrap.
Summary
md file to per-agent instruction stubs across multiple AI coding tools (Claude, Gemini, Cursor, Cline, Windsurf, Continue, Aider, Junie, Copilot).
- md, ensuring consistent behavior across all agents while simplifying maintenance.
Overview
agents-md-sync (stub mode)
Reads chirag127/agents-md and writes pointer-stubs at every per-agent instruction-file path. No content duplication. The full canonical content lives at one place (~/AGENTS.md); every other file is a small stub that says "see ~/AGENTS.md" plus that agent's specific quirks.
Architecture
chirag127/agents-md/
├── AGENTS.md ← canonical full content
└── per-agent/
├── claude.md ← copied to ~/.claude/CLAUDE.md
├── codex.md ← copied to ~/.codex/AGENTS.md
├── gemini.md ← copied to ~/.gemini/GEMINI.md
├── cursor.md ← copied to ~/.cursor/rules/00-agents.mdc
├── cline.md ← copied to ~/.cline/global-rules.md
├── windsurf.md ← copied to ~/.codeium/windsurf/memories/global_rules.md
├── continue.md ← copied to ~/.continue/global-rules.md
├── aider.md ← copied to ~/CONVENTIONS.md
├── junie.md ← copied to ~/.junie/guidelines.md
└── copilot.md ← project-only; copied to <repo>/.github/copilot-instructions.mdWhen to use
- •The user edited
AGENTS.md(canonical) or anyper-agent/<name>.mdstub. - •A new agent was installed and its instruction file needs creating.
- •Fresh-laptop bootstrap (the umbrella's
bootstrap.shcalls this script).
How to find the source repo
The script auto-locates chirag127/agents-md by checking, in order:
$AGENTS_MD_REPOenv varC:/D/agents-md(flat-clone convention)~/setup/vendor/agents-md(umbrella vendor)~/src/agents-md(legacy)- Sibling of this skill repo
Steps to run
node "$(dirname "$0")/scripts/sync-agents.mjs" # global (writes ~ paths)
node "$(dirname "$0")/scripts/sync-agents.mjs" --project # project (writes <cwd> paths)
node "$(dirname "$0")/scripts/sync-agents.mjs" --all # both
node "$(dirname "$0")/scripts/sync-agents.mjs" --dry-run # preview
node "$(dirname "$0")/scripts/sync-agents.mjs" --force # rewrite up-to-date filesReport the table the script prints (wrote / ok / miss for each target).
When the user adds a new agent
- Create
chirag127/agents-md/per-agent/<name>.mdfollowing the existing 6-line pattern (pointer + quirks). - Add the target's path to
globalTargets()(and/orprojectTargets()) inscripts/sync-agents.mjs. - Re-run the sync.
What it does NOT do
- •It doesn't fan the full AGENTS.md to every agent — that's the old "copy mode" we deliberately moved away from. Per-agent files are tiny on purpose.
- •It doesn't symlink. The previous version did; this one always copies. The files are small enough that copies are simpler and avoid the Windows Developer Mode footgun.
- •It doesn't push to git — that's the user's call (
git pushis gated by AGENTS.md's "no push without my say-so" rule).
Install & Usage
mkdir -p .claude/agentsAdd the configuration to .claude/agents/agents-md-sync.md
@agents-md-syncUse Cases
Usage Examples
/agents-md-sync
Sync all agent instruction stubs after updating AGENTS.md
Run agents-md-sync as part of my laptop bootstrap script
Security Audits
Frequently Asked Questions
What is agents-md-sync?
This skill synchronizes canonical agent instructions from a central AGENTS.md file to per-agent instruction stubs across multiple AI coding tools (Claude, Gemini, Cursor, Cline, Windsurf, Continue, Aider, Junie, Copilot). It avoids content duplication by writing small pointer stubs that reference the single source of truth at ~/AGENTS.md, ensuring consistent behavior across all agents while simplifying maintenance.
How to install agents-md-sync?
To install agents-md-sync: create the agents directory (mkdir -p .claude/agents), then add the config to .claude/agents/agents-md-sync.md. Finally, @agents-md-sync in Claude Code.
What is agents-md-sync best for?
agents-md-sync is a agent categorized under General. It is designed for: agent. Created by chirag127.
What can I use agents-md-sync for?
agents-md-sync is useful for: After editing the canonical AGENTS.md file, sync changes to all per-agent instruction stubs without manual copying.; When installing a new AI coding tool like Cursor or Windsurf, automatically create its required instruction file with a pointer to the main AGENTS.md.; On a fresh laptop setup, run this skill as part of bootstrap to populate all agent instruction files from the central repository.; When updating quirks for a specific agent (e.g., Claude), edit the per-agent stub in chirag127/agents-md and sync to the corresponding local file.; To enforce consistent coding guidelines across multiple AI assistants in a team project, use this skill to propagate changes from a single source.; When migrating from one AI tool to another, quickly set up the new tool's instruction file with a reference to the existing AGENTS.md..