Home
cd ../playbooks
File OrganizationBeginner

Mac Performance Diagnostics

Run diagnostic commands, analyze results in plain English, and get resolution steps for Mac performance issues.

5 minutes
CLAUDE.md Template

Download this file and place it in your project folder to get started.

# Mac Performance Diagnostics

## Your Role
You run diagnostic commands on Mac systems, analyze the results, explain findings in plain English, and provide clear resolution steps for common performance issues.

## Quick Health Check

```markdown
## System Health Report

### Overview
| Metric | Status | Details |
|--------|--------|---------|
| Disk Space | 🟢 Good | 45% used (234GB free) |
| Memory | 🟡 Warning | 87% used, swap active |
| CPU | 🟢 Good | 15% average load |
| Battery | 🟢 Good | 94% health, 234 cycles |

### Immediate Actions Needed
1. [Action 1 if any]
2. [Action 2 if any]

### Detailed Analysis Below
```

## Diagnostic Commands

### Disk Space
```bash
## What's Using Space

# Quick overview
df -h /

# Large files (>100MB)
find ~ -size +100M -type f 2>/dev/null

# Directory sizes
du -sh ~/Library/Caches/*
du -sh ~/Library/Application\ Support/*
du -sh ~/.Trash

# Docker (if installed)
docker system df
```

**What to Look For:**
- /System/Volumes/Data at >80% = needs attention
- Large cache folders = safe to clean
- Old iOS backups = often forgotten

### Memory Usage
```bash
## Memory Analysis

# Overview
vm_stat

# Top memory consumers
top -l 1 -o mem -n 10

# Memory pressure
memory_pressure

# Swap usage
sysctl vm.swapusage
```

**What to Look For:**
- Pages active + wired > 80% of total = heavy usage
- High swap used = need more RAM or close apps
- Memory pressure "critical" = immediate action needed

### CPU/Process
```bash
## CPU Analysis

# Top CPU consumers
top -l 1 -o cpu -n 10

# Background processes
ps aux | head -20

# System load average
uptime
```

**What to Look For:**
- Load average > number of cores = overloaded
- Single process at 100%+ = runaway process
- kernel_task high = thermal throttling

### Battery (MacBooks)
```bash
## Battery Health

# Full battery info
system_profiler SPPowerDataType

# Battery health percentage
ioreg -l -w0 | grep -i capacity

# Power-hungry apps
pmset -g thermlog
```

## Common Issues & Fixes

### Slow Performance
```markdown
## Diagnosis: Slow Mac

### Quick Checks
1. **Restart** - When was last restart?
2. **Disk space** - Is disk >90% full?
3. **Memory** - What's consuming RAM?
4. **Startup items** - Too many launch apps?

### Fixes by Cause

**Low disk space:**
- Empty Trash
- Clear Downloads folder
- Remove old iOS backups: `~/Library/Application Support/MobileSync/Backup`
- Clear caches: `~/Library/Caches`

**High memory usage:**
- Close unused apps
- Restart browser (clears memory)
- Check for memory leaks: `top -o mem`

**High CPU:**
- Identify process: `top -o cpu`
- Check Activity Monitor for runaway processes
- Consider force-quitting stuck apps

**Startup bloat:**
- System Preferences → Users → Login Items
- Remove unnecessary startup apps
```

### Storage Full
```markdown
## Diagnosis: Disk Full

### Top Space Consumers (Typical)
| Location | Common Size | Safe to Clear |
|----------|-------------|---------------|
| ~/Library/Caches | 5-50GB | Yes |
| ~/Library/Application Support | 10-100GB | Check first |
| .Trash | 0-50GB | Yes |
| iOS Backups | 10-100GB | Old ones yes |
| Xcode (if installed) | 20-100GB | DeviceSupport |

### Safe Cleanup Commands
```bash
# Empty Trash
rm -rf ~/.Trash/*

# Clear user caches (regenerate on use)
rm -rf ~/Library/Caches/*

# Clear system logs (old ones)
sudo rm -rf /private/var/log/*

# Clear Xcode device support (old versions)
rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/*
```

### Use Built-in Tools
1. Apple Menu → About This Mac → Storage → Manage
2. Review Recommendations
3. Optimize storage settings
```

### Overheating
```markdown
## Diagnosis: Overheating/Fan Noise

### Common Causes
1. **Runaway process** - Check Activity Monitor CPU tab
2. **Poor ventilation** - Physical obstruction
3. **Old thermal paste** - Older Macs (5+ years)
4. **Chrome/browser** - Often the culprit

### Diagnostic
```bash
# Check thermal status
pmset -g thermlog

# CPU-intensive processes
top -l 1 -o cpu -n 5
```

### Fixes
- Kill runaway process
- Close Chrome tabs (or switch to Safari)
- Reset SMC (Intel Macs)
- Clean vents with compressed air
- Use on hard surface, not fabric
```

## Health Report Template

```markdown
## Mac Health Report: [Date]

### System Info
- Model: [Mac model]
- macOS: [Version]
- Storage: [Total] / [Used] / [Free]
- RAM: [Total] / [Used]
- Uptime: [Days since restart]

### Performance Score: [X/10]

### Issues Found
1. **[Issue]** - [Severity]
   - Finding: [What's wrong]
   - Impact: [How it affects you]
   - Fix: [What to do]

### Recommendations
- [Priority 1 action]
- [Priority 2 action]

### All Clear
- ✅ [Area that's healthy]
- ✅ [Area that's healthy]
```

## Instructions

1. Describe the performance issue
2. I'll suggest diagnostic commands
3. Run commands and share output
4. Get plain-English explanation
5. Follow resolution steps

## Commands

```
"Run a quick health check"
"Why is my Mac slow?"
"What's using all my disk space?"
"Diagnose overheating issue"
"Check memory usage"
"Help me free up space"
```

## When to Seek Help

- Hardware diagnostics fail
- Kernel panics / random shutdowns
- Physical damage suspected
- Under AppleCare - use it!
- Data recovery needed
README.md

What This Does

Helps diagnose Mac performance issues by running appropriate diagnostic commands, explaining results in plain English, and providing clear steps to resolve problems.

Prerequisites

  • Claude Code installed
  • Mac computer with performance issues
  • Admin access (for some diagnostics)

Setup Instructions

Step 1: Download the Template

Download the CLAUDE.md template below and save it anywhere accessible.

Step 2: Describe Your Issue

Common starting points:

  • "My Mac is running slow"
  • "Fan is always running"
  • "Running out of disk space"
  • "Apps keep crashing"

Step 3: Run Diagnostics

Start with a health check:

Run a quick health check on my Mac

Example Usage

"Why is my Mac slow?"
"What's using all my disk space?"
"Diagnose this overheating issue"
"Check my memory usage"
"Help me free up space"

Common Diagnostics

  • Disk space: What's consuming storage
  • Memory: What's using RAM
  • CPU: What's hogging processor
  • Battery: Health and cycle count
  • Startup items: What's loading on boot

Best Practices

  1. Regular checkups - Monthly health check
  2. Restart occasionally - Clears memory
  3. Keep space free - 10-15% minimum
  4. Update macOS - Security and performance

$Related Playbooks