feat: add mac-optimizer skill (92) — Claude Code only
macOS system health toolkit with 5 audit modules (packages, environment, security, cleanup, resources) and cleanup executor. Fixed bugs from review: - Replace GNU timeout with perl alarm (macOS compatible) - Remove Linux-only ps --sort flag, use portable sort - Add JSON escaping to all audit scripts - Remove redundant classify_size branch Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
74
custom-skills/92-mac-optimizer/references/cleanup-targets.md
Normal file
74
custom-skills/92-mac-optimizer/references/cleanup-targets.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# Cleanup Targets Reference
|
||||
|
||||
## Risk Ratings
|
||||
|
||||
| Risk | Meaning |
|
||||
|---|---|
|
||||
| Safe | Can be deleted without consequence; regenerated automatically |
|
||||
| Moderate | Review before deleting; may lose useful data |
|
||||
| Risky | May break applications; requires careful inspection |
|
||||
| Info only | Report size but do not offer deletion |
|
||||
|
||||
## Target Details
|
||||
|
||||
### User Logs (Safe)
|
||||
- **Path**: `~/Library/Logs/`
|
||||
- **Cleanup target**: `user-logs`
|
||||
- **Notes**: Application crash reports and debug logs. Regenerated as needed.
|
||||
|
||||
### System Logs (Moderate, requires sudo)
|
||||
- **Path**: `/var/log/`
|
||||
- **Cleanup target**: not available via cleanup_execute.sh (requires sudo)
|
||||
- **Notes**: System-level logs. Only clean old/rotated files. Active logs should not be deleted.
|
||||
|
||||
### User Caches (Safe, per-app)
|
||||
- **Path**: `~/Library/Caches/`
|
||||
- **Cleanup target**: `user-caches`
|
||||
- **Notes**: App caches regenerated on next use. Some apps may need to re-download data. Browser caches can be large.
|
||||
|
||||
### Homebrew Cache (Safe)
|
||||
- **Path**: `$(brew --cache)` (typically `~/Library/Caches/Homebrew/`)
|
||||
- **Cleanup target**: `brew-cache`
|
||||
- **Notes**: Downloaded bottles and source archives. `brew cleanup` handles this properly.
|
||||
|
||||
### npm Cache (Safe)
|
||||
- **Path**: `~/.npm/_cacache/`
|
||||
- **Cleanup target**: `npm-cache`
|
||||
- **Notes**: Package download cache. `npm cache clean --force` is the proper way to clear.
|
||||
|
||||
### pip Cache (Safe)
|
||||
- **Path**: `~/Library/Caches/pip/`
|
||||
- **Cleanup target**: `pip-cache`
|
||||
- **Notes**: Downloaded wheel/sdist cache. `pip cache purge` is the proper way to clear.
|
||||
|
||||
### Xcode DerivedData (Safe)
|
||||
- **Path**: `~/Library/Developer/Xcode/DerivedData/`
|
||||
- **Cleanup target**: `xcode-derived`
|
||||
- **Notes**: Build artifacts and indexes. Rebuilt on next Xcode build. Can grow very large.
|
||||
|
||||
### Xcode Archives (Moderate)
|
||||
- **Path**: `~/Library/Developer/Xcode/Archives/`
|
||||
- **Cleanup target**: `xcode-archives`
|
||||
- **Notes**: App Store submission archives. May be needed for symbolication of crash reports. Review before deleting.
|
||||
|
||||
### iOS DeviceSupport (Safe)
|
||||
- **Path**: `~/Library/Developer/Xcode/iOS DeviceSupport/`
|
||||
- **Cleanup target**: `ios-support`
|
||||
- **Notes**: Debug symbols for connected iOS devices. Re-downloaded when device connects again.
|
||||
|
||||
### Docker (Moderate)
|
||||
- **Cleanup target**: `docker`
|
||||
- **Notes**: Uses `docker system prune -f`. Removes stopped containers, unused networks, dangling images. Does NOT remove named volumes. Never delete Docker's filesystem directly.
|
||||
|
||||
### Trash (Safe)
|
||||
- **Path**: `~/.Trash/`
|
||||
- **Cleanup target**: `trash`
|
||||
- **Notes**: Items in Trash. User has already "deleted" these.
|
||||
|
||||
### Old Downloads (Info only)
|
||||
- **Path**: `~/Downloads/` (files >90 days old)
|
||||
- **Notes**: Report only. User should review manually. Never auto-delete downloads.
|
||||
|
||||
### Application Support Remnants (Risky)
|
||||
- **Path**: `~/Library/Application Support/` orphaned directories
|
||||
- **Notes**: Report only. Directories from uninstalled apps. Difficult to determine automatically which are truly orphaned. Manual review required.
|
||||
Reference in New Issue
Block a user