$npx -y skills add Livsy90/iOS-Performance-Agent-Skills --skill ios-launch-performanceUse this skill when diagnosing iOS app launch performance, startup regressions, first-frame readiness, or early responsiveness. Covers pre-main/dyld work, AppDelegate/SceneDelegate, SwiftUI App startup, launch orchestration, SDK initialization, and launch measurement. Do not use
| 1 | # iOS Launch Performance |
| 2 | |
| 3 | Use this skill to review the path from an app launch request to first visible UI and early responsiveness. |
| 4 | |
| 5 | Focus on work that happens: |
| 6 | |
| 7 | * before `main` |
| 8 | * during UIKit or SwiftUI startup |
| 9 | * inside `UIApplicationDelegate`, `UISceneDelegate`, or SwiftUI `App` |
| 10 | * during root UI creation |
| 11 | * before the first visible frame |
| 12 | * before the first meaningful interaction |
| 13 | * during early post-launch work that still affects user-perceived readiness |
| 14 | |
| 15 | This is not a general iOS performance skill. Use it only when the issue is launch-specific or when the code runs on the launch path. |
| 16 | |
| 17 | ## Core Model |
| 18 | |
| 19 | Treat launch as a pipeline with separate phases: |
| 20 | |
| 21 | 1. Process creation and system preparation |
| 22 | 2. dyld loading, binding, fixups, runtime registration, and static initialization |
| 23 | 3. UIKit or SwiftUI runtime startup |
| 24 | 4. App-level initialization in `UIApplicationDelegate`, `UISceneDelegate`, or SwiftUI `App` |
| 25 | 5. Launch orchestration and dependency setup |
| 26 | 6. Root UI construction, layout, drawing, and first frame commit |
| 27 | 7. Early post-launch work that affects responsiveness |
| 28 | 8. Later feature-specific or maintenance work |
| 29 | |
| 30 | Do not optimize blindly. First identify which phase is expensive, then recommend changes that move, remove, lazy-load, parallelize, serialize, or measure that specific work. |
| 31 | |
| 32 | ## When to Use This Skill |
| 33 | |
| 34 | Use this skill when the task involves: |
| 35 | |
| 36 | * slow app launch |
| 37 | * startup regressions |
| 38 | * cold, warm, or prewarmed launch |
| 39 | * resume-vs-launch confusion |
| 40 | * first-frame readiness |
| 41 | * early responsiveness after launch |
| 42 | * pre-main or dyld work |
| 43 | * Objective-C `+load`, `+initialize`, constructor functions, or static initialization |
| 44 | * AppDelegate or SceneDelegate startup work |
| 45 | * SwiftUI `@main App`, `WindowGroup`, root view setup, or environment injection |
| 46 | * dependency container setup during launch |
| 47 | * launch orchestrators or ordered startup steps |
| 48 | * third-party SDK initialization during launch |
| 49 | * framework linking strategy when launch cost is suspected |
| 50 | * launch metrics from Instruments, XCTest, MetricKit, or Xcode Organizer |
| 51 | |
| 52 | Do not use this skill for: |
| 53 | |
| 54 | * general scrolling performance |
| 55 | * memory leaks unrelated to launch |
| 56 | * rendering optimization unrelated to first frame |
| 57 | * networking performance outside startup |
| 58 | * broad architecture review unless the architecture affects the launch path |
| 59 | |
| 60 | ## Launch Scenario Classification |
| 61 | |
| 62 | Before giving advice, classify what is being measured: |
| 63 | |
| 64 | * **Cold launch**: the app process is not resident and little launch-related state is already warm. |
| 65 | * **Warm launch**: the app still starts a new process, but parts of system state, caches, or pages may already be warm. |
| 66 | * **Prewarmed launch**: the system may have prepared part of the launch path before the user explicitly opens the app. |
| 67 | * **Resume / already-running return**: the app process already exists and returns from background or suspension. |
| 68 | * **First install / first run / update launch**: launch includes extra setup such as migrations, cache creation, permissions, account/bootstrap work, or version-specific setup. |
| 69 | * **Unknown**: the measurement setup does not clearly separate the above cases. |
| 70 | |
| 71 | Do not compare cold launch, warm launch, prewarmed launch, first-run launch, update launch, and resume as one metric. |
| 72 | |
| 73 | Resume is not a full launch investigation unless the task explicitly asks about foregrounding latency. |
| 74 | |
| 75 | ## Investigation Workflow |
| 76 | |
| 77 | ### 1. Locate the launch path |
| 78 | |
| 79 | Identify code that executes before first frame or before first meaningful interaction. |
| 80 | |
| 81 | Inspect: |
| 82 | |
| 83 | * app delegate |
| 84 | * scene delegate |
| 85 | * SwiftUI `App` |
| 86 | * root scene construction |
| 87 | * root view/model creation |
| 88 | * dependency container setup |
| 89 | * global/static initialization |
| 90 | * launch orchestrators |
| 91 | * SDK startup |
| 92 | * linked framework initialization |
| 93 | * first-screen routing and state restoration |
| 94 | |
| 95 | ### 2. Classify the slow phase |
| 96 | |
| 97 | Classify the likely phase before recommending fixes: |
| 98 | |
| 99 | * dyld/pre-main |
| 100 | * Objective-C or Swift runtime/static initialization |
| 101 | * app delegate startup |
| 102 | * scene delegate startup |
| 103 | * SwiftUI app/root view initialization |
| 104 | * launch orchestration or dependency setup |
| 105 | * root UI construction and first-frame rendering |
| 106 | * early post-launch responsiveness |
| 107 | * measurement ambiguity |
| 108 | |
| 109 | If the available evidence is not enough to classify the phase, say so and recommend the next measurement step. |
| 110 | |
| 111 | ### 3. Classify startup work by necessity |
| 112 | |
| 113 | For each startup task, classify it as: |
| 114 | |
| 115 | * required before first frame |
| 116 | * required before first interaction |
| 117 | * needed soon after launch |
| 118 | * needed only after authentication/session state is known |
| 119 | * needed only by a later feature |
| 120 | * background maintenance |
| 121 | |
| 122 | Work that is not required before first frame or fi |