Loading...
Loading...
System optimization recommendations and execution for Mac. Analyzes memory pressure, processes, startup items, and system settings, then offers actionable optimizations. Use this to make your Mac faster without full cleanup.
npx skill4agent add maxirodr/mac-performance-analyzer mac-optimize/mac-cleanup# Hardware info
uname -m
sysctl -n hw.memsize
sysctl -n hw.ncpu
sysctl -n hw.pagesize
# Memory pressure (the single most important metric)
memory_pressure
# Swap usage
sysctl vm.swapusage
# Top 20 memory consumers grouped by app family
ps -eo rss=,comm= | awk '{mem[$2]+=$1; count[$2]++} END {for(c in mem) if(mem[c]>102400) printf "%8.1f MB (%d procs) %s\n", mem[c]/1024, count[c], c}' | sort -rn | head -20
# Top 10 CPU consumers
ps aux --sort=-%cpu | head -11
# Zombie processes
ps aux | awk '$8 ~ /Z/ {count++} END {print count+0}'
# Login items
osascript -e 'tell application "System Events" to get the name of every login item' 2>/dev/null
# LaunchAgents (non-Apple)
ls ~/Library/LaunchAgents/ 2>/dev/null
# Homebrew services running
brew services list 2>/dev/null
# Listening ports
lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | head -15
# Apple Intelligence check
pgrep -fl "intelligenceplatform\|knowledgeconstruction\|siriinference" 2>/dev/null
# Disk free (quick check)
df -h / | tail -1Read file: resources/optimization-guide.md| Field | Description |
|---|---|
| Action | What to do |
| Impact | High / Medium / Low |
| Risk | None / Low / Medium |
| Reversible | Yes / No |
| Category | Memory / Startup / Background / Settings / Developer |
### Optimization Recommendations
| # | Action | Impact | Risk | Reversible | Est. Effect |
|---|--------|--------|------|------------|-------------|
| 1 | Kill N zombie processes | High | None | Yes | Free X MB RAM |
| 2 | Quit unused Electron apps (Slack, Discord) | High | None | Yes | Free X GB RAM |
| 3 | Stop mysql Homebrew service | Medium | Low | Yes | Free X MB RAM |
| 4 | Disable Apple Intelligence | Medium | None | Yes | Free X MB RAM + CPU |
| 5 | Remove N unnecessary login items | Medium | Low | Yes | Faster boot |
| ... | ... | ... | ... | ... | ... |# Find zombie parent PIDs
ps aux | awk '$8 ~ /Z/ {print $2, $3, $11}'
# Kill parents (confirm with user):
# kill -9 <parent_pid>brew services stop <service_name># Unload a user LaunchAgent
launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/<plist_name>defaults write com.apple.dock autohide-delay -float 0
defaults write com.apple.dock autohide-time-modifier -float 0.3
killall Dock# Only after user confirms which apps to quit
pkill -f "<app_name>"memory_pressure
sysctl vm.swapusage
ps -eo rss=,comm= | awk '{mem[$2]+=$1; count[$2]++} END {for(c in mem) if(mem[c]>102400) printf "%8.1f MB (%d procs) %s\n", mem[c]/1024, count[c], c}' | sort -rn | head -10
ps aux | awk '$8 ~ /Z/ {count++} END {print count+0}'### Before vs After
| Metric | Before | After | Change |
|--------|--------|-------|--------|
| Memory Pressure | {LEVEL} | {LEVEL} | {CHANGE} |
| Swap Used | {BEFORE} GB | {AFTER} GB | {DIFF} |
| Total Process RAM | {BEFORE} GB | {AFTER} GB | -{FREED} GB |
| Zombie Processes | {BEFORE} | {AFTER} | -{KILLED} |
| Homebrew Services | {BEFORE} running | {AFTER} running | -{STOPPED} |
| Login Items | {BEFORE} | {AFTER} | -{REMOVED} |/mac-analyzedefaults delete com.apple.dock autohide-delay