跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
搜索与研究

ios-performance-profiling

Use this skill when choosing, running, or interpreting iOS performance profiling workflows, including Instruments traces, signposts, XCTest metrics, MetricKit, Xcode Organizer, hangs, hitches, CPU, allocations, memory graphs, disk I/O, networking, power, or production performance signals. Do not use it as the deep domain skill for launch, SwiftUI, concurrency, perceived performance, or runtime issues unless the task is specifically about measurement, tool selection, trace interpretation, or verification.

Livsy90 · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add Livsy90/iOS-Performance-Agent-Skills --skill ios-performance-profiling

技能说明


name: ios-performance-profiling description: Use this skill when choosing, running, or interpreting iOS performance profiling workflows, including Instruments traces, signposts, XCTest metrics, MetricKit, Xcode Organizer, hangs, hitches, CPU, allocations, memory graphs, disk I/O, networking, power, or production performance signals. Do not use it as the deep domain skill for launch, SwiftUI, concurrency, perceived performance, or runtime issues unless the task is specifically about measurement, tool selection, trace interpretation, or verification.

iOS Performance Profiling

Purpose

Use this skill to choose the right profiling workflow, gather evidence, interpret performance signals, and recommend validation before claiming that an optimization worked.

This skill is a profiling router and evidence workflow. It should not replace more specific skills for launch performance, SwiftUI performance, Swift Concurrency performance, perceived performance, or Swift runtime costs.

When to use this skill

Use this skill when the task involves:

  • choosing an Instruments template or profiling workflow;
  • interpreting traces, screenshots, XCTest metrics, MetricKit payloads, Organizer data, logs, or signposts;
  • diagnosing hangs, animation hitches, CPU spikes, memory growth, leaks, disk I/O, network latency, power usage, or production regressions;
  • designing a before/after measurement plan;
  • adding signposts or performance tests;
  • checking whether a proposed optimization is supported by evidence.

When not to use this skill

Do not use this skill as the primary skill for:

  • app startup architecture or launch-critical work unless the task asks how to profile, measure, or verify launch performance;
  • SwiftUI invalidation, identity, layout, or scrolling fixes unless the task asks which profiling evidence to collect;
  • Swift Concurrency design or actor isolation unless the task asks how to profile task behavior, actor hopping, or executor-related latency;
  • perceived performance, loading states, skeletons, optimistic UI, or feedback design unless the task asks how to validate perceived latency;
  • Swift runtime, ARC, allocation, existential, generic, dispatch, or linking costs unless the task asks how to measure them.

Prefer the more specific skill when the user already knows the domain and needs a fix rather than a measurement workflow.

Core principle

Evidence before optimization.

Use this loop:

Symptom -> reproducible scenario -> correct tool -> trace or metric -> hypothesis -> focused fix -> re-measure

Do not claim that a change improved performance unless there is a validation path. If evidence is missing, say what is not proven yet and what should be measured next.

Capability check

Before recommending or running a real profiling workflow, check what is actually available.

Ask or infer:

  • Is there a buildable Xcode project, workspace, scheme, and target?
  • Is profiling possible on a real device, or only in Simulator?
  • Is a Release or release-like configuration available?
  • Is the scenario reproducible with stable data and stable app state?
  • Are Instruments traces, screenshots, MetricKit payloads, Organizer screenshots, logs, or XCTest results available?
  • Can traces or reports be shared as artifacts?
  • Is the task asking for a profiling plan, a code review, or interpretation of existing evidence?

If tooling or artifacts are unavailable, provide a measurement plan instead of pretending to have profiled the app.

Measurement baseline

Prefer profiling with:

  • real device over Simulator for UI, launch, power, memory pressure, thermal behavior, and production-like responsiveness;
  • Release or release-like builds over Debug builds;
  • repeated runs over a single measurement;
  • stable input data and deterministic scenarios;
  • device and OS information included in the report;
  • signposts around app-specific operations when system-level traces are too broad.

Use Simulator only when the question is about relative local investigation and the limitation is clearly stated.

Tool selection

Choose the tool from the symptom, not from a favorite workflow.

Symptom or questionPrimary toolSecondary signal
Cold launch, warm launch, first frame, first interactionApp Launch, Time Profiler, XCTest launch metricsMetricKit, Organizer, signposts
Main-thread hang or freezeHangs, Time ProfilerMain Thread Checker, signposts
Animation hitch, scrolling hitch, dropped framesAnimation Hitches, Core Animation, Time ProfilerSwiftUI Instrument, signposts
SwiftUI repeated updates or broad invalidationSwiftUI InstrumentTime Profiler, signposts
CPU spike or slow operationTime ProfilerCounters, signposts, XCTest metrics
Memory growth, high allocations, churnAllocations, VM TrackerMemory Graph, Leaks, XCTest memory metric
Retain cycle or logical leakMemory Graph DebuggerAllocations generation analysis
Disk reads/writes, persistence stalls, excessive writesFile Activity, System TraceMetricKit disk write diagnostics
Slow networking or duplicated requestsNetwork instrument, URLSession metricsSignposts, server timing
Battery drain, thermal pressure, wakeupsEnergy Log, Power ProfilerMetricKit, Organizer
Production-only regressionMetricKit, OrganizerLocal reproduction with Instruments
Regression protectionXCTest metricsCI history, MetricKit release comparison

When the signal is app-specific and not visible enough in system instruments, add os_signpost or OSSignposter around the operation.

Cross-skill routing

Use this skill to select and validate the profiling path. Route deeper domain reasoning to narrower skills when needed:

  • Use ios-launch-performance when the evidence points to pre-main work, dyld, static initializers, app initialization, root scene construction, first frame, first interaction, SDK startup, database warmup, o
阅读完整来源 ↗