axiom-performance
Use when app feels slow, memory grows, battery drains, or diagnosing ANY performance issue. Covers memory leaks, profiling, Instruments workflows, retain cycles, performance optimization.
What this skill does
# Performance **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)** → See skills/memory-debugging.md - Systematic leak diagnosis - 5 common leak patterns - Instruments workflows - deinit not called **Memory leak scan** → Launch `memory-auditor` agent or `/axiom:audit memory` (5-phase semantic audit: maps resource ownership, detects 6 leak patterns, reasons about missing cleanup, correlates compound risks, scores lifecycle health) **Memory leaks (Objective-C blocks)** → See skills/objc-block-retain-cycles.md - Block retain cycles - Weak-strong pattern - Network callback leaks ### Performance Profiling **Performance profiling (GUI)** → See skills/performance-profiling.md - Time Profiler (CPU) - Allocations (memory growth) - Core Data profiling (N+1 queries) - Decision trees for tool selection **Automated profiling (CLI)** → See skills/xctrace-ref.md - Headless xctrace profiling - CI/CD integration patterns - Command-line trace recording - Programmatic trace analysis **Run automated profile** → Use `performance-profiler` agent or `/axiom:profile` - Records trace via xctrace - Exports and analyzes data - Reports findings with severity **Compare two traces / detect regressions** → See skills/trace-comparison.md or `/axiom:compare-traces` - Did this change slow down a hot path? Function-level CPU-share deltas - CI gating with `xcprof compare --fail-on-regression` (non-zero exit) - Regressions vs improvements, severity ranking, exit-code semantics ### Hang/Freeze Issues **App hangs or freezes** → See skills/hang-diagnostics.md - UI unresponsive for >1 second - Main thread blocked (busy or waiting) - Decision tree: busy vs blocked diagnosis - Time Profiler vs System Trace selection - 8 common hang patterns with fixes - Watchdog terminations **Corpus/aggregate hang triage (Sentry, ASC)** → `axiom-shipping (skills/production-triage.md)` + `triage-analyzer` agent - Multiple grouped hang reports from an aggregator, not a single .ips file - Classify `anr_idle_runloop` vs `anr_main_thread_block` across the corpus - Flag suspension/idle-runloop false-positives (the #1 hang by user count is often noise) - Cluster into root-cause families and rank by impact ### App Launch **Slow app launch** → See skills/app-launch.md - Slow first frame, frozen first screen, launch regression in Organizer - Launch-phase model (pre-main / main→first frame / extended launch) - Cold vs warm vs hot/resume vs notification launch — how to reproduce each - App Launch instrument workflow, `dyld Activity`, measurement hygiene - Pre-main fixes (frameworks, `+load`, mergeable libraries), main-thread deferral, priority inversion - `XCTApplicationLaunchMetric` regression test, `MXAppLaunchMetric` field histograms, custom "app is interactive" signpost - Push-notification launch path (tap→first pixel / tap→interactive targets) ### Energy Issues **Battery drain, high energy** → See skills/energy.md - Power Profiler workflow - Subsystem diagnosis (CPU/GPU/Network/Location/Display) - Anti-pattern fixes - Background execution optimization **Symptom-based diagnosis** → See skills/energy-diag.md - "App at top of Battery Settings" - "Device gets hot" - "Background battery drain" - Time-cost analysis for each path **API reference with code** → See skills/energy-ref.md - Complete WWDC code examples - Timer, network, location efficiency - BGContinuedProcessingTask (iOS 26) - MetricKit setup **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) ### Timer Safety **Timer crash patterns (DispatchSourceTimer)** → See `axiom-integration` (skills/timer-patterns.md) - 4 crash scenarios causing EXC_BAD_INSTRUCTION - RunLoop mode gotcha (Timer stops during scroll) - SafeDispatchTimer wrapper - Timer vs DispatchSourceTimer decision **Timer API reference** → See `axiom-integration` (skills/timer-patterns-ref.md) - Timer, DispatchSourceTimer, Combine, AsyncTimerSequence APIs - Lifecycle diagrams - Platform availability ### Swift Performance **Swift performance optimization** → See skills/swift-performance.md - Value vs reference types, copy-on-write - ARC overhead, generic specialization - Collection 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) **Modern Swift idioms** → See axiom-swift (skills/swift-modern.md) - Outdated API patterns (Date(), CGFloat, DateFormatter) - Foundation modernization (URL.documentsDirectory, FormatStyle) - Claude-specific hallucination corrections ### MetricKit Integration **MetricKit API reference** → See skills/metrickit-ref.md - MXMetricPayload parsing - MXDiagnosticPayload (crashes, hangs) - Field performance data collection - Integration with crash reporting ### Runtime Console Capture **Capture simulator console output** → `/axiom:console` - Capture print(), os_log(), Logger output from simulator - Structured JSON with level, subsystem, category - Bounded collection with `--timeout` and `--max-lines` - Filter by subsystem or regex ### Runtime State Inspection **LLDB interactive debugging** → See axiom-build (skills/lldb.md) - Set breakpoints, inspect variables at runtime - Crash reproduction from crash logs - Thread state analysis for hangs - Swift value inspection (po vs v) **LLDB command reference** → See axiom-build (skills/lldb-ref.md) - Complete command syntax - Breakpoint recipes - Expression evaluation patterns ## Decision Tree 1. Memory climbing + UI stutter/jank? → memory-debugging FIRST (memory pressure causes GC pauses that drop frames), then performance-profiling if memory is fixed but stutter remains 2. Memory leak (Swift)? → memory-debugging 3. Memory leak (Objective-C blocks)? → objc-block-retain-cycles 4. App hang/freeze — is UI completely unresponsive (can't tap, no feedback)? - YES → hang-diagnostics (busy vs blocked diagnosis) - NO, just slow → performance-profiling (Time Profiler) - First launch only? → Also check for synchronous I/O or lazy initialization in hang-diagnostics - Multiple grouped hang reports from Sentry/ASC (corpus, not single file)? → `axiom-shipping (skills/production-triage.md)` + `triage-analyzer` 5. Slowdown when multiple async operations complete at once? → Cross-route to `axiom-concurrency` (callback contention, not profiling) 6. Slow app launch / slow first frame / launch regression / slow after push tap? → app-launch 7. Battery drain (know the symptom)? → energy-diag 8. Battery drain (need API reference)? → energy-ref 9. Battery drain (general)? → energy 10. MetricKit setup/parsing? → metrickit-ref 11. Profile with GUI (Instruments)? → performance-profiling 12. Profile with CLI (xctrace)? → xctrace-ref 13. Run automated profile now? → performance-profiler agent 14. General slow/lag? → performance-profiling 14a. Slow GRDB/SQLite queries (EXPLAIN QUERY PLAN, index design, cursors)? → See axiom-data (skills/grdb-performance.md) 15. Want proactive memory leak scan? → memory-auditor (Agent) 16. Want energy anti-pattern scan? → energy-auditor (Agent) 17. Want Swift performance audit (ARC, generics, collections)? → swift-performance-analyzer (Agent) 18. Need to inspect variable/thread state at runtime? → See axiom-build (skills/lldb.md) 19. Need exact LLDB command syntax? → See axiom-build (skills/lldb-ref.md) 20. Timer stops
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.