/odin-apple:ios-build-fixfrom ODIN Apple
Fixes failing iOS builds by regenerating Xcode projects from project.yml, correcting UI behavior, and verifying fixes via debug bridge with snapshot/screenshot fixtures.
Ships in ODIN Apple. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
| Field | Bound contract |
|---|---|
| Trigger | the user runs /ios-build-fix |
| Authority | Reversible local: writes the iOS project's Swift source plus snapshot and screenshot fixtures and the regression test under test/fixtures/ios-fix/, applied and verified through the iOS debug bridge; rollback is version control. No remote mutation. The user picks among competing root-cause fixes. |
| Side effect | project code changes edited directly, rebuilt and verified through the debug bridge, plus snapshot and screenshot fixtures and a regression test written under test/fixtures/ios-fix/ |
| Done | the failing iOS behavior is fixed and verified on a device or simulator, with a reproducing snapshot and a regression test committed alongside the fix |
Required:
Optional:
GET /state/snapshot that reproduces the bug is captured. A fix without a reproducing snapshot is rejected.POST /tap, POST /swipe, POST /type, or POST /state/<key> (snapshot-eligible fields only).GET /state/snapshot and write it to test/fixtures/ios-fix/<bug-slug>-pre.json.GET /screenshot and write it to test/fixtures/ios-fix/<bug-slug>-pre.png.git checkout -- <edited files> reverts this edit.xcodebuild -scheme <SchemeName> -destination <BuildDestination> build, then xcrun simctl install <UDID> <app-path> on a simulator or ios-deploy --bundle <app-path> --id <UDID> on a device. The daemon reconnects the StateServer tunnel after the rebuild; re-deploy through the boot-token rotation flow.POST /state/restore with the pre-bug snapshot to reproduce the state, then take a fresh GET /screenshot and compare it against test/fixtures/ios-fix/<bug-slug>-pre.png.git checkout -- <edited files>) and retry from step 9, up to 3 iterations before escalating to the user.test/fixtures/ios-fix/<bug-slug>-post.png.test/fixtures/ios-fix/<bug-slug>.test.ts that loads the pre-bug snapshot, restores it via POST /state/restore, and asserts the post-fix behavior on a real device (gated on a device-available flag).409 schema_mismatch on POST /state/restore after a rebuild: re-codegen the accessors (swift run gen-accessors), re-snapshot, then retry verification.A minimal Swift source fix committed with its reproducing snapshot (<bug-slug>-pre.json), pre-fix and post-fix screenshots, and a regression test that restores the pre-bug snapshot and asserts the post-fix behavior on a device or simulator. Terminal status is DONE with the verification evidence, or BLOCKED with the blocker and the attempts made.
| Field | Bound contract |
|---|---|
| Trigger | the user asks to regenerate an Xcode project from project.yml via XcodeGen, or the skill detects that the generated xcodeproj is stale after project.yml changed |
| Authority | Reversible local: write only the regenerated xcodeproj built from project.yml; roll back via git restore of the xcodeproj. Never edit handwritten Swift or hand-patch generated files. |
| Side effect | Regenerates the xcodeproj from project.yml without modifying handwritten Swift files. |
| Done | The regenerated project builds: xcodebuild -scheme <SchemeName> succeeds, and swift build also succeeds when the app root has a Package.swift; or the freshness check reports "already up to date" with the freshness result reported; the early exit is DONE in Output. |
project.yml in the app root. Must exist; stop if absent.xcodegen generate on PATH. Required if the project does not use xcodegen, in which case that command must resolve on PATH.xcodegen generate. If the default is requested and xcodegen is not on PATH, return BLOCKED with "xcodegen not found" and list the checked PATH. If a non-default command is requested and is not on PATH, return BLOCKED with "generator command not found" and list the checked PATH.project.yml exists in the app root. If absent, return BLOCKED with "missing project.yml".project.yml content and compare the hash to the value recorded inside the generated xcodeproj bundle. Look for a recorded hash in a known comment or sidecar file within the bundle; if no recorded hash is found, proceed with regeneration. If the hashes match, exit with "already up to date".mkdir -p .outline && git diff -- "*.swift" > .outline/ios-regen-pre.patch). Run the resolved generator command against the app root or project.yml path. The generator removes obsolete generated files and emits the current xcodeproj. If the generator reports an invalid project.yml entry, return BLOCKED with "invalid manifest entry" and the generator's error message.git restore of the xcodeproj, then restore those files by applying the saved patch first (git apply .outline/ios-regen-pre.patch) when the patch is non-empty; fall back to git checkout -- <file> only for files that were clean before the run. Return BLOCKED with "handwritten Swift modified by regenerator".Package.swift, run swift build against the app's package; without one, the project has no SwiftPM package to build. Run xcodebuild -scheme <SchemeName> against the regenerated project. If a required build fails, revert via git restore of the xcodeproj, surface the compile error, and return BLOCKED with "build failure after regeneration" and the failing command's output.xcodegen generate is requested and xcodegen is not on PATH): list the checked PATH. The user must install xcodegen or supply an alternate generator command.project.yml in the app root.project.yml. Fix the entry to use a supported type or remove it, then rerun. Do not edit the generated xcodeproj by hand to work around the rejection.git restore of the xcodeproj. Surface the compile error. Do not proceed with a broken project.git restore of the xcodeproj, then restore those files by applying the saved patch first (git apply .outline/ios-regen-pre.patch) when the patch is non-empty; fall back to git checkout -- <file> only for files that were clean before the run. The generator should not touch handwritten Swift; report the affected files.project.yml edit: the recorded hash matched. Confirm project.yml was saved and the recorded hash is not stale before rerunning.git restore and return BLOCKED with the failing step and what was attempted.The regenerated xcodeproj under the app root, a diff summary of changed files, and a terminal classification: DONE (the project builds, or the freshness check reports "already up to date") or BLOCKED with the failing step and what was attempted. On "already up to date", no files are changed and the freshness result is reported.
What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/ios-build-cleanupUse when the user wants a clean Xcode rebuild by deleting DerivedData and build artifacts. Do not use for diagnosing a specific build error: use ios-build-fix./xcode-simulator-testingUse when asked to run /xcode-simulator-testing with a scheme name or current to build and launch an iOS app in a simulator. Not for project regeneration: use ios-build-fix.npx claudepluginhub outlinedriven/odin-claude-plugin --plugin odin-appleOther plugins' skills for the same job