axiom-ios-performance

0
0
Source

Use when app feels slow, memory grows, battery drains, or diagnosing ANY performance issue. Covers memory leaks, profiling, Instruments workflows, retain cycles, performance optimization.

Install

mkdir -p .claude/skills/axiom-ios-performance && curl -L -o skill.zip "https://mcp.directory/api/skills/download/5668" && unzip -o skill.zip -d .claude/skills/axiom-ios-performance && rm skill.zip

Installs to .claude/skills/axiom-ios-performance

About this skill

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 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

  • Block retain cycles
  • Weak-strong pattern
  • Network callback leaks

Performance Profiling

Performance profiling (GUI)/skill axiom-performance-profiling

  • Time Profiler (CPU)
  • Allocations (memory growth)
  • Core Data profiling (N+1 queries)
  • Decision trees for tool selection

Automated profiling (CLI)/skill axiom-xctrace-ref

  • 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

Hang/Freeze Issues

App hangs or freezes/skill axiom-hang-diagnostics

  • 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

Energy Issues

Battery drain, 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

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)/skill axiom-timer-patterns

  • 4 crash scenarios causing EXC_BAD_INSTRUCTION
  • RunLoop mode gotcha (Timer stops during scroll)
  • SafeDispatchTimer wrapper
  • Timer vs DispatchSourceTimer decision

Timer API reference/skill axiom-timer-patterns-ref

  • Timer, DispatchSourceTimer, Combine, AsyncTimerSequence APIs
  • Lifecycle diagrams
  • Platform availability

Swift Performance

Swift performance optimization/skill axiom-swift-performance

  • 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/skill axiom-swift-modern

  • Outdated API patterns (Date(), CGFloat, DateFormatter)
  • Foundation modernization (URL.documentsDirectory, FormatStyle)
  • Claude-specific hallucination corrections

MetricKit Integration

MetricKit API reference/skill axiom-metrickit-ref

  • MXMetricPayload parsing
  • MXDiagnosticPayload (crashes, hangs)
  • Field performance data collection
  • Integration with crash reporting

Runtime Console Capture

Capture simulator console output/skill axiom-xclog-ref or /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/skill axiom-lldb

  • 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/skill axiom-lldb-ref

  • 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
  5. Slowdown when multiple async operations complete at once? → Cross-route to axiom-ios-concurrency (callback contention, not profiling)
  6. Battery drain (know the symptom)? → energy-diag
  7. Battery drain (need API reference)? → energy-ref
  8. Battery drain (general)? → energy
  9. MetricKit setup/parsing? → metrickit-ref
  10. Profile with GUI (Instruments)? → performance-profiling
  11. Profile with CLI (xctrace)? → xctrace-ref
  12. Run automated profile now? → performance-profiler agent
  13. General slow/lag? → performance-profiling
  14. Want proactive memory leak scan? → memory-auditor (Agent)
  15. Want energy anti-pattern scan? → energy-auditor (Agent)
  16. Want Swift performance audit (ARC, generics, collections)? → swift-performance-analyzer (Agent)
  17. Need to inspect variable/thread state at runtime? → axiom-lldb
  18. Need exact LLDB command syntax? → axiom-lldb-ref
  19. Timer stops during scrolling? → timer-patterns (RunLoop mode)
  20. EXC_BAD_INSTRUCTION crash with DispatchSourceTimer? → timer-patterns (4 crash patterns)
  21. Choosing between Timer, DispatchSourceTimer, Combine timer, async timer? → timer-patterns
  22. Need timer API syntax/lifecycle? → timer-patterns-ref
  23. Code review for outdated Swift patterns? → swift-modern
  24. Claude generating legacy APIs (DateFormatter, CGFloat, DispatchQueue)? → swift-modern
  25. Need to see runtime console output before profiling? → xclog-ref or /axiom:console

Anti-Rationalization

ThoughtReality
"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.
"I can't see what the app is logging"xclog captures print() + os_log from the simulator with structured JSON. /axiom:console or /skill axiom-xclog-ref.
"I'll just use Timer.scheduledTimer, it's simpler"Timer stops during scrolling (.default mode), retains its target (leak). timer-patterns has the decision tree.
"DispatchSourceTimer crashed but it's intermittent, let's ship"DispatchSourceTimer has 4 crash patterns that are ALL deterministic. timer-patterns diagnoses which one.
"Claude already knows modern Swift"Claude defaults to pre-5.5 patterns (Date(), CGFloat, filter().count). swift-modern has the correction table.

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 impleme


Content truncated.

axiom-ios-build

CharlesWiltgen

Use when ANY iOS build fails, test crashes, Xcode misbehaves, or environment issue occurs before debugging code. Covers build failures, compilation errors, dependency conflicts, simulator problems, environment-first diagnostics.

91

axiom-getting-started

CharlesWiltgen

Use when first installing Axiom, unsure which skill to use, want an overview of available skills, or need help finding the right skill for your situation — interactive onboarding that recommends skills based on your project and current focus

00

axiom-ui-testing

CharlesWiltgen

Use when writing UI tests, recording interactions, tests have race conditions, timing dependencies, inconsistent pass/fail behavior, or XCTest UI tests are flaky - covers Recording UI Automation (WWDC 2025), condition-based waiting, network conditioning, multi-factor testing, crash debugging, and accessibility-first testing patterns

00

axiom-core-spotlight-ref

CharlesWiltgen

Use when indexing app content for Spotlight search, using NSUserActivity for prediction/handoff, or choosing between CSSearchableItem and IndexedEntity - covers Core Spotlight framework and NSUserActivity integration for iOS 9+

00

axiom-vision-diag

CharlesWiltgen

subject not detected, hand pose missing landmarks, low confidence observations, Vision performance, coordinate conversion, VisionKit errors, observation nil, text not recognized, barcode not detected, DataScannerViewController not working, document scan issues

00

axiom-now-playing-carplay

CharlesWiltgen

CarPlay Now Playing integration patterns. Use when implementing CarPlay audio controls, CPNowPlayingTemplate customization, or debugging CarPlay-specific issues.

00

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.