Complete macOS system maintenance as a Claude Code skill. Deep app uninstall (20+ locations), startup audit, disk cleanup, health check. Replaces CleanMyMac / Tencent Lemon / Pearcleaner with zero overhead.
SaferSkills independently audited macsweep (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A professional-grade macOS maintenance toolkit invoked via natural language or /macsweep. Replaces GUI tools (CleanMyMac, Tencent Lemon, Pearcleaner) with contextual intelligence — identifies what each file and service actually is, explains impact before acting.
Key metrics: Scans 30+ Library subdirectories (GUI tools check 5-8). Identifies services by inspecting actual binary contents. Manages BTM database directly. Zero runtime overhead.
osascript -e 'tell app "Finder" to move POSIX file "/path" to trash'; only use rm for system-level files that can't go to Trashdf -h / baseline, compare after cleanuprm -rf on /, ~, or any broad wildcard without explicit pathsdocker system prune -a — list items individually firstParse $ARGUMENTS to select module:
| Input Pattern | Module |
|---|---|
uninstall <name> or 卸载 <name> | Module 1: App Uninstaller |
startup or 启动项 | Module 2: Startup Manager |
cleanup or 清理 | Module 3: Disk Cleanup |
health or 健康 or 检查 | Module 4: System Health |
| (empty or ambiguous) | Show module menu, ask user to choose |
The most thorough app removal available on macOS — scans 30+ Library subdirectories, manages launch services, and cleans BTM ghost entries.
# Find the app
ls /Applications/ ~/Applications/ 2>/dev/null | grep -i "<name>"
# Extract bundle ID
mdls -name kMDItemCFBundleIdentifier "/Applications/<App>.app"
# Note: also check app's Info.plist for additional identifiersStore: APP_NAME, BUNDLE_ID, APP_PATH
brew list --cask | grep -i "<name>"If found, prefer brew uninstall --cask <name> — it handles basic cleanup.
pgrep -fi "<app-name>"
# If running, ask user to quit. Only force-kill with confirmation:
pkill -fi "<app-name>"# Scan for related services
launchctl list | grep -i "<bundle-id-or-name>"
ls ~/Library/LaunchAgents/ | grep -i "<bundle-id-or-name>"
ls /Library/LaunchAgents/ 2>/dev/null | grep -i "<bundle-id-or-name>"
ls /Library/LaunchDaemons/ 2>/dev/null | grep -i "<bundle-id-or-name>"For each match:
launchctl bootout gui/$(id -u) <plist-path> then rm <plist>sudo launchctl bootout system <plist-path> and sudo rm <plist> for userbrew uninstall --cask <name>sudo rm -rf "/Applications/<App>.app" (present to user)Scan ALL locations listed in references/residual_locations.md using the bundled script:
bash "${CLAUDE_SKILL_DIR}/scripts/scan_residuals.sh" "<bundle-id>" "<app-name>"Also run Spotlight deep search:
mdfind "<bundle-id>" -onlyin ~/Library/
mdfind "<app-name>" -onlyin ~/Library/Present findings as: Location | File/Directory | Size
Delete user-level files directly (with confirmation). Present sudo commands for system-level files.
sfltool dumpbtm 2>/dev/null | grep -i "<app-name>"If ghost entries found: advise sudo sfltool resetbtm + logout/login.
mdfind "<bundle-id>" -onlyin ~/Library/
launchctl list | grep -i "<name>"
ls "/Applications/<App>.app" 2>&1Confirm all traces removed.
Complete visibility into every auto-starting process — identifies what each service does, whether its parent app still exists, and whether it's necessary.
bash "${CLAUDE_SKILL_DIR}/scripts/audit_startup.sh"Sources scanned:
~/Library/LaunchAgents/ — user agents/Library/LaunchAgents/ — system agents/Library/LaunchDaemons/ — system daemonssfltool dumpbtm — BTM database (what System Settings shows)launchctl list — currently loaded servicesFor every non-Apple service:
to identify proxy tools vs legitimate updaters)
Classification criteria:
| # | App | Service | Type | Status | Classification | Recommendation |
|---|
Ask user which to disable/remove:
launchctl bootout + rmsudo sfltool resetbtmIntelligent cleanup with 3-tier safety classification. Every item shows size and rebuild cost so user can make informed decisions.
df -h /bash "${CLAUDE_SKILL_DIR}/scripts/cache_audit.sh"For large file search (optional, user-initiated):
bash "${CLAUDE_SKILL_DIR}/scripts/find_large_files.sh" 100 "$HOME"Read references/cleanup_targets.md for safety classifications. Present 3 tiers:
SAFE — system caches, old logs, crash reports, Trash, saved app state LOW RISK — old downloads, Xcode DerivedData, Homebrew cache, package manager caches MEDIUM RISK — Docker images/volumes, iOS device support, AI model caches
Each row: Category | Path | Size | Impact If Deleted
Use Trash where possible. Use brew cleanup for Homebrew. Use specific docker image rm for Docker (never blind docker system prune -a).
Before: XX.X GB available
After: XX.X GB available
Freed: XX.X GB
Items cleaned: XX | Items skipped: XXDiagnose system issues that accumulate over time.
Cross-reference installed apps (/Applications/) with ~/Library/Application Support/, ~/Library/Caches/, ~/Library/Preferences/ to find data from uninstalled apps.
Reuse the audit script (which uses PlistBuddy for reliable path extraction):
bash "${CLAUDE_SKILL_DIR}/scripts/audit_startup.sh" 2>&1 | grep "exe_exists=MISSING"For each MISSING entry, the parent app was uninstalled but the plist was left behind.
sfltool dumpbtm 2>/dev/nullCompare BTM entries against installed apps. Flag entries for apps no longer in /Applications/.
diskutil info / | grep -E "SMART|Health|Type|Free"memory_pressure -S # Summary only, no allocation test (fast)
vm_stat | head -10Note: memory_pressure without -S performs actual memory allocation tests and can take 10-30s.
Present findings with actionable fix for each issue.
| Target | Size | Why Keep It |
|---|---|---|
| Xcode DerivedData | 10+ GB | Rebuild costs 10-30 min per project |
| npm/pnpm cache | 5+ GB | Re-download 30min-2hr (network dependent) |
| ~/.cache/uv | 10+ GB | Python package cache, slow rebuild |
| Playwright browsers | 3-4 GB | 2GB+ re-download each time |
| iOS DeviceSupport | 2-3 GB | Required for on-device debugging |
| ~/.cache/huggingface | varies | AI models, hours to re-download |
| JetBrains caches | 1+ GB | IDE re-indexing takes 5-10 min |
| Docker stopped containers | <500 MB | May need to restart anytime |
Rule: If rebuilding the cache takes longer than the disk space is worth, keep it.
Match the user's language. Chinese input → Chinese output. English input → English output.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.