← ClaudeAtlas

sync-skillslisted

Sync skills between Claude Code and Codex runtimes. Handles project-level (.claude/skills ↔ .agents/skills) and user-level (~/.claude/skills → ~/.codex/skills or reverse). Trigger with /sync-skills or when the user mentions 'sync skills,' 'codex skills,' 'update agents skills,' or 'sync runtimes.'
t0ddharris/mktg-os · ★ 0 · AI & Automation · score 61
Install: claude install-skill t0ddharris/mktg-os
# Sync Skills Synchronize skills between Claude Code and Codex so both runtimes share the same skill library. ## Step 0: Detect Primary Runtime Read `.marketing-os.yml` in the repo root. The `primary_runtime` field (`claude` or `codex`) determines sync direction: - **claude** (default): `.claude/skills/` → `.agents/skills/` - **codex**: `.agents/skills/` → `.claude/skills/` If `.marketing-os.yml` doesn't exist or has no `primary_runtime`, default to `claude`. Set `SRC` and `DST` based on the primary: ```bash CONFIG=".marketing-os.yml" PRIMARY="claude" if [ -f "$CONFIG" ]; then PRIMARY=$(grep 'primary_runtime:' "$CONFIG" | awk '{print $2}' | tr -d '"'"'" || echo "claude") fi if [ "$PRIMARY" = "codex" ]; then SRC=".agents/skills" DST=".claude/skills" else SRC=".claude/skills" DST=".agents/skills" fi ``` ## Step 1: Ask Scope Ask the user which sync to run: - **Project** — Sync `$SRC/` → `$DST/` in the current repo using hardlinks - **User** — Sync user-level skills using copies with marker files - **Both** — Run both syncs If invoked from `/start`, default to **Project** without prompting. ## Step 2: Run the Sync ### Project-Level Sync Hardlinks keep both paths pointing to the same file on disk, so edits in either location are instant. New or renamed skills need a re-sync. ```bash mkdir -p "$DST" # Add/update: link any file in SRC that's missing or has a different inode in DST # Exclude sync-skills itself — it's runtime-specific, not useful in the seco