# Audit SwiftUI Performance Issues

SwiftUI apps can hide rendering, identity, and state update problems that cause slow screens. This skill reviews code and profiling evidence to produce focused fixes and verification steps.

## Install

```bash
npx skillstore add dimillian/swiftui-performance-audit
```

## Metadata

- Status: approved
- Slug: dimillian-swiftui-performance-audit
- Skillstore revision: r1
- Version status: missing
- Tree hash: 6e8a43c2d90906184aca344a8a974821e977244ca44c30536f8297664f28fcee
- Author: Dimillian
- GitHub username: Dimillian
- License: MIT
- Repository: https://github.com/Dimillian/Skills/tree/main/swiftui-performance-audit
- Ref: 72d5025b022c77f7a51bdf5c1637c689c80e89d1
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 76
- Public page: https://skillstore.pages.dev/skills/dimillian-swiftui-performance-audit
- Manifest: https://skillstore.pages.dev/api/skills/dimillian-swiftui-performance-audit/manifest

## Capabilities

- Reviews SwiftUI views for excessive body work, unstable identity, and broad state dependencies.
- Guides users through SwiftUI Instruments captures when code review is not enough.
- Maps profiling symptoms to likely causes such as long body updates, hitches, and update fan-out.
- Suggests targeted refactors for state scope, list identity, caching, image decoding, and layout complexity.
- Produces prioritized findings with expected impact, effort, and re-measurement steps.

## Use Cases

- Diagnose slow SwiftUI screens: Review a problematic view and identify body work, identity, state, or layout issues that may cause delays.
- Interpret profiling evidence: Use screenshots or notes from Instruments to connect long updates and hitches to likely code changes.
- Prepare a performance review: Create a prioritized remediation plan before a release or after a regression appears in a feature branch.

## Prompt Templates

### Review one view

```
Audit this SwiftUI view for performance issues. Focus on expensive body work, state dependencies, list identity, and layout complexity.
```

### Investigate scroll jank

```
I see janky scrolling in this SwiftUI list. Review the code and suggest likely causes, fixes, and what I should measure next.
```

### Use Instruments evidence

```
Analyze these SwiftUI Instruments findings and Time Profiler notes. Map the evidence to root causes and propose prioritized remediation steps.
```

### Build a verification plan

```
Create a before-and-after verification plan for this SwiftUI performance issue. Include metrics, capture setup, expected deltas, and risk areas.
```

## Limitations

- It cannot run Instruments or collect traces without user-provided profiling output.
- It cannot guarantee performance gains without measuring the same scenario before and after changes.
- It depends on representative code, device details, build configuration, and reproduction steps.
- It focuses on SwiftUI runtime behavior, not general backend, networking, or database performance.

## Best Practices

- Provide the target SwiftUI code, reproduction steps, device model, OS version, and build configuration.
- Share Instruments screenshots or trace summaries when symptoms remain unclear after code review.
- Re-measure the same interaction after each fix to confirm the performance change.

## Anti Patterns

- Do not ask for broad optimization without code, symptoms, or a measurable target interaction.
- Do not treat every SwiftUI update as a bug without comparing it to user-visible impact.
- Do not apply many refactors at once before taking a baseline measurement.

## Security Audit

- Audited at: 2026-07-06T12:19:10.961\+00:00
- Summary: All static findings are false positives caused by Markdown backticks, Swift code examples, and ordinary SwiftUI performance guidance. I found no prompt injection, data exfiltration intent, command execution instructions, or system reconnaissance behavior in the reviewed files.

## Stats

- Views: 284
- Downloads: 10
- Favorites: 0
- Popularity score: 0
