sync-agents
v0.8.0
Published
Sync Claude Code and Codex agents and skills
Downloads
788
Maintainers
Readme
sync-agents
https://github.com/user-attachments/assets/d061d969-1eef-4784-844c-c788453875c2
Sync between Claude Code, Codex and other coding agents and skills.
Install
bunx sync-agentsOr install globally:
bun install -g sync-agentsThen run directly:
sync-agentsUsage
sync-agents [options]Flags
| Flag | Description |
|------|-------------|
| --global | Sync only global setup (~/.claude ↔ ~/.agents) |
| --local | Sync only current folder (CLAUDE.md ↔ AGENTS.md) |
| --source <dir> | Custom Claude source directory (default: ~/.claude) |
| --dry-run | Preview changes without writing any files |
| --no-cleanup | Skip removing skills from ~/.codex after migration |
Examples
# Sync everything (global setup + current folder)
sync-agents
# Preview what would be synced without making changes
sync-agents --dry-run
# Sync only global skills and agents
sync-agents --global
# Sync only project docs (CLAUDE.md ↔ AGENTS.md)
sync-agents --local
# Use a custom Claude directory
sync-agents --source ~/my-claude-config
# Migrate from .codex but keep the original files
sync-agents --no-cleanup
# Combine flags
sync-agents --global --dry-runWhat it does
Directory Precedence
~/.claude— Highest precedence (source of truth)~/.agents— Shared standard, syncs bidirectionally with Claude~/.codex— Legacy, migrates to.agentsthen gets cleaned up
Sync Flow
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ .claude │ ──────► │ .agents │ ◄────── │ .codex │
│ (source) │ │ (shared) │ │ (legacy) │
└─────────────┘ └─────────────┘ └─────────────┘
▲ │ │
│ │ │
└───────────────────────┘ │
(additive only) │
▼
┌─────────────┐
│ cleanup │
└─────────────┘- Claude → Agents: Skills and agents from
~/.claudesync to~/.agents/skills. Claude wins on conflicts. - Codex → Agents: Legacy
~/.codex/skillsmigrate to~/.agents/skills(additive only). - Agents → Claude: Skills from
.agentsthat don't exist in Claude sync back (additive only). - Cleanup: After migration, skills are removed from
.codex(use--no-cleanupto preserve).
Project Docs
If the current directory has both CLAUDE.md and AGENTS.md, the most recently modified file overwrites the other.
Why?
The .agents folder is becoming the shared standard for coding agents. Codex now reads skills from ~/.agents/skills natively, but Claude Code doesn't support it yet.
This tool bridges the gap:
- Maintain skills in Claude Code's format (your source of truth)
- Auto-sync to
.agentsfor Codex compatibility - Migrate existing
.codexskills to the new standard - Keep project docs in sync
Requirements
- Bun runtime
