Use Xcode Instruments command line tools to analyze iOS app performance, detect memory leaks, optimize launch times, monitor CPU usage, and identify performance bottlenecks for the iOS project
/plugin marketplace add daispacy/py-claude-marketplace/plugin install py-plugin@py-claude-marketplaceThis skill is limited to using the following tools:
examples.mdWhen helping with iOS app performance optimization using Instruments command line tools:
CRITICAL: Always use device UUID, never device names
xcrun simctl list devices available | grep "iPhone"F464E766-555C-4B95-B8CC-763702A70791Clean installation state (REQUIRED)
xcrun simctl uninstall $DEVICE_UUID <bundle id>Build configuration
Use xcrun xctrace list templates to see available templates:
Standard workflow:
DEVICE_UUID="F464E766-555C-4B95-B8CC-763702A70791" # this is sample uuid, run command line to get exist uuid
xcrun simctl uninstall $DEVICE_UUID <bundle id>
xcrun simctl install $DEVICE_UUID /path/to/<app name>.app
sleep 2
xcrun xctrace record --template "App Launch" --device $DEVICE_UUID \
--launch -- /path/to/<app name>.app 2>&1
Important notes:
Launch_<app name>.app_2025-10-30_3.55.40 PM_39E6A410.trace--output parameter may be ignored; accept auto-generated names2>&1 to capture all outputFinding trace files:
ls -lt *.trace | head -1 # Most recent trace
find . -name "*.trace" -type d -mmin -5 # Files from last 5 minutes
Analysis approaches:
CLI export often fails - "trace is malformed" errors are common
Recommended: Open in Instruments.app GUI for reliable analysis
open -a Instruments.app Launch_<app name>*.trace
Parse signpost markers for performance metrics
Identify bottlenecks in launch sequence, memory allocations, CPU hotspots
Based on successful optimizations:
❌ Using device names instead of UUIDs ❌ Skipping clean installation step ❌ Building in Debug mode ❌ Trying to export trace immediately after recording ❌ Assuming --output path will be used ❌ Not waiting between installation and profiling
See examples in this skill directory for: