termio-device
See and drive the sibling agent sessions running alongside you on this machine via the…
Audit and improve SwiftUI runtime performance. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory usage, excessive view updates, or layout thrash in SwiftUI apps.
$ npx -y skills add termio-sh/termio --skill swiftui-performance-audit --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/swiftui-performance-auditContext preview
The summary Claude sees to decide when to auto-load this skill.
Audit and improve SwiftUI runtime performance. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory usage, excessive view updates, or layout thrash in SwiftUI apps.
name: performance-audit description: Audit and improve SwiftUI runtime performance. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory usage, excessive view updates, or layout thrash in SwiftUI apps.
Audit SwiftUI view performance from instrumentation and baselining to root-cause analysis and concrete remediation steps.
1. **If user provides code**: Start with Code-First Review 2. **If user only describes symptoms**: Ask for minimal code/context, then Code-First Review 3. **If code review is inconclusive**: Guide user to profile with Instruments
If code review is inconclusive, explain how to collect data:
1. Use SwiftUI template in Instruments (Release build) 2. Reproduce the exact interaction (scroll, navigation, animation) 3. Capture SwiftUI timeline and Time Profiler 4. Export or screenshot relevant lanes and call tree
Ask for:
**Bad:**
var body: some View {
let formatter = NumberFormatter() // Slow allocation every render
Text(formatter.string(from: value))
}**Good:**
final class Formatters {
static let number = NumberFormatter()
}
var body: some View {
Text(Formatters.number.string(from: value))
}**Bad:**
var filtered: [Item] {
items.filter { $0.isEnabled } // Runs every body eval
}**Good:**
@State private var filtered: [Item] = []
.onChange(of: items) {
filtered = items.filter { $0.isEnabled }
}**Bad:**
ForEach(items.sorted(by: sortRule)) { item in
Row(item)
}**Good:**
let sortedItems = items.sorted(by: sortRule) // Compute once
ForEach(sortedItems) { item in
Row(item)
}**Bad:**
ForEach(items, id: \.self) { item in // \.self may not be stable
Row(item)
}**Good:**
ForEach(items, id: \.stableID) { item in
Row(item)
}**Bad:**
Image(uiImage: UIImage(data: data)!)
**Good:**
// Decode/downsample off main thread, cache the result
@State private var image: UIImage?
.task {
image = await ImageLoader.load(data: data, targetSize: size)
}**Bad:**
@Observable class Model {
var items: [Item] = []
}
var body: some View {
Row(isFavorite: model.items.contains(item)) // Entire array dependency
}**Good:**
// Granular view models or per-item state to reduce update fan-out
| Issue | Fix | |-------|-----| | Broad state changes | Narrow scope with `@State`/`@Observable` closer to leaves | | Unstable identities | Use stable, unique IDs for `ForEach` | | Heavy work in body | Precompute, cache, move to `@State` | | Expensive subtrees | Use `equatable()` or value wrappers | | Large images | Downsample before rendering | | Layout complexity | Reduce nesting, use fixed sizing where possible |
Ask user to re-run same capture and compare with baseline:
Provide: 1. Metrics table (before/after if available) 2. Top issues (ordered by impact) 3. Proposed fixes with estimated effort
# Build for profiling xcodebuild -scheme MyApp -configuration Release -destination 'platform=iOS Simulator,name=iPhone 15 Pro' build # Open in Instruments open -a Instruments
A terminal-first agentic development environment for agentic coding. Build for CLI/TUI agent. Runtime for Coding Agent, Tmux alternative
Repo: termio-sh/termio
See and drive the sibling agent sessions running alongside you on this machine via the…
See and drive the sibling agent sessions running alongside you in this Termio project via the…
Reverse-lookup glossary that turns a vague description of a web animation or motion effect…
Drive the running termio app via AppleScript / System Events to reach a UI state (focus the…
Apple's approach to interface design and fluid, physical motion, translated for the web. Use…
Drive App Store Connect from the terminal with the `asc` CLI — TestFlight builds, groups,…