instruments-profiling
Use when profiling native macOS or iOS apps with Instruments/xctrace. Covers correct binary selection, CLI arguments, exports, and common gotchas.
Why use this skill?
Learn how to profile native macOS and iOS apps using the xctrace CLI and Instruments. Capture performance data, analyze stack traces, and optimize app latency.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/steipete/instruments-profilingWhat This Skill Does
The instruments-profiling skill is a specialized toolkit designed to empower developers to capture, analyze, and optimize performance traces for native macOS and iOS applications using the xctrace CLI. It abstracts the complexity of Apple's Instruments suite, allowing for programmatic profiling directly from the command line. This skill is essential for diagnosing CPU spikes, memory leaks, and long-running operations by providing a structured way to record, output, and export trace data for deep analysis.
Installation
You can install this skill by running the following command in your terminal:
clawhub install openclaw/skills/skills/steipete/instruments-profiling
Ensure you have Xcode Command Line Tools installed and that xcrun is properly configured in your environment to interface with the profiling sub-systems.
Use Cases
- Startup Performance Optimization: Capture early app launch frames to determine what is blocking the main thread during initialization.
- Bottleneck Identification: Use the 'Time Profiler' template to identify high-latency methods in steady-state operations.
- Automated Performance Regression Testing: Integrate
xctracecommands into CI/CD pipelines to capture performance data on every build, using exports to compare stack samples over time. - CLI Tool Profiling: Profile native CLI binaries directly by piping stdout through the
--target-stdoutargument, ensuring all diagnostic logging is captured alongside the trace.
Example Prompts
- "OpenClaw, profile my iOS app launch time for 30 seconds and save the trace to /tmp/startup.trace."
- "I need to analyze why my macOS app is stuttering. Can you show me how to record a Time Profiler trace for an existing process PID 4592?"
- "After capturing a trace, how do I export the raw time-profile data into an XML format for my custom Python analysis script?"
Tips & Limitations
- Targeting Precision: Always prefer the full absolute path to your binary (
/path/To/App.app/Contents/MacOS/App) over app bundles when possible to avoid LaunchServices resolving to the wrong installed version. - Permissions: Note that profiling requires elevated permissions; you may be prompted for your sudo password when attaching to system-protected processes.
- Data Volume: Profiling is IO intensive. For long-running sessions, be mindful of the disk space consumed by
.tracefiles, as these can quickly grow to gigabytes in size. - Non-Interactive Analysis: While the GUI (Instruments.app) is excellent for visual exploration, the true power of this skill lies in the
exportfunctionality, which allows you to programmatically aggregate and visualize hot frames using scripts.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-steipete-instruments-profiling": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution
Related Skills
swiftui-liquid-glass
Implement, review, or improve SwiftUI features using the iOS 26+ Liquid Glass API. Use when asked to adopt Liquid Glass in new SwiftUI UI, refactor an existing feature to Liquid Glass, or review Liquid Glass usage for correctness, performance, and design alignment.
qmd
Local search/indexing CLI (BM25 + vectors + rerank) with MCP mode.
songsee
Generate spectrograms and feature-panel visualizations from audio with the songsee CLI.
summarize
Summarize URLs or files with the summarize CLI (web, PDFs, images, audio, YouTube).
bird
X/Twitter CLI for reading, searching, and posting via cookies or Sweetistics.