ios-launch-performance
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "ios-launch-performance":https://skillpi.com/zh/skills/deepskill-e7a456961bcc4a76b388a1ed3558f78e15d25d875df5799ba6292f575cceceb8。安装前核对上游来源和版本:https://github.com/Livsy90/iOS-Performance-Agent-Skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
用于诊断 iOS 应用的启动性能、启动退化、首帧就绪或早期响应性,涵盖 pre-main/dyld 工作、AppDelegate/SceneDelegate、SwiftUI App 启动、启动编排、SDK 初始化和启动测量。除非代码在启动路径上运行,否则不要将其用于一般性能问题。
介绍来源: third_party · Livsy90 · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 适合谁
- 翻译待完成,请参阅来源文档。
- 输入和输出
- 翻译待完成,请参阅来源文档。
- 软件、账号及付费要求
- 来源文档未说明。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: ios-launch-performance
description: Use 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 for general performance unless the code runs on the launch path.iOS Launch Performance
Use this skill to review the path from an app launch request to first visible UI and early responsiveness.
Focus on work that happens:
- before
main - during UIKit or SwiftUI startup
- inside
UIApplicationDelegate,UISceneDelegate, or SwiftUIApp - during root UI creation
- before the first visible frame
- before the first meaningful interaction
- during early post-launch work that still affects user-perceived readiness
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.
Core Model
Treat launch as a pipeline with separate phases:
- Process creation and system preparation
- dyld loading, binding, fixups, runtime registration, and static initialization
- UIKit or SwiftUI runtime startup
- App-level initialization in
UIApplicationDelegate,UISceneDelegate, or SwiftUIApp - Launch orchestration and dependency setup
- Root UI construction, layout, drawing, and first frame commit
- Early post-launch work that affects responsiveness
- Later feature-specific or maintenance work
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.
When to Use This Skill
Use this skill when the task involves:
- slow app launch
- startup regressions
- cold, warm, or prewarmed launch
- resume-vs-launch confusion
- first-frame readiness
- early responsiveness after launch
- pre-main or dyld work
- Objective-C
+load,+initialize, constructor functions, or static initialization - AppDelegate or SceneDelegate startup work
- SwiftUI
@main App,WindowGroup, root view setup, or environment injection - dependency container setup during launch
- launch orchestrators or ordered startup steps
- third-party SDK initialization during launch
- framework linking strategy when launch cost is suspected
- launch metrics from Instruments, XCTest, MetricKit, or Xcode Organizer
Do not use this skill for:
- general scrolling performance
- memory leaks unrelated to launch
- rendering optimization unrelated to first frame
- networking performance outside startup
- broad architecture review unless the architecture affects the launch path
Launch Scenario Classification
Before giving advice, classify what is being measured:
- Cold launch: the app process is not resident and little launch-related state is already warm.
- Warm launch: the app still starts a new process, but parts of system state, caches, or pages may already be warm.
- Prewarmed launch: the system may have prepared part of the launch path before the user explicitly opens the app.
- Resume / already-running return: the app process already exists and returns from background or suspension.
- First install / first run / update launch: launch includes extra setup such as migrations, cache creation, permissions, account/bootstrap work, or version-specific setup.
- Unknown: the measurement setup does not clearly separate the above cases.
Do not compare cold launch, warm launch, prewarmed launch, first-run launch, update launch, and resume as one metric.
Resume is not a full launch investigation unless the task explicitly asks about foregrounding latency.
Investigation Workflow
1. Locate the launch path
Identify code that executes before first frame or before first meaningful interaction.
Inspect:
- app delegate
- scene delegate
- SwiftUI
App - root scene construction
- root view/model creation
- dependency container setup
- global/static initialization
- launch orchestrators
- SDK startup
- linked framework initialization
- first-screen routing and state restoration
2. Classify the slow phase
Classify the likely phase before recommending fixes:
- dyld/pre-main
- Objective-C or Swift runtime/static initialization
- app delegate startup
- scene delegate startup
- SwiftUI app/root view initialization
- launch orchestration or dependency setup
- root UI construction and first-frame rendering
- early post-launch responsiveness
- measurement ambiguity
If the available evidence is not enough to classify the phase, say so and recommend the next measurement step.
3. Classify startup work by necessity
For each startup task, classify it as:
- required before first frame
- required before first interaction
- needed soon after launch
- needed only after authentication/session state is known
- needed only by a later feature
- background maintenance
Work that is not required before first frame or first interaction should not block launch unless there is a correctness reason.
4. Build a dependency view
If launch has ordered steps, SDK setup calls, service registrations, or a launch orchestrator, identify:
- which steps are truly required for the first visible UI
- which steps are required before the first meaningful interaction
- which steps can run independently
- which steps must stay ordered
- which steps touch the main thread or shared mutable state
- which failures must block launch
- which dependency chain forms the longest critical path
Treat comments, fragile ordering, and institutional knowledge as risk. Prefer explicit dependencies over relying on call order.
5. Look for hidden eager work
Check for launch work hidden in:
- Objective-C
+load - Objective-C
+initialize - C/C++ constructor functions
- C++ global objects with constructors
- Swift globals or static properties
- eager singletons
- dependency graph construction
- SDK auto-registration
- dynamic framework startup
- synchronous file I/O
- database opening or migration
- keychain-heavy work
- networking or remote configuration
- large decoding/parsing
- blocking locks, semaphores, dispatch groups, or synchronous waits on the main thread
Treat hidden initialization as launch-critical until measurement proves otherwise.
6. Recommend targeted changes
Prefer changes that directly shorten or unblock the launch path:
- remove unnecessary launch work
- lazy-load feature-specific services
- defer noncritical work until after visible UI or first interaction
- split launch-critical state from secondary app state
- make startup dependencies explicit
- replace hidden static initialization with explicit or lazy initialization
- move blocking work off the main thread only when safe and useful
- use bounded parallelism only after auditing dependencies, shared state, isolation, and failure behavior
- review linking strategy only when evidence points to pre-main or dyld cost
- shrink the first usable surface instead of initializing the whole application graph before display
Do not recommend broad rewrites unless the launch path cannot be safely improved with smaller changes.
7. Require validation
Every recommendation should include a validation path.
Use:
- Instruments App Launch for phase-level diagnosis
- Time Profiler for CPU-heavy startup paths
- dyld-related tools or logs when pre-main work is suspected
os_signpostor equivalent markers for app-specific startup phases- XCTest launch metrics for repeatable local or CI regression checks
- MetricKit or Xcode Organizer for production distributions
Prefer release-like builds, real devices, stable test data, repeated runs, and older supported hardware.
High-Value Decision Rules
- Treat roughly 400 ms to first visible frame as an aggressive user-experience target, not as a watchdog threshold and not as a pre-main-only budget.
- Do not blame dyld by default. Slow launch can come from pre-main work, app initialization, launch orchestration, root UI creation, first-frame rendering, synchronous I/O, or early post-launch blocking.
- Treat
+load, constructor functions, and static initialization with side effects as launch-critical until measurement proves otherwise. - Prefer explicit setup, lazy initialization, or scoped one-time initialization over work hidden in load-time hooks.
- Do not present
+initializeas a universal fix. It can help in some legacy Objective-C code, but explicit or lazy initialization is usually clearer in modern code. - Do not recommend converting all modules to static linking. Consider launch cost, build time, binary size, duplicate symbols, resource packaging, SDK distribution, debugging, and mergeable libraries.
- Do not use arbitrary framework-count limits. More dynamic frameworks can increase launch work, but the real cost must be measured.
- Do not parallelize launch steps until dependencies, shared state, actor isolation, main-thread requirements, and failure behavior are explicit.
- Do not block the main thread while waiting for parallel startup work unless the code is proven safe, bounded, and required before launch can continue.
- Treat unsafe parallelism as a correctness risk even when it improves a local benchmark.
- Optimize the longest required dependency chain, not only the largest individual startup step.
- Do not assume that queueing work asynchronously on the main queue guarantees it runs after the first frame.
- Do not assume SwiftUI
.taskis always post-render or harmless. It is lifecycle-bound async work and can still affect early responsiveness. - Do not rely on Debug builds, simulator-only runs, or a single modern device when judging launch performance.
- Do not use production launch histograms alone to identify the local bottleneck. Use them to prioritize and verify trends.
Code Review Checklist
When reviewing launch-related code, check these areas first.
Pre-main and runtime initialization
Look for +load, constructor functions, C++ global constructors, expensive Swift globals/statics, eager runtime hooks, Objective-C category-heavy modules, and dynamic frameworks with startup-time initializers.
Read references/pre-main-dyld-and-static-initializers.md when this area is relevant.
Launch orchestration and dependency graph
Look for long ordered startup sequences, implicit dependencies, startup comments that encode required ordering, dependency containers built synchronously, unsafe parallelism, blocking waits, unclear failure behavior, and first-screen code that assumes the whole app graph is ready.
Read references/launch-orchestration-and-dependency-graph.md when this area is relevant.
AppDelegate, SceneDelegate, and first frame
Look for synchronous dependency setup, unconditional SDK initialization, database opening or migration, keychain access, synchronous networking, heavy root view model construction, duplicate app/scene setup, and expensive first-screen rendering.
Read references/appdelegate-scenedelegate-and-first-frame.md when this area is relevant.
SwiftUI App startup
Look for heavy work in App.init, root Scene construction, root view initialization, eager observable model creation, environment injection, .task, .onAppear, scenePhase, and @UIApplicationDelegateAdaptor.
Read references/swiftui-app-launch.md when this area is relevant.
Third-party SDKs
Every SDK that starts during launch must justify why it needs to run before first frame or first interaction.
Classify SDKs as launch-critical, first-interaction required, post-first-frame acceptable, feature-specific and lazy, or background-only.
Be careful with blanket deferral. Crash reporting, security, deep linking, attribution, push routing, remote config, and feature flags can have correctness requirements.
Read references/third-party-sdks-at-launch.md when this area is relevant.
Measurement
When measurements are noisy, clarify:
- device model and OS version
- Debug vs Release/Profile configuration
- simulator vs physical device
- cold/warm/prewarmed/resume classification
- first install, update launch, or returning-user launch
- network and account state
- app data size
- authenticated vs unauthenticated launch
- test iteration count and variance
Read references/metrics-instruments-xctest-metrickit.md when measurement setup or interpretation is relevant.
Reference Routing
Use reference files only when the task needs extra detail.
- Read
references/launch-taxonomy-and-targets.mdwhen the task involves cold/warm/prewarmed/resume terminology, first-frame targets, first install/update launch classification, or measurement setup. - Read
references/pre-main-dyld-and-static-initializers.mdwhen the task involves dyld, pre-main,+load,+initialize, constructor functions, Objective-C categories, runtime registration, or static initialization. - Read
references/linking-strategy.mdwhen the task involves dynamic frameworks, static libraries, mergeable libraries, modularization, launch-time linking trade-offs, binary layout, or order-file considerations. - Read
references/launch-orchestration-and-dependency-graph.mdwhen the task involves launch steps, critical path modeling, explicit dependencies, safe parallelism, race/deadlock risks, failure handling, or longest-chain optimization. - Read
references/appdelegate-scenedelegate-and-first-frame.mdwhen the task involvesUIApplicationDelegate,UISceneDelegate, dependency setup, root UI creation, first-frame readiness, or main-thread startup work. - Read
references/swiftui-app-launch.mdwhen the task involves SwiftUIApp,WindowGroup, root view setup, observable state,.task,.onAppear,scenePhase,@UIApplicationDelegateAdaptor, or environment initialization. - Read
references/third-party-sdks-at-launch.mdwhen the task involves analytics, crash reporting, ads, attribution, remote config, push, feature flags, security SDKs, or vendor initialization strategy. - Read
references/metrics-instruments-xctest-metrickit.mdwhen the task involves Instruments, Time Profiler, signposts, XCTest launch metrics, MetricKit, Xcode Organizer, CI baselines, or production monitoring.
Do not read all references by default.
Output Format
When reviewing code or diagnosing a launch report, return the following sections.
Launch classification
State whether the issue appears to involve cold launch, warm launch, prewarmed launch, first install/update launch, resume, or unknown.
Mention measurement ambiguity if present.
Suspected phase
Identify the most likely phase:
- pre-main
- static initialization
- app delegate
- scene setup
- SwiftUI root setup
- launch orchestration
- first-frame rendering
- early post-launch responsiveness
- measurement/setup issue
Critical path
Identify the required startup chain if enough information is available.
Mention hidden ordering, implicit dependencies, or unknown dependencies when they block safe optimization.
Findings
List concrete risks found in the code, architecture, metrics, or trace.
Avoid generic advice not connected to evidence.
Recommended changes
Group recommendations by priority:
- High-confidence launch-path fixes
- Dependency/orchestration fixes
- Measurement or instrumentation needed
- Optional architectural cleanup
Validation
Explain how to verify the change locally and in production.
Include the expected metric, trace area, or startup phase that should improve.
Non-Goals
Do not use this skill for:
- general scrolling performance
- memory leaks
- rendering optimization unrelated to app startup
- networking performance outside launch
- broad app architecture review unrelated to startup
- generic SwiftUI review unless the code affects launch, first frame, or early responsiveness
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 覆盖 iOS 应用启动性能诊断的完整端到端流程,从 pre-main 到首帧渲染
- 提供明确的场景分类(cold/warm/prewarmed/resume)和测量指导
- 包含高价值决策规则和代码审查清单,实用性强
亮点
- 触发词精准完整,明确限定 iOS 启动性能诊断场景
- 边界清晰,区分了启动性能与一般性能问题的适用场景
- 覆盖多种启动变体和相关技术点
亮点
- Phase/步骤清晰,有完整的 Investigation Workflow
- 包含端到端示例和输出格式规范
- frontmatter 完整,文档结构良好
亮点
- 工具来源明确,包含 Instruments、XCTest、MetricKit 等标准工具
- 覆盖主要异常场景,提供验证路径
- 包含测量指导和生产环境验证建议
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
来源文档未说明。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。