Files
claude-plugins/bin/export-apple-skills.sh
TomUviandClaude Opus 5 905ad2ce3e Start a plugin marketplace for Apple platform work
Skills have been living inside one app's repository, which means the next
Xcode project starts without them and a copy is the only way to share.
A marketplace makes them installable once at user scope.

Two kinds of knowledge, handled differently. What Apple ships with Xcode
stays Apple's: this repository carries a script that exports it from the
locally installed Xcode rather than a copy, so nobody redistributes
pre-release material and everyone's guidance matches their own SDK.

What we learned by shipping goes in the skill, and only if it burned us —
the file writes hidden in view bodies, the blobs that froze the main
thread, the watch target that quietly stopped compiling, the test summary
that reads as zero tests when eighty-four passed. Each of those cost real
time twice before being written down.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-16 23:07:08 +02:00

38 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
# Export the skills that ship inside Xcode into a project.
#
# They are Apple's material, not ours, so this repository does not carry a
# copy — everyone exports them from the Xcode they actually have, which
# also means the guidance matches the SDK they are building against.
#
# Usage: bin/export-apple-skills.sh [target-directory] [path-to-Xcode.app]
#
# Requires Xcode to be running; without it mcpbridge waits forever.
set -eu
TARGET="${1:-.claude/skills}"
XCODE="${2:-/Applications/Xcode.app}"
BRIDGE="$XCODE/Contents/Developer/usr/bin/mcpbridge"
if [ ! -x "$BRIDGE" ]; then
echo "mcpbridge not found at $BRIDGE" >&2
echo "Pass the path to your Xcode as the second argument." >&2
echo "Xcode 26.4 and later ship it; on older versions there is nothing to export." >&2
exit 1
fi
if ! pgrep -qx Xcode; then
echo "Xcode does not appear to be running — the export will hang." >&2
echo "Open it, then run this again." >&2
exit 1
fi
mkdir -p "$TARGET"
"$BRIDGE" run-agent skills export "$TARGET"
echo
echo "Exported to $TARGET"
echo "Keep only the ones that apply to the project; the rest just take up context."
echo "Re-run this after an Xcode update — the exported files describe that SDK."