charleswiltgen/axiom/axiom-performance

Claude Code and agent skill by charleswiltgen/axiom

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

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

Install

npx vskill@latest install charleswiltgen/axiom/axiom-performance

SKILL.md

Performance

You MUST use this skill for ANY performance issue including memory leaks, slow execution, battery drain, or profiling.

Bundled tools on Claude Code: if command -v <tool> finds nothing (hooks off or --bare), use <plugin-root>/tools/<tool> in place of the bare name; <plugin-root> is two levels above this skill's Base directory for this skill: path.

<!-- AXIOM_AUDITOR_INLINE_BEGIN — rewritten for Codex by scripts/build-codex.ts; do not hand-edit -->

Auditors are skills here. Where this router says "Launch some-auditor agent", invoke the
matching Codex skill instead — same procedure, no Claude Code agent required.
Available: axiom-analyze-swift-performance, axiom-audit-energy, axiom-audit-memory.
The ones that shell out — builds, tests, simulators, crash symbolication — need shell access to run.

<!-- AXIOM_AUDITOR_INLINE_END -->

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 → 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), incl. Top Functions mode for scattered overhead (OS27)
  • Allocations (memory growth)
  • Core Data profiling (N+1 queries)
  • Decision trees for tool selection
  • Instruments 27 Run Comparisons, Swift executors instrument, Foundation Models instrument; Xcode 27 Organizer (Storage/hitches metrics, Metric Goals, Generate Recommendations)

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

  • 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 (Claude Code only)

  • 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: linkage strategy (static vs dynamic vs mergeable, MERGED_BINARY_TYPE/MERGEABLE_LIBRARY), +load, 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 → 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 trapping with BUG IN CLIENT OF LIBDISPATCH — EXC_BREAKPOINT (SIGTRAP) on arm64, EXC_BAD_INSTRUCTION on Intel
  • 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 → axiom-analyze-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

  • New Swift-first API (OS27): MetricManager AsyncSequence streams, typed MetricResult metrics (incl. Metal frame rate, storage), typed diagnostics with termination categories, launch-task tracking
  • Per-state metrics (StateReporting framework, OS27): split hitch/hang/memory metrics by tab, mode, or experiment
  • Crash reporter extensions (CrashReportExtension framework, OS27): process crashes at crash time with in-extension symbolication (Part 10)
  • MXMetricPayload / MXDiagnosticPayload parsing (legacy, iOS 13–26)
  • Field performance data collection
  • Integration with crash reporting
Runtime Console Capture

Capture simulator console output → /axiom:console (Claude Code only)

  • 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
  1. Slowdown when multiple async operations complete at once? → Cross-route to axiom-concurrency (callback contention, not profiling)
  2. Slow app launch / slow first frame / launch regression / slow after push tap? → app-launch
  3. Battery drain (know the symptom)? → energy-diag
  4. Battery drain (need API reference)? → energy-ref
  5. Battery drain (general)? → energy
  6. MetricKit setup/parsing? → metrickit-ref

10a. Metrics split by app state (per-tab hitch rate, experiment arms) or StateReporting? → metrickit-ref (Part 1) 10b. Profiling agentic/LLM features (Foundation Models instrument, token metrics)? → performance-profiling, then axiom-ai 10c. Building a crash reporter extension (process crashes at crash time)? → metrickit-ref (Part 10)

  1. Profile with GUI (Instruments)? → performance-profiling
  2. Profile with CLI (xctrace)? → xctrace-ref
  3. Run automated profile now? → performance-profiler agent
  4. General slow/lag? → performance-profiling

14a. Slow GRDB/SQLite queries (EXPLAIN QUERY PLAN, index design, cursors)? → See axiom-data (skills/grdb-performance.md)

  1. Want proactive memory leak scan? → memory-auditor (Agent)
  2. Want energy anti-pattern scan? → energy-auditor (Agent)
  3. Want Swift performance audit (ARC, generics, collections)? → swift-performance-analyzer (Agent)
  4. Need to inspect variable/thread state at runtime? → See axiom-build (skills/lldb.md)
  5. Need exact LLDB command syntax? → See axiom-build (skills/lldb-ref.md)
  6. Timer stops during scrolling? → timer-patterns (RunLoop mode)
  7. EXC_BREAKPOINT (SIGTRAP) crash with DispatchSourceTimer — BUG IN CLIENT OF LIBDISPATCH? → timer-patterns (4 crash patterns)
  8. Choosing between Timer, DispatchSourceTimer, Combine timer, async timer? → timer-patterns
  9. Need timer API syntax/lifecycle? → timer-patterns-ref
  10. Code review for outdated Swift patterns? → swift-modern
  11. Claude generating legacy APIs (DateFormatter, CGFloat, DispatchQueue)? → swift-modern
  12. Need to see runtime console output before profiling? → axiom-tools (skills/xclog-ref.md) or /axiom:console (Claude Code only)
  13. Have an .ips, MetricKit, or legacy .crash text file to symbolicate/triage? → axiom-tools (skills/xcsym-ref.md) or axiom-analyze-crash

Anti-Rationalization

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1,180
Repository forks
85
7-day trend score
35

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/charleswiltgen/axiom/axiom-performance/badge)](https://verified-skill.com/skills/charleswiltgen/axiom/axiom-performance)

Something wrong with this skill or its page? Tell us.