sync-agents-md

sync-agents-md is a command for Claude Code from alirezarezvani/claude-code-skill-factory. It costs 0 tokens per session (2,433 once invoked), scanned B, original, MIT.

A command that regenerates AGENTS.md, the instructions file for Codex CLI, from CLAUDE.md, the corresponding instructions file for Claude Code. It can also validate the setup or show whether the files are synchronized.

In plain words
What is it for?
Use it after changing CLAUDE.md, adding skills or agents, or changing the project structure; use its validation and status options to inspect the setup without regenerating the file.
Why use it?
It prevents the two assistants' project instructions from becoming outdated or inconsistent after configuration or repository changes.

Command for Claude Code

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 commands/alirezarezvani/claude-code-skill-factory/sync-agents-md
Clone the repo
git clone --depth 1 https://github.com/alirezarezvani/claude-code-skill-factory

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sync-agents-md

README.md
[![agentmods](https://agentmods.dev/badge/commands/alirezarezvani/claude-code-skill-factory/sync-agents-md.svg)](https://agentmods.dev/commands/alirezarezvani/claude-code-skill-factory/sync-agents-md)
Your own site
<a href="https://agentmods.dev/commands/alirezarezvani/claude-code-skill-factory/sync-agents-md"><img src="https://agentmods.dev/badge/commands/alirezarezvani/claude-code-skill-factory/sync-agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,433 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00000 $0.02433
Opus 5 $0.00000 $0.01216
Sonnet 5 $0.00000 $0.00487
Haiku 4.5 $0.00000 $0.00243

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

Security

Grade B, and why

sync-agents-md scanned grade B with 1 finding 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 5d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

chmod 644 AGENTS.md
.claude/commands/sync-agents-md.md · 477 lines

How it starts

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

/sync-agents-md - Regenerate AGENTS.md from CLAUDE.md

Synchronize AGENTS.md with current CLAUDE.md using the codex-cli-bridge skill.


Usage

/sync-agents-md
/sync-agents-md --validate
/sync-agents-md --status

What This Command Does

Default (/sync-agents-md):

  • Runs the codex-cli-bridge skill
  • Validates environment (Codex CLI + CLAUDE.md)
  • Parses CLAUDE.md and project structure
  • Regenerates AGENTS.md with latest changes
  • Overwrites existing AGENTS.md

With --validate:

  • Validates environment only (no regeneration)
  • Checks Codex CLI installation
  • Checks CLAUDE.md exists
  • Shows status report

With --status:

  • Shows current sync status
  • Displays when AGENTS.md was last updated
  • Lists documented skills and agents

When to Use

Run this command when:

  • ✅ CLAUDE.md has been updated
  • ✅ New skills added to .claude/skills/
  • ✅ New agents added to .claude/agents/
  • ✅ Project structure changed
  • ✅ AGENTS.md is out of sync
  • ✅ Team needs latest Codex CLI documentation

Don't need to run when:

  • ❌ Only code changes (no config changes)
  • ❌ AGENTS.md already current
  • ❌ Working only with Claude Code (not Codex CLI)

How It Works

Step 1: Environment Validation

🔍 Checking Codex CLI installation...
   ✅ Found: /path/to/codex
   Version: codex-cli 0.50.0

📄 Checking CLAUDE.md...
   ✅ Found: /project/CLAUDE.md

✅ All safety checks passed!

Step 2: Project Analysis

📖 Parsing Claude Code project...
   ✅ Found 13 skills
   ✅ Found 59 agents
   ✅ Found 58 CLAUDE.md sections

📊 Project: your-project
📁 Type: GREENFIELD_NEW

Step 3: AGENTS.md Generation

📝 Generating AGENTS.md...
   ✅ AGENTS.md generated successfully

📄 Output: /project/AGENTS.md
📊 Skills documented: 13
🤖 Agents documented: 59

Examples

Example 1: Basic Sync

User:

/sync-agents-md

What happens:

  1. Validates Codex CLI installed
  2. Checks CLAUDE.md exists
  3. Parses project structure
  4. Regenerates AGENTS.md
  5. Success message with statistics

Read the full file on GitHub · 477 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. 5d ago First seen · 477 lines · 0 tokens per session scan B 09b9eee2fa97

Subscribe to this mod's changes

sync-agents-md is a command published in the GitHub repository alirezarezvani/claude-code-skill-factory (855 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,433 tokens. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.