Data & AI
sync-agents-md - Claude MCP Skill
/sync-agents-md - Regenerate AGENTS.md from CLAUDE.md
SEO Guide: Enhance your AI agent with the sync-agents-md tool. This Model Context Protocol (MCP) server allows Claude Desktop and other LLMs to /sync-agents-md - regenerate agents.md from claude.md... Download and configure this skill to unlock new capabilities for your AI workflow.
Documentation
SKILL.md# /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
**Output**:
```
ā
SUCCESS - AGENTS.MD REGENERATED
š Output: AGENTS.md
š Skills documented: 13
š¤ Agents documented: 59
AGENTS.md is now in sync with CLAUDE.md
```
---
### Example 2: Validate Only
**User**:
```
/sync-agents-md --validate
```
**What happens**:
1. Checks Codex CLI installation
2. Checks CLAUDE.md exists
3. Shows status report
4. **Does NOT regenerate AGENTS.md**
**Output**:
```
ā
VALIDATION PASSED
Environment is ready for AGENTS.md generation.
Codex CLI: v0.50.0 ā
CLAUDE.md: Found ā
AGENTS.md: Exists (last updated: 2025-10-30)
To regenerate: /sync-agents-md
```
---
### Example 3: Status Check
**User**:
```
/sync-agents-md --status
```
**What happens**:
Shows current project status
**Output**:
```
š SYNC STATUS
Project: claude-code-skills-factory
CLAUDE.md: ā
Exists
AGENTS.md: ā
Exists (in sync)
Last updated: 2025-10-30 15:52
Skills: 13 (8 functional, 5 prompt-based)
Agents: 59
Codex CLI: v0.50.0 installed
```
---
## What Gets Updated
When you run `/sync-agents-md`, the following sections in AGENTS.md are regenerated:
### ā
Updated Sections
1. **Project Overview**
- From CLAUDE.md Repository Purpose section
- Project type (GREENFIELD_NEW, etc.)
- Description
2. **Available Skills**
- All skills from `.claude/skills/`
- Skills from `~/.claude/skills/`
- Generated skills from `generated-skills/`
- With Codex CLI usage examples
3. **Project Structure**
- Current folder layout
- Key files
- Documentation references
4. **Workflow Patterns**
- Slash commands ā Codex CLI equivalents
- Based on CLAUDE.md workflows section
5. **Command Reference**
- Updated command mapping table
- Claude Code ā Codex CLI
### ā What Doesn't Change
- Skill implementation files (unchanged)
- CLAUDE.md (source of truth)
- Project code
- Documentation files (just referenced)
---
## Common Workflows
### Workflow 1: After Updating CLAUDE.md
```
# 1. Edit CLAUDE.md
vim CLAUDE.md
# 2. Sync AGENTS.md
/sync-agents-md
# 3. Commit both files
git add CLAUDE.md AGENTS.md
git commit -m "docs: Update project configuration"
```
---
### Workflow 2: After Adding New Skill
```
# 1. Create skill
/build skill
[Generated: .claude/skills/my-new-skill]
# 2. Sync AGENTS.md (documents new skill)
/sync-agents-md
# 3. Verify
cat AGENTS.md | grep "my-new-skill"
```
---
### Workflow 3: Validate Before CI/CD
```
# In CI/CD pipeline
# 1. Validate environment
/sync-agents-md --validate
# 2. If valid, proceed with build
# 3. If invalid, fail pipeline
```
---
## Integration with Other Commands
This command works seamlessly with:
### `/init` - Auto-sync after initialization
```
/init
ā Creates CLAUDE.md
ā Auto-runs /sync-agents-md
ā Both files ready
```
### `/update-claude` - Auto-sync after update
```
/update-claude
ā Updates CLAUDE.md
ā Auto-runs /sync-agents-md
ā AGENTS.md stays in sync
```
### `/check-docs` - Validates sync status
```
/check-docs
ā Checks CLAUDE.md current
ā Checks AGENTS.md in sync
ā Suggests /sync-agents-md if needed
```
---
## Troubleshooting
### Error: "Codex CLI not found"
**Symptom**:
```
ā Codex CLI not found!
```
**Solution**:
```bash
# Install Codex CLI
# Visit: https://github.com/openai/codex
# Verify
codex --version
```
---
### Error: "CLAUDE.md not found"
**Symptom**:
```
ā ļø CLAUDE.md not found
```
**Solution**:
```
# Option 1: Run /init to create CLAUDE.md
/init
# Option 2: Create manually
# Then run /sync-agents-md
```
---
### AGENTS.md Out of Date
**Symptom**: Changes to CLAUDE.md not reflected in AGENTS.md
**Solution**:
```
# Simply regenerate
/sync-agents-md
# AGENTS.md now updated with latest changes
```
---
### Permission Denied
**Symptom**:
```
ā Failed to write AGENTS.md: Permission denied
```
**Solution**:
```bash
# Check permissions
ls -l AGENTS.md
# Fix if needed
chmod 644 AGENTS.md
# Try again
/sync-agents-md
```
---
## Best Practices
### 1. Keep CLAUDE.md as Source of Truth
ā
**DO**:
- Edit CLAUDE.md for all configuration changes
- Run `/sync-agents-md` after editing
- Commit both CLAUDE.md and AGENTS.md together
ā **DON'T**:
- Edit AGENTS.md directly (will be overwritten)
- Forget to sync after CLAUDE.md changes
- Commit CLAUDE.md without regenerating AGENTS.md
---
### 2. Sync After Major Changes
**Always sync when**:
- Adding/removing skills
- Updating project description
- Changing project type
- Modifying workflows
- Adding agents
---
### 3. Validate in CI/CD
```yaml
# .github/workflows/validate-docs.yml
name: Validate Documentation
on: [push, pull_request]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Validate AGENTS.md sync
run: |
# Regenerate AGENTS.md
python generated-skills/codex-cli-bridge/bridge.py
# Check if changed
git diff --exit-code AGENTS.md || {
echo "ā AGENTS.md is out of sync with CLAUDE.md"
echo "Run: /sync-agents-md"
exit 1
}
```
---
### 4. Use in Pre-commit Hook
```bash
# .git/hooks/pre-commit
#!/bin/bash
# Check if CLAUDE.md was modified
if git diff --cached --name-only | grep -q "CLAUDE.md"; then
echo "CLAUDE.md changed, regenerating AGENTS.md..."
/sync-agents-md
git add AGENTS.md
echo "ā
AGENTS.md updated and staged"
fi
```
---
## Technical Details
**Command Type**: Slash command
**Skill Used**: codex-cli-bridge
**Python Script**: `generated-skills/codex-cli-bridge/bridge.py`
**Output**: AGENTS.md in project root
**Approach**: Reference-based (no file duplication)
**Sync Direction**: One-way (CLAUDE.md ā AGENTS.md)
---
## Related Commands
| Command | Purpose |
|---------|---------|
| `/init` | Initialize project with CLAUDE.md (auto-syncs AGENTS.md) |
| `/update-claude` | Update CLAUDE.md from code changes (auto-syncs AGENTS.md) |
| `/check-docs` | Validate all documentation is current |
| `/sync-agents-md` | Manually regenerate AGENTS.md |
---
## See Also
- **SKILL.md**: codex-cli-bridge skill documentation
- **HOW_TO_USE.md**: Comprehensive usage guide
- **AGENTS.md**: Example output (this repository)
- **CLAUDE.md**: Source configuration file
---
**Version**: 1.0.0
**Last Updated**: 2025-10-30
**Maintained For**: Cross-tool team collaboration (Claude Code ā Codex CLI)
---
**Keep your documentation in sync!** šSignals
Information
- Repository
- alirezarezvani/claude-code-skill-factory
- Author
- alirezarezvani
- Last Sync
- 3/12/2026
- Repo Updated
- 3/12/2026
- Created
- 1/16/2026
Reviews (0)
No reviews yet. Be the first to review this skill!
Related Skills
cursorrules
CrewAI Development Rules
fastmcp-client-cli
Query and invoke tools on MCP servers using fastmcp list and fastmcp call. Use when you need to discover what tools a server offers, call tools, or integrate MCP servers into workflows.
browser-use
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, or extract information from web pages.
remote-browser
Controls a cloud browser from a sandboxed remote machine. Use when the agent is running in a sandbox (no GUI) and needs to navigate websites, interact with web pages, fill forms, take screenshots, or expose local dev servers via tunnels.
Related Guides
Python Django Best Practices: A Comprehensive Guide to the Claude Skill
Learn how to use the python django best practices Claude skill. Complete guide with installation instructions and examples.
Mastering Python and TypeScript Development with the Claude Skill Guide
Learn how to use the python typescript guide Claude skill. Complete guide with installation instructions and examples.
Mastering Data Science with Claude: A Complete Guide to the Pandas Scikit-Learn Skill
Learn how to use the pandas scikit learn guide Claude skill. Complete guide with installation instructions and examples.