Agent skill · data analytics · sundial-org
instruments-profiling
Use when profiling native macOS or iOS apps with Instruments/xctrace. Covers correct binary selection, CLI arguments, exports, and common gotchas.
Why this skill is useful
Provides specific CLI commands and workflows for profiling macOS/iOS apps that the AI wouldn't reliably generate on its own.
What it needs
Requires xcode installed locally. About 2k tokens when loaded. Last updated 2026-03-07. 639 stars on the source repository.
What this skill does
Instruments Profiling (macOS/iOS) Use this skill when the user wants performance profiling or stack analysis for native apps. Focus: Time Profiler, xctrace CLI, and picking the correct binary/app instance. Quick Start (CLI) List templates: xcrun xctrace list templates Record Time Profiler (launch): xcrun xctrace record --template 'Time Profiler' --time-limit 60s --output /tmp/App.trace --launch -- /path/To/App.app Record Time Profiler (attach): Launch app yourself, get PID, then: xcrun xctrace record --template 'Time Profiler' --time-limit 60s --output /tmp/App.trace --attach <pid> Open trace in Instruments: open -a Instruments /tmp/App.trace Note: xcrun xctrace --help is not a valid subcommand. Use xcrun xctrace help record. Picking the Correct Binary (Critical) Gotcha: Instruments may profile the wrong app (e.g., one in /Applications) if LaunchServices resolves a different bundle. Use these rules: Prefer direct binary path for deterministic launch: xcrun xctrace record ... --launch -- /path/App.app/Contents/MacOS/App If launching .app, ensure it’s the intended bundle: open -n /path/App.app Verify with ps -p <pid> -o comm= -o command= If both /Applications/App.app and a local build exist, explicitly target the local build path. After launch, confirm the process path before trusting the trace. Command Arguments (xctrace) --template 'Time Profiler': template name from xctrace list templates. --launch -- <cmd>: everything after -- is the target command (binary or app bundle). --attach <pid name>: attach to running process. --output <path>: .trace output. If omitted, file saved in CWD. --time-limit 60s 5m: set capture duration. --device <name UDID>: required for iOS device runs. --target-stdout -: stream launched process stdout to terminal (useful for CLI tools). …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills sundial-org/instruments-profiling