| name | swiftui-performance-audit |
| description | Audit SwiftUI performance issues from code review and profiling evidence. |
| type | skill |
| created | 2026-02-27T00:00:00.000Z |
| domain | software-development |
| category | mobile |
| risk | safe |
| source | Dimillian/Skills (MIT) |
| tags | ["skill","software-development","mobile","swiftui","performance","audit"] |
SwiftUI Performance Audit
Quick start
Use this skill to diagnose SwiftUI performance issues from code first, then request profiling evidence when code review alone cannot explain the symptoms.
When to Use
- When the user reports slow rendering, janky scrolling, layout thrash, or high CPU in SwiftUI.
- When you need a code-first audit plus Instruments guidance if profiling evidence is required.
Workflow
- Classify the symptom: slow rendering, janky scrolling, high CPU, memory growth, hangs, or excessive view updates.
- If code is available, start with a code-first review using
references/code-smells.md.
- If code is not available, ask for the smallest useful slice: target view, data flow, reproduction steps, and deployment target.
- If code review is inconclusive or runtime evidence is required, guide the user through profiling with
references/profiling-intake.md.
- Summarize likely causes, evidence, remediation, and validation steps using
references/report-template.md.
1. Intake
Collect:
- Target view or feature code.
- Symptoms and exact reproduction steps.
- Data flow:
@State, @Binding, environment dependencies, and observable models.
- Whether the issue shows up on device or simulator, and whether it was observed in Debug or Release.
Ask the user to classify the issue if possible:
- CPU spike or battery drain
- Janky scrolling or dropped frames
- High memory or image pressure
- Hangs or unresponsive interactions
- Excessive or unexpectedly broad view updates
For the full profiling intake checklist, read references/profiling-intake.md.
2. Code-First Review
Focus on:
- Invalidation storms from broad observation or environment reads.
- Unstable identity in lists and
ForEach.
- Heavy derived work in
body or view builders.
- Layout thrash from complex hierarchies,
GeometryReader, or preference chains.
- Large image decode or resize work on the main thread.
- Animation or transition work applied too broadly.
Use references/code-smells.md for the detailed smell catalog and fix guidance.
Provide:
- Likely root causes with code references.