[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JK1DJGEH0Y48A8NJYYX41D":3,"skill-same:01M6JK1DJGEH0Y48A8NJYYX41D":162},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":53,"install":54,"resources":67},"01M6JK1DJGEH0Y48A8NJYYX41D","apple-xcodebuild",null,"Scaffold, build, test, run and screenshot iOS, iPadOS and macOS apps from a Linux container by driving xcodebuild on a macOS host over SSH. Handles single-platform and cross-platform (one multiplatform target) XcodeGen projects. Use for any Apple-platform app work where the Xcode IDE is not available — new projects, CI-style builds, running on a simulator or the Mac, or diagnosing why the Mac cannot build.","jeffersonjhunt\u002Fcode-monkeys","jeffersonjhunt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2308584?v=4","01M6JK0Z7Y76REMWVB4JM2CQN9","Jefferson J Hunt","01M6JK0ZD5DFCQW66H6P76JGMG",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"apple xcodebuild","apple","build","for","style","apps","host","app","platform","xcode","linux","mac","container","use","work","projects","ide","ios","ci","test","2026-11-10 10:12:30",false,"---\nname: apple-xcodebuild\ndescription: Scaffold, build, test, run and screenshot iOS, iPadOS and macOS apps from a Linux container by driving xcodebuild on a macOS host over SSH. Handles single-platform and cross-platform (one multiplatform target) XcodeGen projects. Use for any Apple-platform app work where the Xcode IDE is not available — new projects, CI-style builds, running on a simulator or the Mac, or diagnosing why the Mac cannot build.\nlicense: Apache-2.0\nmetadata:\n  author: ooe\n  version: \"1.3.1\"\n---\n\n# apple-xcodebuild\n\nBuild Apple-platform apps without opening Xcode. You edit in the container; compiling, signing,\nsimulators and launching happen on the Mac over SSH. The project folder is shared, so the Mac sees\nevery edit immediately and build logs land back in the project.\n\n```\nContainer (Linux)                SSH (bash -s)               macOS host\n├── edit sources                 ───────────────▶           ├── xcodegen (cached)\n├── xc-*.py (this skill)                                     ├── xcodebuild build \u002F test\n└── read build\u002Flogs, build\u002Fxc    ◀─── shared folder ───▶    ├── xcrun simctl · open\n                                                             └── Simulator.app · the app\n```\n\n**Or run the scripts on the Mac itself**, for a project that lives only on that Mac (see\n[Projects that live on the Mac](#projects-that-live-on-the-mac)): same scripts, same flags, no\nshared folder.\n\nReplaces `ios-xcodebuild` (removed 2026-09-27: iOS only, and it reported failed builds as successes).\n\n## Quick start\n\n```bash\nX=~\u002F.claude\u002Fskills\u002Fapple-xcodebuild\u002Fscripts\n\npython3 $X\u002Fxc-doctor.py --no-project          # is the Mac ready? (run this first, always)\npython3 $X\u002Fxc-bootstrap.py Demo --bundle-id com.example.demo    # iOS + macOS by default\ncd Demo\npython3 $X\u002Fxc-build.py                        # every platform the scheme supports\npython3 $X\u002Fxc-test.py                         # scheme tests on each platform\npython3 $X\u002Fxc-run.py --platform ios-sim       # or --platform macos\npython3 $X\u002Fxc-shot.py                         # screenshot → build\u002Fshots\u002F (or --platform macos)\npython3 $X\u002Fxc-run.py --platform ios-sim --stop\n```\n\nEvery script prints **JSON on stdout** (`\"ok\": true|false`) and progress on stderr, and exits\n**0** ok · **1** build\u002Ftest\u002Fuser failure · **2** environment problem (Mac unreachable, no path\nmapping, unsupported). All take `--help` and `--project-dir` (default: `.`, searched upward).\n\n## Scripts\n\n| Script | Does |\n|---|---|\n| `xc-doctor.py` | Checks SSH, `xcode-select`, first-launch components, SDKs, simulators, that the project is visible on the Mac, the XcodeGen cache, the Screen Recording grant macOS screenshots need, Automation Mode for macOS UI tests, that the Mac's desktop session is unlocked and its screen saver off (UI tests need both), and — for macOS projects that sign with an identity — that codesigning actually works over SSH. Every non-ok check carries a `fix`. |\n| `xc-bootstrap.py \u003CApp>` | Scaffolds an XcodeGen project: one app target for `--platforms ios,macos` (either or both), Swift 6, generated Info.plist, asset catalog, Swift Testing target, `.gitignore`, pinned `.xcodegen-version`. Scaffolds into an existing dir (e.g. a fresh repo) only if nothing would be overwritten; extends an existing `.gitignore`. |\n| `xc-build.py` | Regenerates the project from `project.yml`, builds `--platform ios-sim\\|ios-device\\|macos\\|all` in `--config debug\\|release`. Full log in `build\u002Flogs\u002F`; the built app's path and bundle id (from the build settings) in `build\u002Fxc\u002Fbuild-\u003Cplatform>.json`. `--setting KEY=VALUE` passes extra build settings; `--adhoc` forces ad-hoc macOS signing. |\n| `xc-test.py` | `xcodebuild test` per platform (a concrete simulator for iOS) with counts read from the `.xcresult`; `--package DIR` runs `swift test` for a local package — with `--packages-only` no Xcode project is needed (logs go to the package's `.build\u002Fxc\u002Flogs`). **Zero tests is a failure**, and so is a run whose counts cannot be read. Takes the same `--setting` and `--adhoc` as `xc-build`. |\n| `xc-run.py --platform ios-sim\\|macos` | Launches the *recorded* app. Simulator: boot, wait for boot, install, launch. Mac: `open` (LaunchServices). Re-checks the process after `--settle` s so a crash-on-launch fails. `--logs N` captures N s of the app's log; `--stop` terminates it. |\n| `xc-shot.py` | iOS: the booted simulator's screen (status bar pinned to 9:41; `--appearance dark` for the shot, then restored). macOS: **only the app's own window**, never the rest of the desktop — needs the Screen Recording grant below. |\n\n## Configuration\n\n| Setting | Source (first wins) |\n|---|---|\n| Mac address | `XC_HOST`, `HOST_IP`, default `host.docker.internal` |\n| Mac user | `XC_HOST_USER`, `HOST_USER`, else the user in `HOST_WORKSPACE` (`\u002FUsers\u002F\u003Cuser>\u002F…`) |\n| Container → Mac paths | `HOST_PROJECT_PATH` + `HOST_PROJECT_ROOT`, else the container's `hostpath` helper |\n| XcodeGen version | project's `.xcodegen-version` (`2.45.4`, or `\u003Cversion>@\u003Ccommit>` for versions the skill does not know), default 2.45.4 — always verified against a pinned commit |\n| macOS signing | `--adhoc`; else `.signid` (named identity, manual); else team (`--team`, `TEAM_ID`, `.devteam`); else ad-hoc |\n| Device signing | team required (`--team`, `TEAM_ID`, `.devteam`) |\n| Changing a Mac app's signer | refused: `xc-build`\u002F`xc-test` check how the app already on the Mac is signed and stop if this run would change it (macOS would ask on the Mac's screen). `--allow-signer-change` to switch on purpose |\n| Signing over SSH | the Mac's `api.env` (`ASC_ENV`, else `$HOME\u002F.config\u002Fappstoreconnect\u002Fapi.env` on the Mac): a signing keychain unlocked in the build's own session, and an App Store Connect API key — see signing-and-tcc.md › A signing keychain for SSH |\n| Where commands run | on a Mac: right there (unless `XC_HOST` or `HOST_IP` names another Mac); elsewhere: over SSH. `XC_LOCAL=1`\u002F`0` forces it |\n\nFrom a container, the project must live in a host-shared directory (e.g. `~\u002Fworkspace`) —\n`xc-doctor` checks it.\n\n## Projects that live on the Mac\n\nWhen the project is cloned on the Mac and not shared with the container (a build Mac on the\nnetwork, say), run the scripts **on the Mac** — they notice they are on macOS, run every command\nlocally and take paths as they are. Only the path differs:\n\n```bash\nMAC=jhunt@mighty-mouse.tworivers\nX=\u002FUsers\u002Fjhunt\u002FSource\u002FEdda\u002Fcode-monkeys\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fscripts   # the Mac's code-monkeys clone\nP=\u002FUsers\u002Fjhunt\u002FSource\u002FEdda\u002Fsolitaire                                          # the project on the Mac\nssh $MAC \"python3 $X\u002Fxc-doctor.py --project-dir $P\"\nssh $MAC \"python3 $X\u002Fxc-build.py  --project-dir $P --adhoc\"\nssh $MAC \"python3 $X\u002Fxc-test.py   --project-dir $P --adhoc\"\n```\n\n- The skill comes from the Mac's own code-monkeys clone — `git pull` there to update it. It needs\n  only the Mac's stock `python3` (3.9) and standard library.\n- Logs, results and screenshots stay in the project's `build\u002F` on the Mac, and the JSON names Mac\n  paths. To look at a screenshot from the container, copy just that file back\n  (`scp $MAC:\u003Cfile> \u003Cscratch dir>`); never sync the project itself.\n- Edit, commit and push on the Mac too (over SSH): the Mac's clone is the working copy.\n- Signing is still over SSH: the login keychain's keys are unusable there, so build the Mac app\n  with `--adhoc`.\n\n## One-time Mac setup\n\n```bash\nssh-keyscan -H host.docker.internal >> ~\u002F.ssh\u002Fknown_hosts   # in the container; host key checks stay ON\n# on the Mac (needs your password):\nsudo xcodebuild -runFirstLaunch          # system components matching this Xcode\nxcodebuild -downloadPlatform iOS         # simulator runtime (~8 GB), creates default simulators\n```\n\nFor macOS screenshots only: System Settings ▸ Privacy & Security ▸ Screen & System Audio Recording ▸\nenable **sshd-keygen-wrapper** (`\u002Fusr\u002Flibexec\u002Fsshd-keygen-wrapper`, the SSH server; add it with +).\nWithout it the window server hides other apps' windows from SSH sessions. Note this lets *any* SSH\nsession to your account record the screen.\n\nXcodeGen needs no setup: the first build clones the pinned version, checks the clone is at the\npinned commit (a moved tag is refused, never built), and compiles it into\n`~\u002FLibrary\u002FCaches\u002Fapple-xcodebuild\u002Fxcodegen\u002F\u003Cversion>-\u003Ccommit>\u002F` on the Mac (~1 min), shared by\nall projects.\n\n## macOS UI tests (XCUITest)\n\nUI tests run on both platforms through `xc-test.py`, but macOS 27 needs four things (each cost a real\ndebugging session):\n\n1. **Click, don't tap.** On macOS 27 `XCUIElement.tap()` no longer reaches controls (\"Synthesize\n   event\" takes ~5 s and nothing happens). Use `click()` on macOS, `tap()` elsewhere — a small\n   `press()` \u002F `drag(to:)` extension with `#if os(macOS)` keeps tests cross-platform.\n2. **Pass test setup in `launchEnvironment`, not `launchArguments`.** macOS treats unknown\n   command-line arguments as files to open, and an app launched to \"open a file\" skips its first\n   window — the test then finds a menu bar and no UI.\n3. **Launch with `-ApplePersistenceIgnoreState YES`.** A run that quit with no window open saves\n   \"no windows\", and XCUITest's launch (unlike Finder or the Dock) doesn't send the event that\n   would open one anyway.\n4. **Automation Mode without a prompt.** Once, on the Mac:\n   `sudo automationmodetool enable-automationmode-without-authentication` — otherwise every run\n   asks for Touch ID \u002F an Apple Watch and fails unattended. `xc-doctor` checks it.\n5. **Nobody using the Mac during the run.** While someone is working on the Mac, macOS 27 won't\n   let the test runner pull the app to the front: a test waits 60 s and fails \"Failed to activate\n   application … (current state: Running Background)\", often only the first few of a run. Rerun\n   with the Mac idle before suspecting the code.\n6. **An awake, unlocked desktop session.** While the display sleeps the session reads as locked,\n   and *every* UI test fails the same way. `xc-test` wakes the display before macOS tests and holds\n   it on (`caffeinate -d`) until they finish. A real password lock it cannot open: on a build Mac\n   set System Settings ▸ Lock Screen ▸ \"Require password after screen saver begins or display is\n   turned off\" to **Never**. `xc-doctor` reports it (`screen-lock`), and `xc-test` refuses macOS\n   tests up front on a password-locked screen or with nobody logged in at the desktop, instead of\n   spending 60 s per test (`--allow-locked` for schemes without UI tests). Waking is not always\n   enough: on a Mac Studio with an external display, macOS turned the display off again 12 s after\n   the wake, despite `caffeinate`, and the whole run failed. **On a build Mac, also set \"Turn\n   display off … when inactive\" to Never** (System Settings ▸ Lock Screen). **And the screen saver\n   to Never** (\"Start Screen Saver when inactive\"): on macOS 27 it runs inside loginwindow, the\n   session reads as locked while it shows (password or not), and only real input dismisses it —\n   `xc-test` says so rather than retrying, and `xc-doctor` warns (`screen-saver`) while it is on.\n\nNo Accessibility (Device Control & Data Access) grant is needed for any of this.\n\n## Limits\n\n- **Identity signing over SSH** — the login keychain's private keys are unusable from SSH\n  (`errSecInternalComponent`). Build with `--adhoc`, or give the Mac a signing keychain and API\n  key (`api.env`, signing-and-tcc.md) — then identity\u002Fteam builds sign over SSH; `xc-doctor`\n  checks whichever applies.\n- **Physical devices** — `--platform ios-device` builds; installing\u002Flaunching on hardware is not\n  automated.\n- **Timeouts** stop the local `ssh` only; a remote `xcodebuild` keeps running until it finishes.\n- Logs (`build\u002Flogs\u002F`) and result bundles (`build\u002Fxc\u002Fresults\u002F`) keep the newest 10 of each kind.\n\n## References\n\n- `references\u002Fxcodebuild-cheatsheet.md` — raw commands for everything the scripts do\n- `references\u002Fxcodegen-multiplatform.md` — the `project.yml` shape, and the TEST_HOST trap\n- `references\u002Fsigning-and-tcc.md` — signing precedence, the SSH keychain problem, TCC grants\n- `references\u002Ftroubleshooting.md` — symptom → cause → fix, from real sessions\n","# apple-xcodebuild\n\nBuild Apple-platform apps without opening Xcode. You edit in the container; compiling, signing,\nsimulators and launching happen on the Mac over SSH. The project folder is shared, so the Mac sees\nevery edit immediately and build logs land back in the project.\n\n```\nContainer (Linux)                SSH (bash -s)               macOS host\n├── edit sources                 ───────────────▶           ├── xcodegen (cached)\n├── xc-*.py (this skill)                                     ├── xcodebuild build \u002F test\n└── read build\u002Flogs, build\u002Fxc    ◀─── shared folder ───▶    ├── xcrun simctl · open\n                                                             └── Simulator.app · the app\n```\n\n**Or run the scripts on the Mac itself**, for a project that lives only on that Mac (see\n[Projects that live on the Mac](#projects-that-live-on-the-mac)): same scripts, same flags, no\nshared folder.\n\nReplaces `ios-xcodebuild` (removed 2026-09-27: iOS only, and it reported failed builds as successes).\n\n## Quick start\n\n```bash\nX=~\u002F.claude\u002Fskills\u002Fapple-xcodebuild\u002Fscripts\n\npython3 $X\u002Fxc-doctor.py --no-project          # is the Mac ready? (run this first, always)\npython3 $X\u002Fxc-bootstrap.py Demo --bundle-id com.example.demo    # iOS + macOS by default\ncd Demo\npython3 $X\u002Fxc-build.py                        # every platform the scheme supports\npython3 $X\u002Fxc-test.py                         # scheme tests on each platform\npython3 $X\u002Fxc-run.py --platform ios-sim       # or --platform macos\npython3 $X\u002Fxc-shot.py                         # screenshot → build\u002Fshots\u002F (or --platform macos)\npython3 $X\u002Fxc-run.py --platform ios-sim --stop\n```\n\nEvery script prints **JSON on stdout** (`\"ok\": true|false`) and progress on stderr, and exits\n**0** ok · **1** build\u002Ftest\u002Fuser failure · **2** environment problem (Mac unreachable, no path\nmapping, unsupported). All take `--help` and `--project-dir` (default: `.`, searched upward).\n\n## Scripts\n\n| Script | Does |\n|---|---|\n| `xc-doctor.py` | Checks SSH, `xcode-select`, first-launch components, SDKs, simulators, that the project is visible on the Mac, the XcodeGen cache, the Screen Recording grant macOS screenshots need, Automation Mode for macOS UI tests, that the Mac's desktop session is unlocked and its screen saver off (UI tests need both), and — for macOS projects that sign with an identity — that codesigning actually works over SSH. Every non-ok check carries a `fix`. |\n| `xc-bootstrap.py \u003CApp>` | Scaffolds an XcodeGen project: one app target for `--platforms ios,macos` (either or both), Swift 6, generated Info.plist, asset catalog, Swift Testing target, `.gitignore`, pinned `.xcodegen-version`. Scaffolds into an existing dir (e.g. a fresh repo) only if nothing would be overwritten; extends an existing `.gitignore`. |\n| `xc-build.py` | Regenerates the project from `project.yml`, builds `--platform ios-sim\\|ios-device\\|macos\\|all` in `--config debug\\|release`. Full log in `build\u002Flogs\u002F`; the built app's path and bundle id (from the build settings) in `build\u002Fxc\u002Fbuild-\u003Cplatform>.json`. `--setting KEY=VALUE` passes extra build settings; `--adhoc` forces ad-hoc macOS signing. |\n| `xc-test.py` | `xcodebuild test` per platform (a concrete simulator for iOS) with counts read from the `.xcresult`; `--package DIR` runs `swift test` for a local package — with `--packages-only` no Xcode project is needed (logs go to the package's `.build\u002Fxc\u002Flogs`). **Zero tests is a failure**, and so is a run whose counts cannot be read. Takes the same `--setting` and `--adhoc` as `xc-build`. |\n| `xc-run.py --platform ios-sim\\|macos` | Launches the *recorded* app. Simulator: boot, wait for boot, install, launch. Mac: `open` (LaunchServices). Re-checks the process after `--settle` s so a crash-on-launch fails. `--logs N` captures N s of the app's log; `--stop` terminates it. |\n| `xc-shot.py` | iOS: the booted simulator's screen (status bar pinned to 9:41; `--appearance dark` for the shot, then restored). macOS: **only the app's own window**, never the rest of the desktop — needs the Screen Recording grant below. |\n\n## Configuration\n\n| Setting | Source (first wins) |\n|---|---|\n| Mac address | `XC_HOST`, `HOST_IP`, default `host.docker.internal` |\n| Mac user | `XC_HOST_USER`, `HOST_USER`, else the user in `HOST_WORKSPACE` (`\u002FUsers\u002F\u003Cuser>\u002F…`) |\n| Container → Mac paths | `HOST_PROJECT_PATH` + `HOST_PROJECT_ROOT`, else the container's `hostpath` helper |\n| XcodeGen version | project's `.xcodegen-version` (`2.45.4`, or `\u003Cversion>@\u003Ccommit>` for versions the skill does not know), default 2.45.4 — always verified against a pinned commit |\n| macOS signing | `--adhoc`; else `.signid` (named identity, manual); else team (`--team`, `TEAM_ID`, `.devteam`); else ad-hoc |\n| Device signing | team required (`--team`, `TEAM_ID`, `.devteam`) |\n| Changing a Mac app's signer | refused: `xc-build`\u002F`xc-test` check how the app already on the Mac is signed and stop if this run would change it (macOS would ask on the Mac's screen). `--allow-signer-change` to switch on purpose |\n| Signing over SSH | the Mac's `api.env` (`ASC_ENV`, else `$HOME\u002F.config\u002Fappstoreconnect\u002Fapi.env` on the Mac): a signing keychain unlocked in the build's own session, and an App Store Connect API key — see signing-and-tcc.md › A signing keychain for SSH |\n| Where commands run | on a Mac: right there (unless `XC_HOST` or `HOST_IP` names another Mac); elsewhere: over SSH. `XC_LOCAL=1`\u002F`0` forces it |\n\nFrom a container, the project must live in a host-shared directory (e.g. `~\u002Fworkspace`) —\n`xc-doctor` checks it.\n\n## Projects that live on the Mac\n\nWhen the project is cloned on the Mac and not shared with the container (a build Mac on the\nnetwork, say), run the scripts **on the Mac** — they notice they are on macOS, run every command\nlocally and take paths as they are. Only the path differs:\n\n```bash\nMAC=jhunt@mighty-mouse.tworivers\nX=\u002FUsers\u002Fjhunt\u002FSource\u002FEdda\u002Fcode-monkeys\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fscripts   # the Mac's code-monkeys clone\nP=\u002FUsers\u002Fjhunt\u002FSource\u002FEdda\u002Fsolitaire                                          # the project on the Mac\nssh $MAC \"python3 $X\u002Fxc-doctor.py --project-dir $P\"\nssh $MAC \"python3 $X\u002Fxc-build.py  --project-dir $P --adhoc\"\nssh $MAC \"python3 $X\u002Fxc-test.py   --project-dir $P --adhoc\"\n```\n\n- The skill comes from the Mac's own code-monkeys clone — `git pull` there to update it. It needs\n  only the Mac's stock `python3` (3.9) and standard library.\n- Logs, results and screenshots stay in the project's `build\u002F` on the Mac, and the JSON names Mac\n  paths. To look at a screenshot from the container, copy just that file back\n  (`scp $MAC:\u003Cfile> \u003Cscratch dir>`); never sync the project itself.\n- Edit, commit and push on the Mac too (over SSH): the Mac's clone is the working copy.\n- Signing is still over SSH: the login keychain's keys are unusable there, so build the Mac app\n  with `--adhoc`.\n\n## One-time Mac setup\n\n```bash\nssh-keyscan -H host.docker.internal >> ~\u002F.ssh\u002Fknown_hosts   # in the container; host key checks stay ON\n# on the Mac (needs your password):\nsudo xcodebuild -runFirstLaunch          # system components matching this Xcode\nxcodebuild -downloadPlatform iOS         # simulator runtime (~8 GB), creates default simulators\n```\n\nFor macOS screenshots only: System Settings ▸ Privacy & Security ▸ Screen & System Audio Recording ▸\nenable **sshd-keygen-wrapper** (`\u002Fusr\u002Flibexec\u002Fsshd-keygen-wrapper`, the SSH server; add it with +).\nWithout it the window server hides other apps' windows from SSH sessions. Note this lets *any* SSH\nsession to your account record the screen.\n\nXcodeGen needs no setup: the first build clones the pinned version, checks the clone is at the\npinned commit (a moved tag is refused, never built), and compiles it into\n`~\u002FLibrary\u002FCaches\u002Fapple-xcodebuild\u002Fxcodegen\u002F\u003Cversion>-\u003Ccommit>\u002F` on the Mac (~1 min), shared by\nall projects.\n\n## macOS UI tests (XCUITest)\n\nUI tests run on both platforms through `xc-test.py`, but macOS 27 needs four things (each cost a real\ndebugging session):\n\n1. **Click, don't tap.** On macOS 27 `XCUIElement.tap()` no longer reaches controls (\"Synthesize\n   event\" takes ~5 s and nothing happens). Use `click()` on macOS, `tap()` elsewhere — a small\n   `press()` \u002F `drag(to:)` extension with `#if os(macOS)` keeps tests cross-platform.\n2. **Pass test setup in `launchEnvironment`, not `launchArguments`.** macOS treats unknown\n   command-line arguments as files to open, and an app launched to \"open a file\" skips its first\n   window — the test then finds a menu bar and no UI.\n3. **Launch with `-ApplePersistenceIgnoreState YES`.** A run that quit with no window open saves\n   \"no windows\", and XCUITest's launch (unlike Finder or the Dock) doesn't send the event that\n   would open one anyway.\n4. **Automation Mode without a prompt.** Once, on the Mac:\n   `sudo automationmodetool enable-automationmode-without-authentication` — otherwise every run\n   asks for Touch ID \u002F an Apple Watch and fails unattended. `xc-doctor` checks it.\n5. **Nobody using the Mac during the run.** While someone is working on the Mac, macOS 27 won't\n   let the test runner pull the app to the front: a test waits 60 s and fails \"Failed to activate\n   application … (current state: Running Background)\", often only the first few of a run. Rerun\n   with the Mac idle before suspecting the code.\n6. **An awake, unlocked desktop session.** While the display sleeps the session reads as locked,\n   and *every* UI test fails the same way. `xc-test` wakes the display before macOS tests and holds\n   it on (`caffeinate -d`) until they finish. A real password lock it cannot open: on a build Mac\n   set System Settings ▸ Lock Screen ▸ \"Require password after screen saver begins or display is\n   turned off\" to **Never**. `xc-doctor` reports it (`screen-lock`), and `xc-test` refuses macOS\n   tests up front on a password-locked screen or with nobody logged in at the desktop, instead of\n   spending 60 s per test (`--allow-locked` for schemes without UI tests). Waking is not always\n   enough: on a Mac Studio with an external display, macOS turned the display off again 12 s after\n   the wake, despite `caffeinate`, and the whole run failed. **On a build Mac, also set \"Turn\n   display off … when inactive\" to Never** (System Settings ▸ Lock Screen). **And the screen saver\n   to Never** (\"Start Screen Saver when inactive\"): on macOS 27 it runs inside loginwindow, the\n   session reads as locked while it shows (password or not), and only real input dismisses it —\n   `xc-test` says so rather than retrying, and `xc-doctor` warns (`screen-saver`) while it is on.\n\nNo Accessibility (Device Control & Data Access) grant is needed for any of this.\n\n## Limits\n\n- **Identity signing over SSH** — the login keychain's private keys are unusable from SSH\n  (`errSecInternalComponent`). Build with `--adhoc`, or give the Mac a signing keychain and API\n  key (`api.env`, signing-and-tcc.md) — then identity\u002Fteam builds sign over SSH; `xc-doctor`\n  checks whichever applies.\n- **Physical devices** — `--platform ios-device` builds; installing\u002Flaunching on hardware is not\n  automated.\n- **Timeouts** stop the local `ssh` only; a remote `xcodebuild` keeps running until it finishes.\n- Logs (`build\u002Flogs\u002F`) and result bundles (`build\u002Fxc\u002Fresults\u002F`) keep the newest 10 of each kind.\n\n## References\n\n- `references\u002Fxcodebuild-cheatsheet.md` — raw commands for everything the scripts do\n- `references\u002Fxcodegen-multiplatform.md` — the `project.yml` shape, and the TEST_HOST trap\n- `references\u002Fsigning-and-tcc.md` — signing precedence, the SSH keychain problem, TCC grants\n- `references\u002Ftroubleshooting.md` — symptom → cause → fix, from real sessions\n",{"name":5,"license":15,"metadata":44,"description":7},{"author":45,"version":46},"ooe","1.3.1","master","dbe7ba1a341696481a7f736baf501fe0a6b0d449","007\u002Fskills\u002Fapple-xcodebuild",0,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys","https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt","2026-11-14 23:35:05",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add jeffersonjhunt\u002Fcode-monkeys --skill apple-xcodebuild",{"tool":60,"command":61},"bunx","bunx skills add jeffersonjhunt\u002Fcode-monkeys --skill apple-xcodebuild",{"tool":63,"command":64},"pnpm","pnpm dlx skills add jeffersonjhunt\u002Fcode-monkeys --skill apple-xcodebuild","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002FSKILL.md",true,[68,74,78,82,86,90,94,98,102,106,110,116,120,124,128,132,138,142,146,150,154,158],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"assets\u002Ftemplates\u002Fapp\u002F.xcodegen-version","ASSET","资产文件",7,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fassets\u002Ftemplates\u002Fapp\u002F.xcodegen-version",{"path":75,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":76,"sourceHtmlUrl":77},"assets\u002Ftemplates\u002Fapp\u002Fgitignore",334,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fassets\u002Ftemplates\u002Fapp\u002Fgitignore",{"path":79,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":80,"sourceHtmlUrl":81},"assets\u002Ftemplates\u002Fapp\u002Fproject.yml",1600,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fassets\u002Ftemplates\u002Fapp\u002Fproject.yml",{"path":83,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":84,"sourceHtmlUrl":85},"assets\u002Ftemplates\u002Fapp\u002FResources\u002FAssets.xcassets\u002FAccentColor.colorset\u002FContents.json",97,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fassets\u002Ftemplates\u002Fapp\u002FResources\u002FAssets.xcassets\u002FAccentColor.colorset\u002FContents.json",{"path":87,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":88,"sourceHtmlUrl":89},"assets\u002Ftemplates\u002Fapp\u002FResources\u002FAssets.xcassets\u002FAppIcon.appiconset\u002FContents.json",747,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fassets\u002Ftemplates\u002Fapp\u002FResources\u002FAssets.xcassets\u002FAppIcon.appiconset\u002FContents.json",{"path":91,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":92,"sourceHtmlUrl":93},"assets\u002Ftemplates\u002Fapp\u002FResources\u002FAssets.xcassets\u002FContents.json",53,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fassets\u002Ftemplates\u002Fapp\u002FResources\u002FAssets.xcassets\u002FContents.json",{"path":95,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":96,"sourceHtmlUrl":97},"assets\u002Ftemplates\u002Fapp\u002FSources\u002F__APP__\u002F__APP__App.swift",140,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fassets\u002Ftemplates\u002Fapp\u002FSources\u002F__APP__\u002F__APP__App.swift",{"path":99,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":100,"sourceHtmlUrl":101},"assets\u002Ftemplates\u002Fapp\u002FSources\u002F__APP__\u002FContentView.swift",489,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fassets\u002Ftemplates\u002Fapp\u002FSources\u002F__APP__\u002FContentView.swift",{"path":103,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":104,"sourceHtmlUrl":105},"assets\u002Ftemplates\u002Fapp\u002FTests\u002F__APP__Tests\u002F__APP__Tests.swift",290,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fassets\u002Ftemplates\u002Fapp\u002FTests\u002F__APP__Tests\u002F__APP__Tests.swift",{"path":107,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":108,"sourceHtmlUrl":109},"assets\u002Fxcwin.swift",1615,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fassets\u002Fxcwin.swift",{"path":111,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":114,"sourceHtmlUrl":115},"CHANGELOG.md","REFERENCE","参考文档",6701,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002FCHANGELOG.md",{"path":117,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":118,"sourceHtmlUrl":119},"references\u002Fsigning-and-tcc.md",6673,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Freferences\u002Fsigning-and-tcc.md",{"path":121,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":122,"sourceHtmlUrl":123},"references\u002Ftroubleshooting.md",5881,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Freferences\u002Ftroubleshooting.md",{"path":125,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":126,"sourceHtmlUrl":127},"references\u002Fxcodebuild-cheatsheet.md",3845,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Freferences\u002Fxcodebuild-cheatsheet.md",{"path":129,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":130,"sourceHtmlUrl":131},"references\u002Fxcodegen-multiplatform.md",3614,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Freferences\u002Fxcodegen-multiplatform.md",{"path":133,"resourceType":134,"resourceTypeDesc":135,"sizeBytes":136,"sourceHtmlUrl":137},"scripts\u002Fxc_common.py","SCRIPT","脚本",35870,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fscripts\u002Fxc_common.py",{"path":139,"resourceType":134,"resourceTypeDesc":135,"sizeBytes":140,"sourceHtmlUrl":141},"scripts\u002Fxc-bootstrap.py",5341,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fscripts\u002Fxc-bootstrap.py",{"path":143,"resourceType":134,"resourceTypeDesc":135,"sizeBytes":144,"sourceHtmlUrl":145},"scripts\u002Fxc-build.py",5670,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fscripts\u002Fxc-build.py",{"path":147,"resourceType":134,"resourceTypeDesc":135,"sizeBytes":148,"sourceHtmlUrl":149},"scripts\u002Fxc-doctor.py",14574,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fscripts\u002Fxc-doctor.py",{"path":151,"resourceType":134,"resourceTypeDesc":135,"sizeBytes":152,"sourceHtmlUrl":153},"scripts\u002Fxc-run.py",6537,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fscripts\u002Fxc-run.py",{"path":155,"resourceType":134,"resourceTypeDesc":135,"sizeBytes":156,"sourceHtmlUrl":157},"scripts\u002Fxc-shot.py",5564,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fscripts\u002Fxc-shot.py",{"path":159,"resourceType":134,"resourceTypeDesc":135,"sizeBytes":160,"sourceHtmlUrl":161},"scripts\u002Fxc-test.py",11584,"https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fapple-xcodebuild\u002Fscripts\u002Fxc-test.py",[163,171,196,218,242,265],{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":169,"publishedAt":170},"01M7DTNYQZTNTV0T1ZJKMBQQJ8","craft-build","Refresh the Craft macOS app builds — pull, cargo-build, package a .dmg for each app in the suite on the build Mac, and publish the artifacts to a fileserver. Use when asked to \"refresh the craft builds\", \"rebuild the craft\u002Fmac apps\", \"update the open-source app builds\", \"deploy\u002Fpublish the craft apps\", or to add a new app repo to the set. Builds run on the configured build host over ssh, NOT inside a primate. Host, workspace root, repo manifest and deploy destination come from env or ~\u002F.config\u002Fcraft-build.conf (never hardcoded here).","https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fcraft-build\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":172,"name":173,"nameZh":6,"description":174,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":175,"categories":176,"keywords":177,"publishedAt":39},"01M6JK30ZK7FPRR7T7G0H98CBF","spark-build","Build the cuda-* primate images (cuda-llama-cpp, cuda-comfy, cuda-vllm — the shared base for g.deceiver's six vLLM services) on a Blackwell GB10, freeing that box's unified memory first by stopping whatever it runs, then restarting it. NOTE the standalone coding cluster (qwen3-coder-next) was RETIRED 2026-09-05, so a \"drain\" is no longer a coding outage — it's a g.deceiver-service outage (hutch = memory stack; starsky = the live 27B brain, never build there mid-stream). Checks memory BEFORE stopping anything; --allow-outage \u002F --skip-drain control the trade.","https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fspark-build\u002FSKILL.md",[],[21,178,179,180,181,182,183,184,185,186,187,188,189,190,22,191,192,193,194,195],"spark","spark build","next","memory","control","services","first","qwen3","trade","stack","drain","vLLM","cpp","never","cluster","standalone","images","shared",{"skillNo":197,"name":198,"nameZh":6,"description":199,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":200,"categories":201,"keywords":202,"publishedAt":39},"01M6JK2W2WVS2SX4VFCGRGG1FT","spark-bench","Run LLM evaluation harnesses (AIME 25, GPQA, LiveCodeBench v6, tau2-bench, SWE-Bench Verified via SWE-agent) against the spark-cluster from a dedicated x86 bench host (intel-nuc.tworivers). The harness runs in the spark-bench primate; only the OpenAI-compatible endpoint URL needs to change between baseline (cluster LB) and test (ad-hoc model server) runs.","https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fspark-bench\u002FSKILL.md",[],[178,203,204,205,206,25,207,31,208,209,210,192,211,212,38,213,214,215,216,217],"spark bench","server","only","SWE","URL","lb","harnesses","model","harness","openai-compatible","baseline","run","ad","via","change",{"skillNo":219,"name":220,"nameZh":6,"description":221,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":222,"categories":223,"keywords":224,"publishedAt":39},"01M6JK2NCXEKJXPFQ5XMXY3TG7","secret-ops","Decrypt\u002Fencrypt this project's SOPS+age secrets and manage the private hemlighet repo. Use whenever a task reads or changes a secret — sops, age, vault, hemlighet, a *.sops file, personal\u002F* dotfiles. Crypto runs on the configured secret host over ssh, NOT inside a primate. Host\u002Fidentity come from env or ~\u002F.config\u002Fsecret-ops.conf (never hardcoded here).","https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fsecret-ops\u002FSKILL.md",[],[225,226,227,228,229,230,231,191,232,233,234,235,32,25,236,237,238,239,240,241],"secret ops","ops","crypto","config","secrets","vault","changes","task","env","file","sops","manage","repo","project","dotfiles","encrypt","age",{"skillNo":243,"name":244,"nameZh":6,"description":245,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":246,"categories":247,"keywords":248,"publishedAt":39},"01M6JK2DY9DJYPPS8C0QB291NV","sdlc","The default software development lifecycle every agent follows — intake, plan, isolate, implement, verify, review, land, deploy, observe, release. Use at the start of any coding task, and whenever deciding whether work is ready to deploy or ready to merge.","https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Fsdlc\u002FSKILL.md",[],[244,249,32,250,251,252,253,254,255,256,257,258,259,260,261,262,263,33,264,232],"implement","intake","lifecycle","default","observe","development","ready","development lifecycle","software development","software","release","at","merge","verify","plan","review",{"skillNo":266,"name":267,"nameZh":6,"description":268,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":269,"categories":270,"keywords":271,"publishedAt":39},"01M6JK277C0HA9JGZSSR6Z5QF2","review-adversarial","Adversarial code review with structured findings and a review loop. Use when asked to critically review code, diffs, or design docs with an adversarial mindset.","https:\u002F\u002Fgithub.com\u002Fjeffersonjhunt\u002Fcode-monkeys\u002Fblob\u002Fmaster\u002F007\u002Fskills\u002Freview-adversarial\u002FSKILL.md",[],[264,272,273,274,275,276,277,278,279,280,281,32,282,283,284],"review adversarial","review loop","structured","docs","design docs","review code","with","mindset","code","loop","design","diffs","code review"]