agentleFS
t0ddharrist0ddharris/claude-code-skills/.claude/skills/sync-skills/SKILL.md

sync-skills

Skill2 starsChanged 5 months agoMITView on GitHub

Sync Claude Code skills to Codex. Handles project-level (.claude/skills → .agents/skills) and user-level (~/.claude/skills → ~/.codex/skills). Trigger with /sync-skills or when the user mentions 'sync skills,' 'codex skills,' or 'sync to codex.'

  • Deletes or force-pushes

26 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use explain, create-skill and 4 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • sunnyclinches44Skill

    explain

    Explains code using real-world analogies and ASCII diagrams

    Also in 4 projects that use this

  • ElasticSkill

    create-skill

    Interactively create a new Claude Code skill and add it to the elastic-docs-skills catalog. Use when the user wants to generate a new skill, scaffold a slash command, or build automation for docs tasks.

    Also in 3 projects that use this

  • SentrySkill

    commit

    Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.

    Also in 4 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 4 projects that use this

  • NVIDIASkill

    research

    Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.

    Also in 3 projects that use this

  • GoogleSkill

    grill-me

    A relentless interview to sharpen a plan or design.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 22 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask the user which sync to run:

    line 13
  2. Distinctive:

    If invoked from a session-start skill, default to Project without prompting.

    line 19
  3. Very specific:

    Never delete manual Codex skills (those without .synced-from-claude marker)

    line 129
  4. Distinctive:

    Never delete orphaned skills automatically — only flag them

    line 130
  5. Distinctive:

    Use hardlinks for project-level (same filesystem, zero disk cost)

    line 131
  6. Distinctive:

    Use copies for user-level (may be different filesystems)

    line 132
  7. Very specific:

    Never sync the sync-skills skill itself — it's Claude-only and not useful in Codex

    line 135

“Common” is measured: kept by at least 6 in 10 of the 22 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Sync Skills

Synchronize Claude Code skills to Codex so both tools share the same skill library.

Step 1: Ask Scope

Ask the user which sync to run:

  • Project — Sync .claude/skills/ → .agents/skills/ in the current repo using hardlinks
  • User — Sync ~/.claude/skills/ → ~/.codex/skills/ using copies with marker files
  • Both — Run both syncs

If invoked from a session-start skill, 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.

Detect the platform first to use the correct stat command for inode comparison:

if stat -f %i / >/dev/null 2>&1; then
  inode_of() { stat -f %i "$1"; }
else
  inode_of() { stat -c %i "$1"; }
fi

Then sync:

SRC=".claude/skills"
DST=".agents/skills"

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 a Claude-only skill, not useful in Codex
cd "$SRC"
find . -type f -not -path './sync-skills/*' | while read -r f; do
  dst_file="$DST/$f"
  if [ ! -f "$dst_file" ] || [ "$(inode_of "$SRC/$f")" != "$(inode_of "$dst_file")" ]; then
    mkdir -p "$(dirname "$dst_file")"
    rm -f "$dst_file"
    ln "$SRC/$f" "$dst_file"
  fi
done

# Remove: delete anything in DST that no longer exists in SRC
cd "$DST"
find . -type f | while read -r f; do
  [ ! -f "$SRC/$f" ] && rm -f "$DST/$f"
done

# Clean up empty directories
find "$DST" -type d -empty -delete 2>/dev/null

Report what was added (+) or removed (-). If nothing changed, say so in one line.

User-Level Sync

Copies skills from ~/.claude/skills/ to ~/.codex/skills/. Uses a .synced-from-claude marker file inside each synced skill directory to track provenance. Marker file approach borrowed from ariccb/sync-claude-skills-to-codex.

SRC="$HOME/.claude/skills"
DST="$HOME/.codex/skills"
MARKER=".synced-from-claude"

mkdir -p "$DST"

for skill_dir in "$SRC"/*/; do
  [ -f "${skill_dir}SKILL.md" ] || continue
  skill_name=$(basename "$skill_dir")
  # Skip hidden directories
  case "$skill_name" in .*) continue ;; esac
  # Skip symlinked SKILL.md files — these are managed by their installer (e.g. gstack)
  [ -L "${skill_dir}SKILL.md" ] && continue

  target="$DST/$skill_name"

  # If target exists without marker, it's a manual Codex skill — don't overwrite
  if [ -d "$target" ] && [ ! -f "$target/$MARKER" ]; then
    echo "SKIP: $skill_name (manual Codex skill)"
    continue
  fi

  # Copy and mark
  rm -rf "$target"
  cp -r "${skill_dir%/}" "$target"
  echo "$skill_dir" > "$target/$MARKER"
  echo "SYNC: $skill_name"
done

# Report any skills in DST with markers whose source no longer exists
for target in "$DST"/*/; do
  [ -f "${target}$MARKER" ] || continue
  skill_name=$(basename "$target")
  [ ! -d "$SRC/$skill_name" ] && echo "ORPHAN: $skill_name (source removed from Claude)"
done

Report what was synced, skipped (manual), and any orphans. Do NOT auto-delete orphans — flag them and let the user decide.

Step 3: Summary

Show a short summary:

## Skills Sync Complete

### Project (.claude/skills → .agents/skills)
[X added, Y removed, Z unchanged]

### User (~/.claude/skills → ~/.codex/skills)
[X synced, Y skipped (manual), Z orphans]

Rules

  • Never delete manual Codex skills (those without .synced-from-claude marker)
  • Never delete orphaned skills automatically — only flag them
  • Use hardlinks for project-level (same filesystem, zero disk cost)
  • Use copies for user-level (may be different filesystems)
  • The .synced-from-claude marker contains the source path for traceability
  • Skip symlinked SKILL.md files in user-level sync — these are managed by their own installer (e.g. gstack's ./setup --host codex)
  • Never sync the sync-skills skill itself — it's Claude-only and not useful in Codex
  • Preview before mutating when the user asks for a dry run: report what would be added/removed (the same +/- summary) without running the ln/rm/cp operations, then wait for confirmation

Learnings

<!-- Updated by /reflect. Promote stable patterns to the main skill body. -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.