swiftui-performance-audit

Analyze SwiftUI code for rendering bottlenecks and guide Instruments profiling.

1|1|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/itsmichaelwest/agent-kit --skill swiftui-performance-audit-itsmichaelwest
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-performance-audit
Source: https://github.com/itsmichaelwest/agent-kit/tree/main/skills/swiftui-performance-audit
Command: npx skills add https://github.com/itsmichaelwest/agent-kit --skill swiftui-performance-audit-itsmichaelwest

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps diagnose and resolve performance issues in SwiftUI applications, addressing slow rendering, janky scrolling, and high resource usage.

Core Features & Use Cases

  • Code Review: Analyzes SwiftUI code for common performance anti-patterns.
  • Profiling Guidance: Guides users on collecting performance data using Instruments.
  • Root Cause Analysis: Identifies specific bottlenecks like view invalidation storms or layout thrash.
  • Remediation Steps: Provides concrete suggestions for improving performance.
  • Use Case: You're experiencing lag when scrolling through a complex list in your SwiftUI app. This Skill can help you identify why the list is slow and suggest code changes to fix it.

Quick Start

Review the provided SwiftUI code for performance bottlenecks and suggest optimizations.

Frequently Asked Questions about swiftui-performance-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix slow scrolling and janky rendering in my SwiftUI app?

To fix slow scrolling in a SwiftUI app, audit your code for rendering bottlenecks like view invalidation storms and unstable list identities. Identifying excessive computation within view bodies helps resolve lag and high resource usage.

What causes view invalidation storms in SwiftUI and how do I resolve them?

View invalidation storms in SwiftUI are caused by poor state management triggering excessive view re-renders. You resolve them by ensuring state management best practices and identity stability to prevent unnecessary layout thrash and recomputation.

How do I use Instruments to profile SwiftUI performance bottlenecks?

You profile SwiftUI performance bottlenecks using Instruments by collecting performance data to identify layout thrash and slow rendering. This Skill guides you through profiling to pinpoint specific issues like excessive computation within view bodies.

Why is my SwiftUI list slow and how can I optimize its identity stability?

A SwiftUI list is slow often due to unstable list identities causing unnecessary view re-renders. You can optimize identity stability by applying best practices for state management and efficient data loading to stop view invalidation storms.

What are common SwiftUI performance anti-patterns I should review my code for?

Common SwiftUI performance anti-patterns include unstable list identities, excessive computation within view bodies, and layout thrash. Reviewing your code for these issues helps diagnose slow rendering, janky scrolling, and high resource usage.

Do I need specific state management practices to improve SwiftUI rendering performance?

Yes, adhering to best practices for state management is required to improve SwiftUI rendering performance. Proper state management ensures identity stability and prevents view invalidation storms, resolving slow rendering and janky scrolling.