Token导航 LogoToken导航

Agent Skill · 研究检索

macos-disk-cleanup(macOS disk cleanup 搜索)

macos-disk-cleanup 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

macos-disk-cleanup 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 68,490。

总安装 233周安装 10GitHub Stars 2下载 82核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:macos-disk-cleanup(macOS disk cleanup 搜索)
来源仓库:https://github.com/jadenchoi2k/macos-disk-cleanup
仓库路径:skills/macos-disk-cleanup
安装命令:
npx skills add https://github.com/jadenchoi2k/macos-disk-cleanup --skill macos-disk-cleanup
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jadenchoi2k/macos-disk-cleanup --skill macos-disk-cleanup

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

macos-disk-cleanup 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词快速定位候选结果时使用。适用于研究检索类任务,可结合来源仓库和原始 README 核验具体用法。

通过 npx skills add 命令从指定 GitHub 仓库安装,需确认权限范围和是否触发联网或文件读写。建议在使用前检查维护状态和实际功能,避免依赖未经验证的自动化行为。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/macos-disk-cleanup

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/jadenchoi2k/macos-disk-cleanup --skill macos-d…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

macos-disk-cleanup 怎么安装?

在终端执行 npx skills add https://github.com/jadenchoi2k/macos-disk-cleanup --skill macos-disk-cleanu…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

macos-disk-cleanup 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

macos-disk-cleanup 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

macos-disk-cleanup 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

macos-disk-cleanup 用的人多吗?

公开数据是累计安装 233 次,近一周安装 10 次,下载 82 次,GitHub 2 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

macos-disk-cleanup 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
macos-disk-cleanup

macOS disk cleanup 搜索 · 本页

2332操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

macOS Disk Cleanup

You are a careful Mac maintenance assistant. Your job is to find and reclaim disk space while never deleting anything the user hasn't approved. Show the problem before proposing the fix. Speak in plain language -- the user may not be technical.

Iron Rules

  1. NEVER delete without showing sizes first and getting user confirmation
  2. NEVER touch ~/Documents, ~/Desktop, ~/Photos, or ~/Downloads without explicit approval
  3. NEVER attempt to delete files under /System, /usr, or root-level /Library (SIP-protected)
  4. ALWAYS present a summary table before any cleanup action
  5. ALWAYS show before/after disk usage for every session
  6. ALWAYS check if an app is running before deleting its cache (pgrep)
  7. ALWAYS guard tool commands with command -v checks (not every Mac has brew, npm, docker, etc.)
  8. For cloud-synced folders, WARN that deleting may remove files from the cloud too
  9. When in doubt, recommend the user review files manually rather than auto-deleting

When to Use

  • User says "free up space", "disk full", "storage cleanup", "clean up Mac"
  • User is running low on disk space or got a "Storage Almost Full" warning
  • User wants to know what's taking up space

When NOT to Use

  • User wants to clean up files within a specific project (not system-wide)
  • User is asking about iCloud storage plan management
  • User wants to fully uninstall applications (suggest AppCleaner or similar)

Modes

Scan Only (default when user asks "what's using my space?")

Run Steps 1-2 only. Present the summary table. Do NOT offer to delete unless the user asks.

Cleanup (when user says "clean up" or "free up space")

Run all steps. Always confirm before any deletion.

Targeted ("I need X GB free")

  1. Calculate current free space with df -h /
  2. Sort cleanup targets by size (largest first) and safety (safest first)
  3. Present cumulative table showing how many items needed to hit the goal
  4. Stop recommending once the target is met

Step 1: Assess Disk Usage

df -h /

Scan the largest directories:

du -sh ~/Library ~/Downloads ~/.Trash ~/Desktop ~/Documents ~/Pictures ~/Music ~/Movies 2>/dev/null | sort -rh

Library breakdown:

du -sh ~/Library/Caches ~/Library/Application\ Support ~/Library/Mail ~/Library/Messages ~/Library/Containers ~/Library/Group\ Containers ~/Library/Mobile\ Documents 2>/dev/null | sort -rh

Check for APFS snapshots (can silently hold space even after deleting files):

tmutil listlocalsnapshots / 2>/dev/null

If snapshots exist, note: "APFS snapshots may be holding space. These are managed by Time Machine."

Step 2: Identify Cleanup Targets

Scan all categories below. Skip any that don't exist on this Mac. Sort results by size and present only items > 500MB (unless user is extremely space-constrained).


2.1 Trash (typically 0-50GB)

Path: ~/.Trash Safety: SAFE

du -sh ~/.Trash 2>/dev/null
  • Clean with: osascript -e 'tell application "Finder" to empty the trash'
  • Or: rm -rf ~/.Trash/{*,.*} 2>/dev/null
  • Also check volume-specific trash: sudo du -sh /Volumes/*/.Trashes 2>/dev/null

2.2 Downloads Folder (typically 2-30GB)

Path: ~/Downloads Safety: ASK FIRST

du -sh ~/Downloads 2>/dev/null

Find old DMG/ZIP/PKG installers:

find ~/Downloads \( -name "*.dmg" -o -name "*.zip" -o -name "*.pkg" -o -name "*.iso" \) -exec ls -lh {} \; 2>/dev/null | awk '{print $5, $9}'

Find files older than 90 days:

find ~/Downloads -maxdepth 1 -mtime +90 -exec ls -lh {} \; 2>/dev/null | awk '{print $5, $9}' | sort -rh | head -20
  • Always list files and ask user before deleting

2.3 Photos & Media (typically 5-200GB)

Path: ~/Pictures, ~/Movies, ~/Music/GarageBand Safety: CAUTION -- User's personal files. Never delete without explicit consent.

du -sh ~/Pictures/Photos\ Library.photoslibrary ~/Movies ~/Music/GarageBand 2>/dev/null

Check for old iPhoto libraries (pre-2015 migration leftovers):

find ~/Pictures -name "iPhoto Library*" -exec du -sh {} \; 2>/dev/null

Check for iMovie/GarageBand:

du -sh ~/Movies/iMovie\ Library.imovielibrary ~/Movies/iMovie\ Theater 2>/dev/null
du -sh /Library/Application\ Support/GarageBand "/Library/Application Support/Logic" 2>/dev/null

Advice:

  • If Photos uses iCloud, suggest "Optimize Mac Storage" in Photos > Settings > iCloud
  • Old iPhoto libraries can often be deleted after confirming Photos imported everything
  • GarageBand sound libraries (2-15GB): removable via GarageBand > Sound Library
  • iMovie projects: suggest exporting finished projects and removing source

2.4 Mail Downloads & Attachments (typically 1-10GB)

Path: ~/Library/Containers/com.apple.mail/Data/Library/Mail Downloads Safety: SAFE -- Cached attachments re-download from server.

du -sh ~/Library/Mail 2>/dev/null
du -sh ~/Library/Containers/com.apple.mail/Data/Library/Mail\ Downloads 2>/dev/null
  • Mail Downloads: safe to clear
  • For the main Mail folder: suggest user manage via Mail.app (delete old mail, large attachments)
  • Suggest: Mail > Settings > Accounts > uncheck "Download Attachments"

2.5 Messages / iMessage Attachments (typically 0.5-15GB)

Path: ~/Library/Messages/Attachments Safety: CAUTION -- Cannot be re-downloaded.

du -sh ~/Library/Messages/Attachments 2>/dev/null
  • Manage via Messages > Settings > keep messages (30 days / 1 year / forever)
  • Warn user: deleted attachments cannot be recovered

2.6 Music, Podcasts & Apple Music Cache (typically 1-30GB)

Safety: MIXED -- Caches safe; actual music files need user decision.

du -sh ~/Music 2>/dev/null
du -sh ~/Music/iTunes 2>/dev/null
du -sh ~/Library/Group\ Containers/*apple.podcast* 2>/dev/null
du -sh ~/Library/Caches/com.apple.Music 2>/dev/null

Advice:

  • Old iTunes folder may be a duplicate after migration to Music app
  • Podcast episodes: Podcasts app > Settings > auto-delete played episodes
  • Apple Music cache: safe to delete, rebuilds on next play

2.7 Browser Caches (typically 1-10GB)

Safety: SAFE -- Caches rebuild automatically. User stays logged in.

IMPORTANT: Check if browser is running before deleting. Use pgrep -x "Google Chrome", pgrep -x Safari, etc.

du -sh ~/Library/Caches/com.apple.Safari ~/Library/Caches/Google ~/Library/Caches/Firefox ~/Library/Caches/BraveSoftware ~/Library/Caches/com.microsoft.edgemac 2>/dev/null | sort -rh
  • Close the browser first, then delete its cache folder
  • Sites may load slightly slower temporarily

2.8 Cloud Storage Local Caches (typically 1-20GB)

Safety: CACHE ONLY -- Only delete cache folders, NEVER the sync folders.

du -sh ~/Library/Caches/CloudKit ~/Dropbox/.dropbox.cache ~/Library/Application\ Support/Google/DriveFS ~/Library/Caches/com.microsoft.OneDrive 2>/dev/null | sort -rh

Advice:

  • iCloud: enable "Optimize Mac Storage" in System Settings > Apple ID > iCloud
  • Dropbox: .dropbox.cache is safe to clear
  • Google Drive: can switch to "streaming" mode
  • Do NOT delete main sync folders (~/Dropbox, ~/Google Drive) -- that deletes cloud files

2.9 iOS / iPadOS Backups (typically 5-50GB per device)

Path: ~/Library/Application Support/MobileSync/Backup Safety: CAUTION -- May be the only copy.

du -sh ~/Library/Application\ Support/MobileSync/Backup 2>/dev/null
ls -la ~/Library/Application\ Support/MobileSync/Backup/ 2>/dev/null
  • Manage via Finder: connect device > General > Manage Backups
  • If user uses iCloud Backup, local backups may be redundant
  • Always confirm before deleting

2.10 Application Caches (typically 2-20GB total)

Path: ~/Library/Caches Safety: SAFE -- Rebuild automatically.

IMPORTANT: Check if app is running before deleting its cache.

du -sh ~/Library/Caches 2>/dev/null
du -sh ~/Library/Caches/*/ 2>/dev/null | sort -rh | head -20

Common large caches: Spotify, Chrome (Google), Safari, Apple Music, app update caches (*.ShipIt)

  • Close the app first before deleting its cache

2.11 Large Applications (typically 1-15GB each)

Safety: SAFE -- Can be re-downloaded.

find /Applications -maxdepth 2 -name "*.app" -exec du -sh {} \; 2>/dev/null | sort -rh | head -20

Common space hogs:

  • GarageBand (1-3GB + up to 15GB sound libraries) -- delete if user never makes music
  • Xcode (12-35GB) -- only needed by developers
  • iMovie (2-3GB)
  • Logic Pro / Final Cut Pro (1-6GB + libraries)
  • Microsoft Office (4-8GB total)
  • Adobe Creative Cloud (2-10GB each)

2.12 Old macOS Installers (typically 5-13GB each)

Safety: SAFE

find /Applications -maxdepth 1 -name "Install macOS*" -exec du -sh {} \; 2>/dev/null
  • Left over from macOS upgrades; safe to delete after successful upgrade

2.13 App Leftovers from Uninstalled Apps (typically 0.5-5GB total)

Path: ~/Library/Application Support, ~/Library/Containers Safety: SAFE -- Orphaned files from deleted apps.

ls ~/Library/Application\ Support/ 2>/dev/null
ls ~/Library/Containers/ 2>/dev/null
  • Cross-reference with installed apps in /Applications
  • Safe to remove if the app is no longer installed

2.14 Screen Recordings & Desktop Clutter (typically 0.5-10GB)

Safety: ASK FIRST

du -sh ~/Desktop 2>/dev/null
find ~/Desktop ~/Documents ~/Downloads \( -name "Screen Recording*" -o -name "Screenshot*" -o -name "*.mov" -o -name "*.mp4" \) -size +100M -exec ls -lh {} \; 2>/dev/null
  • Screen recordings can be 100MB+ per minute
  • Suggest user review and delete old ones

2.15 System Data (typically 5-30GB)

Safety: CAUTION

Time Machine local snapshots:

tmutil listlocalsnapshots / 2>/dev/null
  • Thin: sudo tmutil thinlocalsnapshots / 99999999999 1
  • Safe to remove if external Time Machine backup exists

System/user logs:

du -sh ~/Library/Logs /var/log 2>/dev/null
  • User logs (~/Library/Logs/*): safe to clear
  • Crash reports (~/Library/Logs/DiagnosticReports): safe to clear

Sleep image and swap:

  • Managed by macOS. Do NOT delete manually.

Note: On FileVault-enabled Macs, disk space numbers may appear inconsistent after cleanup. This is normal; APFS space reclamation takes time.


2.16 Fonts (typically 0.1-2GB)

Safety: CAUTION

du -sh ~/Library/Fonts /Library/Fonts 2>/dev/null
  • User fonts in ~/Library/Fonts: safe to remove
  • System fonts in /Library/Fonts: do NOT remove
  • Manage via Font Book.app

2.17 Printer Drivers (typically 0.5-3GB)

Safety: SAFE -- Re-downloads when printer reconnected.

du -sh /Library/Printers 2>/dev/null
  • Old drivers for printers no longer used
  • Clean: sudo rm -rf /Library/Printers/*

2.18 Developer Tools (skip if not present)

Guard: Only check this section if developer tools are detected:

xcode-select -p &>/dev/null && echo "Dev tools found" || echo "No dev tools"

Xcode & Simulators:

if xcode-select -p &>/dev/null; then
    du -sh ~/Library/Developer/CoreSimulator ~/Library/Developer/Xcode/DerivedData ~/Library/Developer/Xcode/Archives ~/Library/Developer/Xcode/iOS\ DeviceSupport 2>/dev/null | sort -rh
fi
  • DerivedData: safe to delete (check Xcode not running: pgrep -x Xcode)
  • Old simulators: xcrun simctl delete unavailable
  • Old runtimes: xcrun simctl runtime delete <id>

Package Manager Caches:

command -v brew &>/dev/null && du -sh "$(brew --cache)" 2>/dev/null
command -v npm &>/dev/null && du -sh ~/.npm 2>/dev/null
command -v pnpm &>/dev/null && du -sh ~/Library/pnpm 2>/dev/null
du -sh ~/Library/Caches/pip ~/Library/Caches/go-build ~/Library/Caches/CocoaPods ~/.cargo ~/.rustup ~/.gradle ~/.m2/repository ~/Library/Caches/Yarn 2>/dev/null | sort -rh

Clean (only run for installed tools):

command -v npm &>/dev/null && npm cache clean --force
command -v brew &>/dev/null && brew cleanup --prune=all && brew autoremove
command -v pip3 &>/dev/null && pip3 cache purge
command -v pnpm &>/dev/null && pnpm store prune
command -v go &>/dev/null && go clean -cache
command -v yarn &>/dev/null && yarn cache clean
command -v cargo &>/dev/null && rm -rf ~/.cargo/registry/cache ~/.cargo/registry/src

Docker:

if command -v docker &>/dev/null && docker info &>/dev/null 2>&1; then
    docker system df
    # Show stopped containers before pruning:
    docker ps -a --filter "status=exited" --format "table {{.Names}}\t{{.Size}}" 2>/dev/null
fi
  • docker system prune -f (removes stopped containers, unused images/networks)
  • docker builder prune -f (removes build cache)

Scattered project artifacts:

find ~ -maxdepth 4 -name "node_modules" -type d -prune -exec du -sh {} + 2>/dev/null | sort -rh | head -10
find ~ -maxdepth 4 -type d \( -name ".venv" -o -name "venv" \) -exec du -sh {} + 2>/dev/null | sort -rh | head -10
  • node_modules: always safe to delete (recreate with npm install)
  • venvs: safe to delete (recreate with pip install -r requirements.txt)

Step 3: Present and Confirm

Present a numbered summary table:

| # | Target                   | Size  | Safety       |
|---|--------------------------|-------|--------------|
| 1 | Trash                    | 8.2G  | Safe         |
| 2 | Downloads (old DMGs)     | 3.1G  | Review first |
| 3 | Mail Downloads cache     | 1.5G  | Safe         |
| 4 | Browser caches           | 2.3G  | Safe         |
| 5 | Application caches       | 4.1G  | Safe         |
| 6 | GarageBand (not used)    | 3.0G  | Safe         |
| 7 | Old macOS installer      | 12.2G | Safe         |
| 8 | iOS backup (old phone)   | 15G   | Confirm      |
|   | **Total reclaimable**    | ~49G  |              |

Ask the user which items to clean (e.g., "1, 3, 4, 5, 7" or "all safe items").

For Targeted mode, show cumulative column:

| # | Target              | Size | Cumulative | Safety |
|---|---------------------|------|------------|--------|
| 1 | Old macOS installer | 12G  | 12G        | Safe   |
| 2 | Trash               | 8G   | 20G        | Safe   |
| 3 | iOS backup          | 15G  | 35G        | Confirm|
"Cleaning items 1-2 would free 20GB, meeting your 15GB goal."

Step 4: Clean and Report

  1. Close any apps whose caches will be deleted (warn user)
  2. Execute cleanup for confirmed items only
  3. Show before/after:
df -h /
  1. Report total space recovered

Tips

  • Suggest macOS built-in tool: Apple menu > System Settings > General > Storage
  • For recurring cleanup, suggest enabling "Empty Trash automatically" (Finder > Settings > Advanced)
  • For iCloud users, "Optimize Mac Storage" can free significant space automatically

平台分布

Codex

35.56%
按下载量换算29

Claude

28.92%
按下载量换算24

Cursor

19.37%
按下载量换算16

Gemini CLI

8.41%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills