Agent skill

swiftui-debugging

Diagnose SwiftUI performance issues including unnecessary re-renders, view identity problems, and slow body evaluations. Use when SwiftUI views are slow, janky, or re-rendering too often.

rshankrasgithub.com/rshankrasGitHub ↗
claude-coderead-onlyMIT
Install
npx skills add rshankras/claude-code-apple-skills --skill swiftui-debugging --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 5
SKILL.md size: 14 KB
Bundled scripts: none
Allowed tools: ReadGlobGrep
Path: skills/performance/swiftui-debugging/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 589
Language: Swift

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# SwiftUI Performance Debugging Systematic guide for diagnosing and fixing SwiftUI performance problems: unnecessary view re-evaluations, identity issues, expensive body computations, and lazy loading mistakes. ## When This Skill Activates Use this skill when the user: - Reports slow or janky SwiftUI views - Sees excessive view re-renders or body re-evaluations - Asks about `Self._printChanges()` or view debugging - Has scrolling performance issues with lists or grids - Asks why a view keeps updating when nothing changed - Mentions `@Observable` or `ObservableObject` performance differences - Wants to understand SwiftUI view identity or diffing - Uses `AnyView` and asks about performance implications - Has a hang or stutter traced to SwiftUI rendering ## The Performance Loop Every investigation follows the same loop: **symptom -> measure -> identify -> optimize -> RE-MEASURE**. The last step is the one people skip -- an "optimization" that was never re-measured is a guess, and SwiftUI guesses are wrong often enough (a fix can shift cost elsewhere) that the loop is not optional. Never close a performance issue on the strength of the diff alone. ## Decision Tree ``` What SwiftUI perf

What's inside
Steps it walks through
  1. When This Skill Activates
  2. The Performance Loop
  3. Decision Tree
  4. API Availability
  5. Top 5 Mistakes -- Quick Reference
  6. Lists, Tables, and ForEach: Identity Is the Cost Model
  7. Common Slow-Update Causes
  8. Debugging Tools
  9. Self.printChanges()
  10. Instruments SwiftUI Template
  11. The Redesigned SwiftUI Instrument (Instruments 26 -- WWDC25 306)
  12. Cause & Effect Graph: Why Did Body Run? (WWDC25 306)
  13. ossignpost for Custom Measurement
  14. Review Checklist
Ships with 4 files
  • body-reevaluation.md
  • common-pitfalls.md
  • lazy-loading.md
  • view-identity.md
More from claude-code-apple-skills
All skills →
About this skill
What does the swiftui-debugging skill do?

Diagnose SwiftUI performance issues including unnecessary re-renders, view identity problems, and slow body evaluations. Use when SwiftUI views are slow, janky, or re-rendering too often.

How do I install it?

Run `npx skills add rshankras/claude-code-apple-skills --skill swiftui-debugging --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From rshankras/claude-code-apple-skills, a repository with 589 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going