ai/ios-skills/ios-axiom-ios-performance/SKILL.md
Use when app feels slow, memory grows, battery drains, or diagnosing ANY performance issue. Covers memory leaks, profiling, Instruments workflows, retain cycles, performance optimization.
npx skillsauth add kurko/dotfiles axiom-ios-performanceInstall 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.
You MUST use this skill for ANY performance issue including memory leaks, slow execution, battery drain, or profiling.
Use this router when:
Memory leaks (Swift) → /skill axiom-memory-debugging
Memory leak scan → Launch memory-auditor agent or /axiom:audit memory (6 common patterns: timers, observers, closures, delegates, view callbacks, PhotoKit)
Memory leaks (Objective-C blocks) → /skill axiom-objc-block-retain-cycles
Performance profiling (GUI) → /skill axiom-performance-profiling
Automated profiling (CLI) → /skill axiom-xctrace-ref
Run automated profile → Use performance-profiler agent or /axiom:profile
App hangs or freezes → /skill axiom-hang-diagnostics
Battery drain, high energy → /skill axiom-energy
Symptom-based diagnosis → /skill axiom-energy-diag
API reference with code → /skill axiom-energy-ref
Energy scan → Launch energy-auditor agent or /axiom:audit energy (8 anti-patterns: timer abuse, polling, continuous location, animation leaks, background mode misuse, network inefficiency, GPU waste, disk I/O)
Swift performance optimization → /skill axiom-swift-performance
Swift performance scan → Launch swift-performance-analyzer agent or /axiom:audit swift-performance (unnecessary copies, ARC overhead, unspecialized generics, collection inefficiencies, actor isolation costs, memory layout)
MetricKit API reference → /skill axiom-metrickit-ref
LLDB interactive debugging → /skill axiom-lldb
LLDB command reference → /skill axiom-lldb-ref
axiom-ios-concurrency (callback contention, not profiling)| Thought | Reality | |---------|---------| | "I know it's a memory leak, let me find it" | Memory leaks have 6 patterns. memory-debugging diagnoses the right one in 15 min vs 2 hours. | | "I'll just run Time Profiler" | Wrong Instruments template wastes time. performance-profiling selects the right tool first. | | "Battery drain is probably the network layer" | Energy issues span 8 subsystems. energy skill diagnoses the actual cause. | | "App feels slow, I'll optimize later" | Performance issues compound. Profiling now saves exponentially more time later. | | "It's just a UI freeze, probably a slow API call" | Freezes have busy vs blocked causes. hang-diagnostics has a decision tree for both. | | "Memory is climbing AND scrolling stutters — two separate bugs" | Memory pressure causes GC pauses that drop frames. Fix the leak first, then re-check scroll performance. | | "It only freezes on first launch, must be loading something" | First-launch hangs have 3 patterns: synchronous I/O, lazy initialization, main thread contention. hang-diagnostics diagnoses which. | | "UI locks up when network requests finish — that's slow" | Multiple callbacks completing at once = main thread contention = concurrency issue. Cross-route to ios-concurrency. | | "I'll just add print statements to debug this" | Print-debug cycles cost 3-5 min each (build + run + reproduce). An LLDB breakpoint costs 30 seconds. axiom-lldb has the commands. |
Memory Debugging (memory-debugging):
Performance Profiling (performance-profiling):
Energy Optimization (energy):
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
User: "Profile my app's CPU usage"
→ Use: performance-profiler agent (or /axiom:profile)
User: "How do I run xctrace from the command line?"
→ Invoke: /skill axiom-xctrace-ref
User: "I need headless profiling for CI/CD"
→ Invoke: /skill axiom-xctrace-ref
User: "My app hangs sometimes"
→ Invoke: /skill axiom-hang-diagnostics
User: "The UI freezes and becomes unresponsive"
→ Invoke: /skill axiom-hang-diagnostics
User: "Main thread is blocked, how do I diagnose?"
→ Invoke: /skill axiom-hang-diagnostics
User: "How do I set up MetricKit?"
→ Invoke: /skill axiom-metrickit-ref
User: "How do I parse MXMetricPayload?"
→ Invoke: /skill axiom-metrickit-ref
User: "Scan my code for memory leaks"
→ Invoke: memory-auditor agent
User: "Check my app for battery drain issues"
→ Invoke: energy-auditor agent
User: "Audit my Swift code for performance anti-patterns"
→ Invoke: swift-performance-analyzer agent
User: "How do I inspect this variable in the debugger?"
→ Invoke: /skill axiom-lldb
User: "What's the LLDB command for conditional breakpoints?"
→ Invoke: /skill axiom-lldb-ref
User: "I need to reproduce this crash in the debugger"
→ Invoke: /skill axiom-lldb
User: "My list scrolls slowly and memory keeps growing"
→ Invoke: /skill axiom-memory-debugging first, then /skill axiom-performance-profiling if stutter remains
User: "App freezes for a few seconds on first launch then works fine"
→ Invoke: /skill axiom-hang-diagnostics
User: "UI locks up when multiple API calls return at the same time"
→ Cross-route: /skill axiom-ios-concurrency (callback contention)
tools
Create a GitHub pull request from the current branch. Use when user asks to create a PR, open a PR, submit a PR, push and create PR, or similar pull request workflows. Activates for phrases like "create a PR", "open a pull request", "submit PR", "push and PR", "make a PR for this", "open a draft PR".
data-ai
Merge the current worktree branch into main and sync main back. Use when the user says "merge to main", "ship it", "merge and continue", or after completing a task in a worktree and wanting to continue with the next one.
tools
Synchronize AI agent skills, commands, configs, permissions, hooks, and instructions across Claude Code, Codex CLI, and other Agent Skills-compatible tools. Use when the user asks to pull skills from Claude into Codex, sync Codex work back to Claude, migrate agent commands, reconcile frontmatter, update permissions, or keep agent setup files in parity.
testing
Write or update UI-independent use cases for QA. Use when the user says "write use cases", "add use cases", "QA use cases", "update use cases", "compose use cases", or when starting implementation of a new feature (after plan approval). Also activates for "what should we test", "regression cases", or "use cases for QA".