instruments-profilingUse when profiling native macOS or iOS apps with Instruments/xctrace. Covers correct binary selection, CLI arguments, exports, and common gotchas.
Install via ClawdBot CLI:
clawdbot install steipete/instruments-profilingUse 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.
xcrun xctrace list templatesxcrun xctrace record --template 'Time Profiler' --time-limit 60s --output /tmp/App.trace --launch -- /path/To/App.appxcrun xctrace record --template 'Time Profiler' --time-limit 60s --output /tmp/App.trace --attach open -a Instruments /tmp/App.traceNote: xcrun xctrace --help is not a valid subcommand. Use xcrun xctrace help record.
Gotcha: Instruments may profile the wrong app (e.g., one in /Applications) if LaunchServices resolves a different bundle.
Use these rules:
xcrun xctrace record ... --launch -- /path/App.app/Contents/MacOS/App.app, ensure itβs the intended bundle:open -n /path/App.appps -p -o comm= -o command= /Applications/App.app and a local build exist, explicitly target the local build path.--template 'Time Profiler': template name from xctrace list templates.--launch -- : everything after -- is the target command (binary or app bundle).--attach : attach to running process.--output : .trace output. If omitted, file saved in CWD.--time-limit 60s|5m: set capture duration.--device : required for iOS device runs.--target-stdout -: stream launched process stdout to terminal (useful for CLI tools).xcrun xctrace export --input /tmp/App.trace --tocxcrun xctrace export --input /tmp/App.trace --xpath '/trace-toc/run[@number="1"]/data/table[@schema="time-profile"]' --output /tmp/time-profile.xml--attach with known PID.xctrace may need Developer Tools permission.time-profile exports are huge.xcrun xctrace list devices and --device .xctrace --attach.Generated Mar 1, 2026
A mobile development team uses this skill to profile an iOS app experiencing slow startup times on real devices. They attach xctrace to the running app, capture a Time Profiler trace, and analyze call trees to identify bottlenecks in initialization code, leading to targeted optimizations that improve user retention.
A macOS software company profiles a native desktop application with intermittent UI freezes during heavy data processing. Using direct binary paths to avoid profiling the wrong build, they record traces, export stack samples, and aggregate data offline to pinpoint inefficient algorithms, enabling performance fixes for enterprise clients.
A game studio profiles a macOS game to optimize frame rates and reduce lag during gameplay. They use xctrace with time limits to capture steady-state performance, hide system libraries in call trees, and focus on hot frames in rendering code, resulting in smoother gameplay and better reviews.
An IoT company develops a companion iOS app for hardware devices and uses this skill to profile app interactions during device synchronization. They attach to the app process, verify correct binary selection, and export traces to automate performance diffing across firmware updates, ensuring reliable user experiences.
A consultancy firm profiles both macOS and iOS versions of a cross-platform app to compare performance metrics. They handle device-specific arguments for iOS, capture traces for startup and steady-state, and use CLI exports to generate reports for clients, aiding in platform-specific optimization decisions.
Offer specialized profiling and optimization services to clients with native macOS/iOS apps. Use this skill to diagnose performance issues, provide detailed reports with stack analyses, and implement fixes, charging per project or on a retainer basis for ongoing support.
Develop a SaaS platform that automates app performance monitoring by integrating xctrace CLI commands. Provide dashboards for trace analysis, automated alerts for regressions, and collaboration features, targeting development teams with subscription plans based on usage or seats.
Conduct workshops and online courses teaching developers how to use Instruments and xctrace for effective profiling. Cover scenarios like binary selection, CLI workflows, and stack analysis, generating revenue through course fees, certifications, and corporate training packages.
π¬ Integration Tip
Integrate xctrace commands into CI/CD pipelines for automated performance regression testing, ensuring consistent binary paths and handling privacy permissions in build environments.
Full Windows desktop control. Mouse, keyboard, screenshots - interact with any Windows application like a human.
Control Android devices via ADB with support for UI layout analysis (uiautomator) and visual feedback (screencap). Use when you need to interact with Android apps, perform UI automation, take screenshots, or run complex ADB command sequences.
Build, test, and ship iOS apps with Swift, Xcode, and App Store best practices.
Control macOS GUI apps visually β take screenshots, click, scroll, type. Use when the user asks to interact with any Mac desktop application's graphical interface.
Write safe Swift code avoiding memory leaks, optional traps, and concurrency bugs.
Best practices and example-driven guidance for building SwiftUI views and components. Use when creating or refactoring SwiftUI UI, designing tab architecture with TabView, composing screens, or needing component-specific patterns and examples.