macos-perf
macos-perf
Purpose
This skill enables monitoring and profiling macOS system performance using native tools, focusing on CPU, memory, thermal, and power metrics to identify bottlenecks and optimize applications.
When to Use
Use this skill for diagnosing high CPU usage in apps, investigating memory leaks, profiling resource-intensive processes, checking thermal states during heavy workloads, or analyzing power consumption on macOS devices.
Key Capabilities
- Monitor real-time system metrics via Activity Monitor or
top/htopfor CPU, memory, and network usage. - Profile applications with Instruments, capturing detailed traces for CPU, memory, and energy.
- Check memory pressure using
vm_statto detect low-memory conditions. - Query thermal state via
powermetricsfor CPU/GPU temperatures and fan speeds. - Analyze power metrics with
powermetricsto measure battery drain and efficiency. - Use command-line tools like
top -o cpufor sorted process lists orinstruments -s devicesfor available templates.
Usage Patterns
Invoke this skill in scripts for automated monitoring or integrate into AI workflows for real-time analysis. For example, run periodic checks in a loop for server-like macOS setups, or trigger profiling when an app exceeds resource thresholds. Always specify exact tools and flags based on the task; e.g., use top for quick views and Instruments for deep dives. If integrating with automation, export data to JSON for parsing.