skills/xcode-sync/SKILL.md
Xcode fleet sync: signed archives, compatibility, install, selection, first launch.
npx skillsauth add steipete/agent-scripts xcode-syncInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Synchronize exact Xcode builds across Peter's supported Macs. Use $remote-mac for fleet topology and SSH rules.
~/Projects/manager/computers.yaml; use live tailscale status --json for reachability/IPs.hostname, user, macOS, architecture, and hardware UUID before writes.scripts/xcode-host-inventory.sh locally or remotely:skills/xcode-sync/scripts/xcode-host-inventory.sh
ssh -o RequestTTY=no -o RemoteCommand=none HOST 'bash -s' \
< skills/xcode-sync/scripts/xcode-host-inventory.sh
Treat unreachable hosts as pending, not synchronized. Try live Tailscale IP, Tailscale SSH, then mDNS/LAN only when network topology permits.
Prefer the user's downloaded .xip; do not redownload it.
pkgutil --check-signature "$archive"
shasum -a 256 "$archive"
stage=$(mktemp -d /tmp/xcode.XXXXXX)
cleanup() { rm -rf "$stage"; }
trap cleanup EXIT
(cd "$stage" && xip --expand "$archive")
set -- "$stage"/Xcode*.app
[[ $# == 1 && -d "$1" ]]
app=$1
plutil -extract CFBundleShortVersionString raw -o - "$app/Contents/Info.plist"
plutil -extract ProductBuildVersion raw -o - "$app/Contents/version.plist"
plutil -extract LSMinimumSystemVersion raw -o - "$app/Contents/Info.plist"
DEVELOPER_DIR="$app/Contents/Developer" xcodebuild -version
cleanup
trap - EXIT
Require Apple Software signature. Compare ProductBuildVersion, not version label alone: two archives named Xcode 26.6 may contain different builds. Do not use DTXcodeBuild as the sync key; it can differ from the build reported by xcodebuild -version.
LSMinimumSystemVersion.Never change a host OS to make an Xcode build eligible unless explicitly requested.
rsync -a --partial --progress -e 'ssh -o RequestTTY=no -o RemoteCommand=none' \
"$archive" HOST:Downloads/
ssh HOST 'bash -s'; never let the local shell expand remote $variables or $(commands)./Applications/Xcode.app/Applications/Xcode-beta.app/Applications/Xcode-previous.app, only for three months after a new stable major ships unless the user sets another windowXcode-previous.app to a temporary rollback path, move the former stable to Xcode-previous.app, install and verify the new stable, then delete the older rollback copy. Restore both channel paths on failure. Record the new previous-major removal date in the task report.xcode-select unless the user requests a switch. Replacing the app at the already-selected path preserves selection.Use writable /Applications directly. Otherwise use passwordless sudo -n; if admin approval is required, show a local macOS authorization prompt or report the exact pending step. Do not bypass receipts or license state.
For every installed app:
DEVELOPER_DIR="$app/Contents/Developer" xcodebuild -version
codesign --verify --deep --strict "$app"
DEVELOPER_DIR="$app/Contents/Developer" xcodebuild -checkFirstLaunchStatus
If first-launch status is nonzero:
sudo env DEVELOPER_DIR="$app/Contents/Developer" xcodebuild -license accept
sudo env DEVELOPER_DIR="$app/Contents/Developer" xcodebuild -runFirstLaunch
Recheck until status 0. If sudo/admin UI is unavailable, the app is installed but not ready; report that distinction.
Finish with a host matrix: macOS, desired version/build, installed path, selected path, signature, first-launch state, previous-major removal date, and skip/failure reason. Keep source archives unless deletion is explicitly requested.
tools
Claude Code-only work routing: delegate implementation, fixing, exploratory subagents, rebasing, and PR merging/landing to Codex CLI while Claude specifies, decides, reviews, and verifies. Direct hands-on delegation requires ANTHROPIC_BASE_URL to be unset or neither loopback nor gorillaclaw.sheep-coho.ts.net. Codex-backed autoreview is always allowed and preferred, independent of environment.
development
Codex 1M context: direct OpenAI Responses API inference, safe Sol/Terra/Luna input headroom, Keychain delivery, and Mac fleet rollout.
data-ai
Remote Macs: MacBook, Mac Studio, clawmac, megaclaw, Tailscale, SSH, OpenClaw.
development
REQUIRED before ANY `op` command or whenever a task needs an API key, token, password, credential, or secret (OPENAI_API_KEY, ANTHROPIC_API_KEY, deploy tokens, live-test keys). Prompt-free 1Password service-account reads; wrong invocations spam macOS dialogs.