Vai al contenuto
TakoAPI
Torna alle skill

swiftui-performance-audit

di steipete

iOS & macOS Development
2.5kDownload riportati da clawskills.sh
3Stelle
0Visualizzazioni
0 likeAccedi per mettere like a questa skill
—Non ancora valutato
La tua valutazione

Sintesi

Audit and improve SwiftUI runtime.

Descrizione

Cosa fa questa skill

Audits SwiftUI view performance through code review and guided Instruments profiling. Covers view invalidation storms, unstable list identities, heavy body computations, layout thrash, and image decoding issues. Produces a prioritized issue list with concrete code fixes and before/after metrics when traces are available.

Combines static code review with step-by-step Instruments guidance so performance issues are caught even when the root cause isn't obvious from symptoms alone.

Quando usarla

  • Diagnosing janky scrolling in a SwiftUI list
  • Finding CPU spikes during complex SwiftUI animations
  • Reducing excessive view body re-evaluations in a feed
  • Catching expensive formatter allocations inside body
  • Profiling memory peaks in an image-heavy SwiftUI screen

Esempio di workflow

INPUT

User asks: 'My SwiftUI list scrolls at 30fps and CPU spikes during scrolling. Here is my view code.'

AGENT
  1. 1

    Reviews the provided view code for known SwiftUI anti-patterns

  2. 2

    Identifies sorted collections computed inside body on every render

  3. 3

    Detects unstable ForEach identity using id: \.self on mutable values

  4. 4

    Recommends precomputing sorted data and using stable IDs

  5. 5

    Guides the user to capture a SwiftUI Instruments trace if code fixes are insufficient

OUTPUT

A prioritized list of root causes with specific code changes and an optional Instruments profiling walkthrough

Installazione

clawhub install steipete/swiftui-performance-audit

Esegui il comando CLI oppure incolla il prompt in Claude Code, Cursor, Codex o nell'agente di coding che usi.

Link