agents/skills/swiftui-performance-audit/SKILL.md
Audit and improve SwiftUI runtime performance from code review and architecture. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory usage, excessive view updates, or layout thrash in SwiftUI apps, and to provide guidance for user-run Instruments profiling when code review alone is insufficient.
npx skillsauth add jason0x43/dotfiles swiftui-performance-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to diagnose SwiftUI performance issues from code first, then request profiling evidence when code review alone cannot explain the symptoms.
references/code-smells.md.references/profiling-intake.md.references/report-template.md.Collect:
@State, @Binding, environment dependencies, and observable models.Ask the user to classify the issue if possible:
For the full profiling intake checklist, read references/profiling-intake.md.
Focus on:
ForEach.body or view builders.GeometryReader, or preference chains.Use references/code-smells.md for the detailed smell catalog and fix guidance.
Provide:
If code review does not explain the issue, ask for runtime evidence:
Use references/profiling-intake.md for the exact checklist and collection steps.
Apply targeted fixes:
ForEach and lists.body into derived state updated from inputs, model-layer precomputation, memoized helpers, or background preprocessing. Use @State only for view-owned state, not as an ad hoc cache for arbitrary computation.equatable() only when equality is cheaper than recomputing the subtree and the inputs are truly value-semantic.Use references/code-smells.md for examples, Observation-specific fan-out guidance, and remediation patterns.
Ask the user to re-run the same capture and compare with baseline metrics. Summarize the delta (CPU, frame drops, memory peak) if provided.
Provide:
Use references/report-template.md when formatting the final audit.
references/profiling-intake.mdreferences/code-smells.mdreferences/report-template.mdreferences/ as they are supplied by the user.references/optimizing-swiftui-performance-instruments.mdreferences/understanding-improving-swiftui-performance.mdreferences/understanding-hangs-in-your-app.mdreferences/demystify-swiftui-performance-wwdc23.mdtools
Instructions for interacting with a Mist robot; use when the user asks to interact with a Mistry robot.
development
Access and control the Amcrest IP camera at 10.0.0.221 via the Amcrest/Dahua HTTP API. Use when the user wants snapshots, device info, config reads/writes, streams, or PTZ-style camera control for an Amcrest camera.
tools
Refactor and review SwiftUI view files with strong defaults for small dedicated subviews, MV-over-MVVM data flow, stable view trees, explicit dependency injection, and correct Observation usage. Use when cleaning up a SwiftUI view, splitting long bodies, removing inline actions or side effects, reducing computed `some View` helpers, or standardizing `@Observable` and view model initialization patterns.
development
Best practices and example-driven guidance for building SwiftUI views and components, including navigation hierarchies, custom view modifiers, and responsive layouts with stacks and grids. Use when creating or refactoring SwiftUI UI, designing tab architecture with TabView, composing screens with VStack/HStack, managing @State or @Binding, building declarative iOS interfaces, or needing component-specific patterns and examples.