native-app-performance
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.
Best use case
native-app-performance is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using native-app-performance should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/native-app-performance/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How native-app-performance Compares
| Feature / Agent | native-app-performance | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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): ```bash # Start app yourself, then attach xcrun xctrace record --template 'Time Profiler' --time-limit 90s --output /tmp/App.trace --attach <pid> ``` 2) Record Time Profiler (launch): ```bash xcrun xctrace record --template 'Time Profiler' --time-limit 90s --output /tmp/App.trace --launch -- /path/App.app/Contents/MacOS/App ``` 3) Extract time samples: ```bash scripts/extract_time_samples.py --trace /tmp/App.trace --output /tmp/time-sample.xml ``` 4) Get load address for symbolication: ```bash # While app is running vmmap <pid> | rg -m1 "__TEXT" -n ``` 5) Symbolicate + rank hotspots: ```bash 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 record` and `xcrun xctrace help export` show 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 `__TEXT` load address from `vmmap`. - If using a new build, update the `--binary` path; symbols must match the trace. - CLI-only flow: no need to open Instruments if stacks are symbolicated via `atos`.
Related Skills
upgrading-react-native
Upgrades React Native apps to newer versions by applying rn-diff-purge template diffs, updating package.json dependencies, migrating native iOS and Android configuration, resolving CocoaPods and Gradle changes, and handling breaking API updates. Use when upgrading React Native, bumping RN version, updating from RN 0.x to 0.y, or migrating Expo SDK alongside a React Native upgrade.
swiftui-performance-audit
Audit and improve SwiftUI runtime performance from code review and architecture. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory usage, excessive view updates, or layout thrash in SwiftUI apps, and to provide guidance for user-run Instruments profiling when code review alone is insufficient.
react-native-best-practices
Provides React Native performance optimization guidelines for FPS, TTI, bundle size, memory leaks, re-renders, and animations. Applies to tasks involving Hermes optimization, JS thread blocking, bridge overhead, FlashList, native modules, or debugging jank and frame drops.
python-performance-optimization
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.
native-data-fetching
Use when implementing or debugging ANY network request, API call, or data fetching. Covers fetch API, React Query, SWR, error handling, caching, offline support, and Expo Router data loaders (useLoaderData).
building-native-ui
Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.
performance-profiler
Performance Profiler
competitor-alternatives
When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'switch from competitor,' or 'comparison content.' Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. Emphasizes deep research, modular content architecture, and varied section types beyond feature tables.
youtube-watcher
Fetch and read transcripts from YouTube videos. Use when you need to summarize a video, answer questions about its content, or extract information from it.
youtube-transcript
Fetch and summarize YouTube video transcripts. Use when asked to summarize, transcribe, or extract content from YouTube videos. Handles transcript fetching via residential IP proxy to bypass YouTube's cloud IP blocks.
youtube-auto-captions - YouTube 自动字幕
## 描述
youtube
YouTube Data API integration with managed OAuth. Search videos, manage playlists, access channel data, and interact with comments. Use this skill when users want to interact with YouTube. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).