BeClaude

agents-md-sync

New
GitHub TrendingGeneralby chirag127

STUB 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.

First seen 6/20/2026

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

code
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.md

When to use

  • The user edited AGENTS.md (canonical) or any per-agent/<name>.md stub.
  • A new agent was installed and its instruction file needs creating.
  • Fresh-laptop bootstrap (the umbrella's bootstrap.sh calls this script).

How to find the source repo

The script auto-locates chirag127/agents-md by checking, in order:

  1. $AGENTS_MD_REPO env var
  2. C:/D/agents-md (flat-clone convention)
  3. ~/setup/vendor/agents-md (umbrella vendor)
  4. ~/src/agents-md (legacy)
  5. Sibling of this skill repo

Steps to run

bash
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 files

Report the table the script prints (wrote / ok / miss for each target).

When the user adds a new agent

  1. Create chirag127/agents-md/per-agent/<name>.md following the existing 6-line pattern (pointer + quirks).
  2. Add the target's path to globalTargets() (and/or projectTargets()) in scripts/sync-agents.mjs.
  3. 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 push is gated by AGENTS.md's "no push without my say-so" rule).

Install & Usage

1
Create the agents directory
mkdir -p .claude/agents
2
Save the agent file

Add the configuration to .claude/agents/agents-md-sync.md

3
Invoke with @agent-name
@agents-md-sync

Use Cases

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.

Usage Examples

1

/agents-md-sync

2

Sync all agent instruction stubs after updating AGENTS.md

3

Run agents-md-sync as part of my laptop bootstrap script

View source on GitHub
agent

Security Audits

LicenseUnknownSourceWarnRepositoryPass

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..