Swiftui performance inspector

From Xopoko/build-swift-apps · View interactive version

Swiftui performance inspector is an AI agent skill from the GitHub repository Xopoko/build-swift-apps. Diagnose SwiftUI rendering and update costs from code or profiles when scrolling janks, CPU or memory spikes, views update excessively, layouts thrash, or apps hang.

How to use this skill

Skill file

SwiftUI Performance Inspector

Diagnose from code first, then request profiling evidence when code review cannot explain the symptom.

Workflow

  1. Classify the symptom: slow rendering, scrolling jank, high CPU, memory growth, hangs, broad updates, or layout thrash.
  2. If code is available, review with references/code-smells.md.
  3. If code is missing, ask for the smallest useful slice: target view, data flow, reproduction steps, device/simulator, build config, and deployment target.
  4. If runtime evidence is needed, use references/profiling-intake.md for the exact Instruments checklist.
  5. Report likely causes, evidence, fixes, and validation steps using references/report-template.md when useful.

Code Review Focus

Profiling Evidence

Ask for SwiftUI timeline or Time Profiler export/screenshots, device/OS/build configuration, exact profiled interaction, and before/after metrics when comparing changes.

Map evidence to invalidation, identity churn, layout, main-thread work, image cost, animation cost, or hangs. Distinguish trace-backed findings from code-level suspicion and state what evidence would reduce uncertainty.

Fix Defaults

Output

Provide a short metrics table when available, top issues ordered by impact, proposed fixes with effort, and verification steps.

References

Use current Apple Developer docs when Instruments or SwiftUI performance guidance may have changed.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.