macos-tracelisted
Install: claude install-skill kmgcc/macOS-Trace
# macOS-Trace: Autonomous Application Performance Optimization
`macOS-Trace` is a closed-loop performance optimization engine for native macOS applications (SwiftUI, AppKit, Metal, CoreAudio, WebKit, native binaries). Its core objective is to eliminate manual Instruments GUI interaction: an agent aligns on targets, captures headless traces, isolates hotspots, applies code fixes, re-tests with differential benchmarking, and iterates until performance targets are verified with empirical data.
---
## Phase 1: User Goal Alignment (Pre-Flight Questionnaire)
Before modifying code or collecting traces, align with the user on optimization targets and success criteria. Use an interactive modal if available (`ask_question`, option lists); otherwise ask directly with structured options.
1. **Primary Optimization Objective**:
- A: Reduce CPU utilization, power consumption, and thermal throttling.
- B: Lower memory footprint / transient allocation spikes / eliminate leaks.
- C: Eliminate UI frame stuttering and dropped frames (Hitches).
- D: Accelerate cold launch time.
2. **Specific Performance Targets (recommended defaults)**:
- **CPU / Energy**: idle < 20 M/s instructions, CPU Impact < 0.5; active < 100 M/s (or reduce 30–50%).
- **Memory**: resident RAM < 150 MB (utilities/audio) / < 300 MB (rich UI); allocation rate < 500 events/sec steady-state; 0 persistent leaks.
- **UI Smoothness**: hitch ratio < 5.0 ms/s (acceptable), < 1.0 ms/s (fluid/no dropped frames