native-app-performance
Automates Time Profiler trace recording, data symbolication, and performance bottleneck ranking without the Instruments UI.
Install
mkdir -p .claude/skills/native-app-performance && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4386" && unzip -o skill.zip -d .claude/skills/native-app-performance && rm skill.zipInstalls to .claude/skills/native-app-performance
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Native macOS/iOS app performance profiling via xctrace/Time Profiler and CLI-only analysis of Instruments traces. Use when asked to profile, attach, record, or analyze Instruments .trace files, find hotspots, or optimize native app performance without opening Instruments UI.Key capabilities
- →Record Time Profiler traces for macOS and iOS apps
- →Extract time samples from .trace files into XML format
- →Retrieve binary load addresses using vmmap
- →Symbolicate and rank performance hotspots
- →Analyze performance without the Instruments UI
How it works
It uses xctrace to capture performance data and custom Python scripts to parse, symbolicate, and rank the resulting trace samples.
Inputs & outputs
When to use native-app-performance
- →Profile macOS app performance
- →Find bottlenecks in iOS apps
- →Analyze trace files via CLI
- →Optimize runtime hotspots
About this skill
Native App Performance (CLI-only)
Goal: record Time Profiler via xctrace, extract samples, symbolicate, and propose hotspots without opening Instruments.
Quick start (CLI)
- Record Time Profiler (attach):
# Start app yourself, then attach
xcrun xctrace record --template 'Time Profiler' --time-limit 90s --output /tmp/App.trace --attach <pid>
- Record Time Profiler (launch):
xcrun xctrace record --template 'Time Profiler' --time-limit 90s --output /tmp/App.trace --launch -- /path/App.app/Contents/MacOS/App
- Extract time samples:
scripts/extract_time_samples.py --trace /tmp/App.trace --output /tmp/time-sample.xml
- Get load address for symbolication:
# While app is running
vmmap <pid> | rg -m1 "__TEXT" -n
- Symbolicate + rank hotspots:
scripts/top_hotspots.py --samples /tmp/time-sample.xml \
--binary /path/App.app/Contents/MacOS/App \
--load-address 0x100000000 --top 30
Workflow notes
- Always confirm you’re profiling the correct binary (local build vs /Applications). Prefer direct binary path for
--launch. - Ensure you trigger the slow path during capture (menu open/close, refresh, etc.).
- If stacks are empty, capture longer or avoid idle sections.
xcrun xctrace help recordandxcrun xctrace help exportshow correct flags.
Included scripts
scripts/record_time_profiler.sh: record via attach or launch.scripts/extract_time_samples.py: export time-sample XML from a trace.scripts/top_hotspots.py: symbolicate and rank top app frames.
Gotchas
- ASLR means you must use the runtime
__TEXTload address fromvmmap. - If using a new build, update the
--binarypath; symbols must match the trace. - CLI-only flow: no need to open Instruments if stacks are symbolicated via
atos.
When not to use it
- →Profiling non-macOS or non-iOS applications
- →Scenarios requiring real-time visual inspection of Instruments UI
Prerequisites
Limitations
- →Requires matching binary symbols to the trace file
- →ASLR necessitates manual retrieval of the __TEXT load address
- →Empty stacks occur if capture duration is too short or the app is idle
How it compares
It provides a CLI-only workflow for performance profiling that avoids the overhead of the graphical Instruments interface.
Compared to similar skills
native-app-performance side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| native-app-performance (this skill) | 1 | 7mo | Review | Advanced |
| chrome-devtools | 41 | 7mo | Review | Intermediate |
| python-performance-optimization | 27 | 2mo | No flags | Intermediate |
| analyzing-logs | 14 | 27d | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by harperreed
View all by harperreed →You might also like
chrome-devtools
mrgoonie
Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.
python-performance-optimization
wshobson
Profile and optimize Python code using cProfile, memory profilers, and performance best practices. Use when debugging slow Python code, optimizing bottlenecks, or improving application performance.
analyzing-logs
jeremylongshore
Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.
redis-inspect
civitai
Inspect Redis cache keys, values, and TTLs for debugging. Supports both main cache and system cache. Use for debugging cache issues, checking cached values, and monitoring cache state. Read-only by default.
obsidian-performance-tuning
jeremylongshore
Optimize Obsidian plugin performance for smooth operation. Use when experiencing lag, memory issues, or slow startup, or when optimizing plugin code for large vaults. Trigger with phrases like "obsidian performance", "obsidian slow", "optimize obsidian plugin", "obsidian memory usage".
obsidian-observability
jeremylongshore
Set up comprehensive logging and monitoring for Obsidian plugins. Use when implementing debug logging, tracking plugin performance, or setting up error reporting for your Obsidian plugin. Trigger with phrases like "obsidian logging", "obsidian monitoring", "obsidian debug", "track obsidian plugin".