Skip to content

Instantly share code, notes, and snippets.

@modemlooper
Last active August 28, 2026 18:29
Show Gist options
  • Select an option

  • Save modemlooper/809264f556fe0e138530fac2afacb115 to your computer and use it in GitHub Desktop.

Select an option

Save modemlooper/809264f556fe0e138530fac2afacb115 to your computer and use it in GitHub Desktop.
symlink Xcode skills into claude skills
name sync-xcode-skills
description Sync the xcode-skills symlinks in .claude/skills/ with the source folder at ~/xcode-skills — adds symlinks for new skill folders, removes symlinks whose source no longer exists. Use whenever the user asks to sync, update, refresh, or re-link xcode-skills, or mentions adding/removing skills from that source folder.

Sync xcode-skills

The skills under .claude/skills/ for this project include symlinks pointing into ~/xcode-skills/<skill-name>/. Editing files inside an existing skill folder needs no sync — the symlink already reflects live content. Sync is only needed when a skill folder is added or removed from the source directory.

First, re-export the skills from Xcode so $HOME/xcode-skills has the latest content. xcrun agent skills export writes to <cwd>/xcode-skills, so cd ~ first regardless of where this skill was invoked from:

cd ~ && DEVELOPER_DIR=/Applications/Xcode-27.0.0-Beta.6.app/Contents/Developer xcrun agent skills export

Then sync the symlinks. Run this from the project root (adjust DEST if invoked from elsewhere):

SRC="$HOME/xcode-skills"
DEST=./.claude/skills
for l in "$DEST"/*; do
  [ -L "$l" ] && [[ "$(readlink "$l")" == "$SRC"/* ]] && [ ! -e "$l" ] && rm "$l"
done
for d in "$SRC"/*/; do
  n=$(basename "$d")
  [ -e "$DEST/$n" ] || ln -s "$d" "$DEST/$n"
done

After running, tell the user that newly added skills won't appear in the current conversation's skill list — skills load once per session, so a new conversation is needed to see them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment