Use when app feels slow, memory grows, battery drains, or diagnosing ANY performance issue. Covers memory leaks, profiling, Instruments workflows, retain cycles, performance optimization.
Installation
Details
Usage
After installing, this skill will be available to your AI coding assistant.
Verify installation:
skills listSkill Instructions
name: axiom-ios-performance description: Use when app feels slow, memory grows, battery drains, or diagnosing ANY performance issue. Covers memory leaks, profiling, Instruments workflows, retain cycles, performance optimization.
iOS Performance Router
You MUST use this skill for ANY performance issue including memory leaks, slow execution, battery drain, or profiling.
When to Use
Use this router when:
- App feels slow or laggy
- Memory usage grows over time
- Battery drains quickly
- Device gets hot during use
- High energy usage in Battery Settings
- Diagnosing performance with Instruments
- Memory leaks or retain cycles
- App crashes with memory warnings
Routing Logic
Memory Issues
Memory leaks (Swift) → /skill axiom-memory-debugging
- Systematic leak diagnosis
- 5 common leak patterns
- Instruments workflows
- deinit not called
Memory leaks (Objective-C blocks) → /skill axiom-objc-block-retain-cycles
- Block retain cycles
- Weak-strong pattern
- Network callback leaks
Performance Profiling
Performance profiling → /skill axiom-performance-profiling
- Time Profiler (CPU)
- Allocations (memory growth)
- Core Data profiling (N+1 queries)
- Decision trees for tool selection
Energy Issues
Battery drain, axiom-high energy → /skill axiom-energy
- Power Profiler workflow
- Subsystem diagnosis (CPU/GPU/Network/Location/Display)
- Anti-pattern fixes
- Background execution optimization
Symptom-based diagnosis → /skill axiom-energy-diag
- "App at top of Battery Settings"
- "Device gets hot"
- "Background battery drain"
- Time-cost analysis for each path
API reference with code → /skill axiom-energy-ref
- Complete WWDC code examples
- Timer, network, location efficiency
- BGContinuedProcessingTask (iOS 26)
- MetricKit setup
Decision Tree
User reports performance issue
├─ Memory?
│ ├─ Swift code? → memory-debugging
│ └─ Objective-C blocks? → objc-block-retain-cycles
│
├─ Energy/Battery?
│ ├─ Know the symptom? → energy-diag
│ ├─ Need API reference? → energy-ref
│ └─ General battery drain? → energy
│
├─ Want to profile?
│ └─ YES → performance-profiling
│
└─ General slow/lag? → performance-profiling
Critical Patterns
Memory Debugging (memory-debugging):
- 6 leak patterns: timers, observers, closures, delegates, view callbacks, PhotoKit
- Instruments workflows
- Leak vs caching distinction
Performance Profiling (performance-profiling):
- Time Profiler for CPU bottlenecks
- Allocations for memory growth
- Core Data SQL logging for N+1 queries
- Self Time vs Total Time
Energy Optimization (energy):
- Power Profiler subsystem diagnosis
- 8 anti-patterns: timers, polling, location, animations, background, network, GPU, disk
- Audit checklists by subsystem
- Pressure scenarios for deadline resistance
Example Invocations
User: "My app's memory usage keeps growing"
→ Invoke: /skill axiom-memory-debugging
User: "I have a memory leak but deinit isn't being called"
→ Invoke: /skill axiom-memory-debugging
User: "My app feels slow, where do I start?"
→ Invoke: /skill axiom-performance-profiling
User: "My Objective-C block callback is leaking"
→ Invoke: /skill axiom-objc-block-retain-cycles
User: "My app drains battery quickly"
→ Invoke: /skill axiom-energy
User: "Users say the device gets hot when using my app"
→ Invoke: /skill axiom-energy-diag
User: "What's the best way to implement location tracking efficiently?"
→ Invoke: /skill axiom-energy-ref
More by CharlesWiltgen
View allUse when porting OpenGL/DirectX to Metal - translation layer vs native rewrite decisions, migration planning, anti-patterns
Use when UI is slow, scrolling lags, animations stutter, or when asking 'why is my SwiftUI view slow', 'how do I optimize List performance', 'my app drops frames', 'view body is called too often', 'List is laggy' - SwiftUI performance optimization with Instruments 26 and WWDC 2025 patterns
Use for Core Location troubleshooting - no location updates, background location broken, authorization denied, geofence not triggering
Reference — Comprehensive SwiftUI navigation guide covering NavigationStack (iOS 16+), NavigationSplitView (iOS 16+), NavigationPath, deep linking, state restoration, Tab+Navigation integration (iOS 18+), Liquid Glass navigation (iOS 26+), and coordinator patterns