steipete avatar

Native App Performance

If you're tired of waiting for Instruments to open just to find performance bottlenecks, this gets you Time Profiler data entirely from the command line. You attach to or launch your app with xctrace, extract the samples to XML, then symbolicate and rank the hotspots using atos and the runtime load address from vmmap. It includes Python scripts that do the extraction and ranking for you. The workflow is solid if you're already living in the terminal and just want stack traces with line numbers pointing to your top 30 CPU hogs. One catch: you need to match your binary exactly and grab the ASLR offset while the app is running, but the docs walk you through it.

skills.sh installs
248
GitHub stars
7.5K
last updated
Aug 21, 2026

Install

$ npx -y skills add steipete/agent-scripts --skill native-app-performance --agent claude-code

Installs into .claude/skills of the current project.

Files

Native App Performance (CLI-only)

Goal: record Time Profiler via xctrace, extract samples, symbolicate, and propose hotspots without opening Instruments.

Quick start (CLI)

  1. Record Time Profiler (attach):
# Start app yourself, then attach
xcrun xctrace record --template 'Time Profiler' --time-limit 90s --output /tmp/App.trace --attach <pid>
  1. Record Time Profiler (launch):
xcrun xctrace record --template 'Time Profiler' --time-limit 90s --output /tmp/App.trace --launch -- /path/App.app/Contents/MacOS/App
  1. Extract time samples:
scripts/extract_time_samples.py --trace /tmp/App.trace --output /tmp/time-sample.xml
  1. Get load address for symbolication:
# While app is running
vmmap <pid> | rg -m1 "__TEXT" -n
  1. 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

Sponsors

Details

Repository
github.com/steipete/agent-scripts
Categories
AI & Agent Building, Debugging
First seen
Jun 3, 2026

More from steipete/agent-scripts

All 9
1thedivergentai avatargodot-platform-mobilethedivergentai/gd-agentic-skillsExpert blueprint for mobile platforms (Android/iOS) covering touch controls, virtual joysticks, responsive UI, safe areas (notches), battery optimization, and a248skills.sh installs
2langchain-ai avatarcuml-machine-learninglangchain-ai/deepagentsUse for GPU-accelerated machine learning on tabular data using NVIDIA cuML. Triggers when tasks involve classification, regression, clustering, dimensionality r247skills.sh installs
3thedivergentai avatargodot-export-buildsthedivergentai/gd-agentic-skillsExpert patterns for multi-platform exports including export templates (Windows/Linux/macOS/Android/iOS/Web), command-line exports (headless mode), platform-spec246skills.sh installs
4itsmostafa avatarcloudwatchitsmostafa/aws-agent-skillsAWS CloudWatch monitoring for logs, metrics, alarms, and dashboards. Use when setting up monitoring, creating alarms, querying logs with Insights, configuring m245skills.sh installs
5maxnorm avatarmagento-api-developermaxnorm/magento2-agent-skillsDesigns and implements REST and GraphQL APIs for Magento 2. Use when developing APIs, creating service contracts, building headless commerce solutions, or integ245skills.sh installs
6thedivergentai avatargodot-navigation-pathfindingthedivergentai/gd-agentic-skillsExpert blueprint for AI pathfinding (tower defense, RTS, stealth) using NavigationAgent2D/3D, NavigationServer, avoidance, and dynamic navigation mesh generatio245skills.sh installs