Agent skill · software engineering · dpearson2699
swiftui-performance
Profile, diagnose, and remediate SwiftUI runtime performance using code review, Instruments, and repeatable measurements. Use when a SwiftUI screen renders slowly, scrolling or animations hitch, view bodies update excessively, list identity churns, layout work spikes, or broad Observation dependencies raise CPU cost. Covers evidence-based triage, SwiftUI Instruments lanes, lazy-container guardrails, state lifetime, and before/after verification.
Why this skill is useful
Provides specific performance optimization techniques and profiling methods for SwiftUI that the AI wouldn't reliably generate on its own.
What it needs
Requires xcode installed locally. About 6k tokens when loaded. Last updated 2026-07-31. 973 stars on the source repository.
What this skill does
SwiftUI Performance Audit SwiftUI view performance from a reproducible symptom to measured remediation. Route animation design to swiftui-animation, production telemetry to metrickit, ownership/leak analysis to ios-memgraph-analysis, navigation behavior to swiftui-navigation, state architecture to swiftui-patterns, and layout construction to swiftui-layout-components. Contents Workflow Decision Tree 1. Code-First Review 2. Guide the User to Profile 3. Analyze and Diagnose 4. Remediate Common Code Smells (and Fixes) 5. Verify Outputs Instruments Profiling Identity and Lifetime Lazy Loading Patterns State and Observation Optimization Common Mistakes Review Checklist References Workflow Decision Tree Code supplied: review it first and label findings as hypotheses. Symptoms only: collect the smallest relevant view, data flow, reproduction, device, OS, and build configuration. Inconclusive review: collect a trace or lane screenshots before prescribing a broad refactor. Use this triage list for both code and trace analysis: Broad state dependencies or invalidation storms Unstable list identity or root conditional swapping Formatting, sorting, decoding, or synchronous I/O in body Layout/geometry feedback loops and oversized images Implicit animation applied to a large hierarchy 1. Code-First Review Map each suspect from the triage list to exact code. Report likely causes with code references, but label them code-backed hypotheses until a trace confirms cost. Propose a minimal repro or measurement when evidence is missing. 2. Guide the User to Profile Use the SwiftUI Instruments template on a Release build and real device when possible. Reproduce the exact interaction, capturing SwiftUI lanes, Time Profiler, and Hangs/Hitches as relevant. Ask for the trace or screenshots of the lanes and call tree. 3. Analyze and Diagnose Apply the same triage list to trace evidence. Correlate long or frequent SwiftUI updates with the Time Profiler call tree and the reproduced interaction. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills dpearson2699/swiftui-performance