swiftui-auditor

Diagnose SwiftUI performance issues by analyzing view invalidation, identity, and layout patterns.

Updated May 6, 2026
One-click install
npx skills add https://github.com/Roy-wonji/claude-config --skill swiftui-auditor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-auditor
Source: https://github.com/Roy-wonji/claude-config/tree/main/skills/swiftui-auditor
Command: npx skills add https://github.com/Roy-wonji/claude-config --skill swiftui-auditor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SwiftUI apps can suffer from janky UI, slow scrolling, and excessive re-rendering due to view invalidation storms, unstable identity in lists, layout thrashing, and expensive work placed inside view rendering.

Core Features & Use Cases

  • View invalidation optimization: Detects unnecessary view updates and helps optimize @Observable/@State usage to reduce wasted renders.
  • Identity and list performance: Finds unstable ForEach identity patterns and recommends identity stabilization and list efficiency improvements.
  • Layout, animation, and rendering fixes: Reviews GeometryReader usage, layout thrash risk, animation performance impact, and heavy computations in body, including caching and image-loading strategy.

Quick Start

Ask the skill to audit the attached SwiftUI files and produce a prioritized list of performance issues with Before/After code changes and how to validate improvements with Instruments.

Frequently Asked Questions about swiftui-auditor

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

FAQPage Schema
Why does my SwiftUI list scroll slowly and stutter during animations?

Slow SwiftUI scrolling and stuttery animations often stem from view invalidation storms, unstable ForEach identity, or layout thrashing. Analyzing state-driven updates and list identity patterns helps isolate wasted renders and expensive body computations causing the lag.

How do I fix unnecessary view re-renders in SwiftUI?

To fix unnecessary SwiftUI view re-renders, audit your @Observable and @State usage to minimize invalidation scope. Identifying unstable identity patterns in ForEach and optimizing GeometryReader placement reduces wasted layout passes and rendering workloads.

What's the best way to audit SwiftUI performance bottlenecks?

The best way to audit SwiftUI performance bottlenecks is to analyze view invalidation patterns, identity stability, and rendering workloads. This produces prioritized code changes and guidance for verifying optimizations using SwiftUI Instruments profiling.

Can I use Instruments to verify SwiftUI layout thrash and ForEach identity fixes?

Yes, you can use Instruments to verify SwiftUI fixes. Profiling validates that identity stabilization and layout thrash reductions actually decrease rendering workloads, providing measurable verification that your code changes resolved the performance bottlenecks.

Does GeometryReader cause performance issues in SwiftUI?

GeometryReader can cause SwiftUI layout thrash by triggering excessive layout passes during state-driven updates. Auditing its usage within view bodies helps identify animation performance impacts and recommends caching or alternative layout strategies to reduce rendering workloads.

When should I not use ForEach with self-generated identifiers in SwiftUI?

You should not use self-generated identifiers in SwiftUI ForEach when list items change, as unstable identity causes unnecessary view recreation. Stabilizing identity with consistent identifiers prevents wasted renders and resolves slow scrolling performance.