/swift-modern-dev:swift-performance-optimizationfrom swift-modern-dev
Profiles slow SwiftUI screens, optimizes lists, reduces main-thread work, and uses Instruments Time Profiler and Swift Concurrency for diagnosing performance issues.
Ships in swift-modern-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Profile first, then fix the measured hot path.
| ALWAYS | NEVER |
|---|---|
| Measure with Instruments before large rewrites | Micro-optimize unmeasured code |
Keep heavy work off @MainActor | Block main actor with parsing/image work |
Prefer @Observable fine-grained updates | Force full-tree invalidation patterns |
| Use lazy stacks/grids for large collections | Eagerly build thousands of heavy subviews |
memory-leak-diagnosis + Allocations// Large lists: stable identity + light rows
List(items) { item in
ItemRow(item: item) // small view, no heavy work in body
}
.listStyle(.plain)
// Background compute
actor Processor {
func process(_ input: Data) async -> Result { /* heavy */ }
}
@MainActor
@Observable
final class VM {
var result: Result?
private let processor = Processor()
func run(_ data: Data) async {
result = await processor.process(data)
}
}
// AsyncImage with phases; cache if product requires
AsyncImage(url: url) { phase in
switch phase {
case .success(let image): image.resizable().scaledToFill()
case .failure: Image(systemName: "photo")
default: ProgressView()
}
}
What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/ios-accessibilityUse when implementing or auditing VoiceOver, Dynamic Type, accessibility labels, focus, contrast, or Hit-testing for SwiftUI iOS/macOS apps./memory-leak-diagnosisUse when investigating memory growth, retain cycles, leaks in Instruments, Task cancellation issues, or ARC problems in Swift 6 apps./swift-anti-pattern-guardUse when reviewing Swift code for outdated patterns, modernizing a project, running architecture health checks, or grepping for ObservableObject, DispatchQueue.main, NavigationView, or Core Data.npx claudepluginhub pstuart/pstuart --plugin swift-modern-devOther plugins' skills for the same job