一键导入
disk-cleanup
macOS 磁碟清理。掃描大目錄、分類可刪/可搬/需確認、Docker/Xcode 清理。當用戶說「清磁碟」「磁碟空間不夠」「disk cleanup」時使用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
macOS 磁碟清理。掃描大目錄、分類可刪/可搬/需確認、Docker/Xcode 清理。當用戶說「清磁碟」「磁碟空間不夠」「disk cleanup」時使用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate self-contained HTML architecture diagrams (inline SVG, dark theme, no JS) for blogs/READMEs. Triggers on system architecture, microservices, cloud/AWS/GCP, K8s, network topology, data flow diagrams. Use `drawio` instead when the output needs to be editable.
Generate draw.io diagrams (.drawio files) with optional PNG/SVG/PDF export. Triggers on diagram/flowchart/ER/sequence/class/network/architecture/wireframe/mockup/UI sketch requests.
使用 Gemini Nano Banana 2 產生圖片。當用戶說「產圖」「生成圖片」「generate image」「畫一張圖」時使用。
Resume/CV optimization. Analyze a resume, reposition strengths, and produce an optimized PDF tailored to a target role.
Virtual expert roundtable. Multiple thinkers analyze a document with different frameworks, then synthesize consensus/disagreements/blind spots.
Vendor proposal evaluation. Analyze technical architecture, pricing, and market benchmarks from a proposal PDF/Doc. Output evaluation report + comparison.
| name | disk-cleanup |
| description | macOS 磁碟清理。掃描大目錄、分類可刪/可搬/需確認、Docker/Xcode 清理。當用戶說「清磁碟」「磁碟空間不夠」「disk cleanup」時使用。 |
| allowed-tools | Bash(du*), Bash(df*), Bash(ls*), Bash(docker*), Bash(xcrun*), Bash(diskutil*), Bash(tmutil*), Bash(find*), Read |
| author | Maki |
| version | 1.0.0 |
| tags | ["macos","devtools","cleanup","disk"] |
| required_env | [] |
一鍵掃描磁碟用量,分類建議,協助清理空間。
同時執行:
df -h /
diskutil apfs list | grep -E "Capacity In Use|Capacity Not Allocated" | head -2
報告:APFS 實際可用空間(注意 Finder 數字含 purgeable,不準確)。
du -sh ~/Documents ~/Downloads ~/Movies ~/GitHub ~/GitLab ~/Projects ~/.cache ~/Library/Caches ~/Library/Developer ~/Library/Containers 2>/dev/null | sort -rh
對 > 5GB 的目錄進一步展開子目錄。
將找到的項目分成三類,用表格呈現:
| 類別 | 說明 | 需確認 |
|---|---|---|
| 可安全刪除 | cache、.venv、node_modules、DerivedData、pycache、.ruff_cache | 自動列出,確認後刪 |
| 可搬到外接 | 大型模型、VM、DMG、影片、舊專案 | 列出後問用戶 |
| 需確認 | 不確定用途的大目錄 | 問用戶 |
docker system df
若有可回收空間,建議 docker system prune(需用戶確認)。
檢查:
xcrun simctl runtime list # Simulator runtimes
ls ~/Library/Developer/Xcode/iOS\ DeviceSupport/ # DeviceSupport
du -sh ~/Library/Developer/Xcode/DerivedData # DerivedData
du -sh /Library/Developer/CoreSimulator # CoreSimulator 總量
列出可刪的舊版本(保留最新兩個),用戶確認後執行。
掃描所有 .venv 和 virtualenvs:
find ~ -maxdepth 4 -type d -name ".venv" -o -name "venv" 2>/dev/null
tmutil listlocalsnapshots /
若快照過多(> 10 個),建議清理。
## 磁碟清理報告
**清理前**: APFS free {X}GB
**可回收空間**:
- 可安全刪除: {X}GB
- 可搬到外接: {X}GB
- Docker: {X}GB
- Xcode: {X}GB
### 建議操作(需你確認):
1. ...
2. ...