| 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. |
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 exportThen 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"
doneAfter 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.