disk-cleaner
Original:🇨🇳 Chinese
Translated
1 scripts
Smart Disk Cleaner for Mac, a user-friendly wrapper based on Mole (https://github.com/tw93/Mole)
5installs
Sourcecrazynomad/skills
Added on
NPX Install
npx skill4agent add crazynomad/skills disk-cleanerTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →Disk Cleaner - Smart Disk Cleaner for Mac
A user-friendly wrapper based on Mole (https://github.com/tw93/Mole), responsible for installation, execution, explanation, validation, guidance, statistics, and sharing.
Description
Disk Cleaner is an enhanced wrapper for the Mole cleaning tool developed by tw93. It provides a more user-friendly Chinese interface, categorized reports, three-tier cleaning strategies (Air/Pro/Max), complete CSV lists, whitelist configuration, and a beautiful achievement page after cleaning (including cost-saving calculations and fun statistics).
When to Use
Use this skill when users:
- Say their hard drive is full, disk space is insufficient, or storage is low
- Want to clear Mac cache or temporary files
- Ask how to free up disk space
- Mention the Mole tool
Features
- 🔍 Environment Detection: Automatically detects Homebrew and Mole installation status
- 📦 Auto-installation: Supports one-click installation of missing dependencies
- 📊 Categorized Reports: Displays cleanable items by category, distinguishing between safe/cautious
- 🧭 Three-Tier Strategies: Air (Most Safe)/Pro (Recommended)/Max (Maximize)
- 📋 CSV List: Generates complete file list, saved to desktop
- ⚙️ Whitelist Configuration: Preset templates + custom path protection
- 🎉 Achievement Page: Shows cost-saving calculations, fun statistics, and shareable content after cleaning
- 🔒 Safety Protection: Displays protected items, supports confirmation mechanism
Usage
Environment Check
bash
python scripts/mole_cleaner.py --checkPreview Cleanable Content
bash
python scripts/mole_cleaner.py --preview # Terminal text report
python scripts/mole_cleaner.py --preview --html # HTML report (auto-opens browser)
python scripts/mole_cleaner.py --preview --csv # Complete CSV list (saved to desktop)
python scripts/mole_cleaner.py --preview --json # JSON format outputExecute Cleaning (Three Tiers)
bash
python scripts/mole_cleaner.py --clean --tier air --confirm # Air: Most safe
python scripts/mole_cleaner.py --clean --tier pro --confirm # Pro: Recommended
python scripts/mole_cleaner.py --clean --tier max --confirm # Max: Maximize
python scripts/mole_cleaner.py --clean --confirm # Default full cleaningWhitelist Configuration
bash
python scripts/mole_cleaner.py --whitelist --show # View current whitelist
python scripts/mole_cleaner.py --whitelist --preset office # Add white-collar office preset
python scripts/mole_cleaner.py --whitelist --preset developer # Add developer preset
python scripts/mole_cleaner.py --whitelist --add ~/Documents/重要项目 # Add custom pathCheck Disk Status
bash
python scripts/mole_cleaner.py --statusShow Achievement Page (Test)
bash
python scripts/mole_cleaner.py --show-achievementWorkflow (Claude Interaction Flow)
1. Environment Detection and Installation
First check if Mole is installed:
bash
python scripts/mole_cleaner.py --checkIf not installed, guide the user to install or use .
--auto-install2. Preview Scan
Run preview to get analysis report:
bash
python scripts/mole_cleaner.py --preview3. Show Options to User
Based on preview results, present cleaning solutions to the user:
Please select the solution you want to execute:
1. 🌬️ Air - Most safe, only clears browser and logs → X.XX GB
2. ⚡ Pro - Recommended, balances safety and space → X.XX GB
3. 🚀 Max - Maximize hard drive space release → X.XX GB
4. 📋 View complete list first - Generate CSV detailed list
5. ⚙️ Configure whitelist - Protect specific paths4. Process User Selection
Select 1-3 (Air/Pro/Max):
bash
# Execute after confirmation
python scripts/mole_cleaner.py --clean --tier air --confirm # Or pro/maxSelect 4 (CSV List):
bash
python scripts/mole_cleaner.py --preview --csvInform the user the file has been saved to desktop and opened automatically.
Select 5 (Whitelist Configuration):
Show preset options:
- : White-collar office - Protects .doc, .docx, .xls, .xlsx, .ppt, .pptx, .pdf, etc.
office - : Developer - Protects code and configuration files
developer - : Media creation - Protects video, audio, image projects
media
bash
python scripts/mole_cleaner.py --whitelist --preset office
# Or add custom path
python scripts/mole_cleaner.py --whitelist --add ~/Documents/重要项目5. Cleaning Completed
Automatically generates an achievement page after cleaning, including:
- Released space size
- Cost-saving calculation (based on SSD price)
- Fun equivalents (equivalent to how many photos/songs)
- Random compliments from tw93
- GitHub link for easy Star
Safety Features
- Preview First: Only previews by default, requires to execute cleaning
--confirm - Tiered Strategies: Air/Pro/Max allow users to choose based on risk preference
- Whitelist Protection: Supports preset templates and custom paths
- Protection List: Displays Mole's whitelist protected items
- Log Recording: All operations are saved to
~/.config/mole-cleaner/logs/
Tier Definitions
| Tier | Cleaning Scope | Risk Level |
|---|---|---|
| 🌬️ Air | Browser cache, system logs | Low risk |
| ⚡ Pro | Air + user application cache, package manager cache, trash | Medium risk |
| 🚀 Max | All cleanable items | Higher risk |
Whitelist Presets
| Preset | Protected Content |
|---|---|
| office | Office documents (.doc, .docx, .xls, .xlsx, .ppt, .pptx, .pdf, .pages, .numbers, .key) |
| developer | Code and configuration (.py, .js, .ts, .go, .rs, .java, .swift, .json, .yaml, .toml) |
| media | Media projects (.psd, .ai, .sketch, .fig, .aep, .prproj, .fcpx, .mov, .mp4) |
Dependencies
- macOS
- Homebrew
- Mole ()
brew install tw93/tap/mole - Python:
pip install jinja2
Output Structure
~/.config/mole-cleaner/
├── logs/ # Operation logs
├── reports/ # HTML reports
└── achievements/ # Achievement pages
~/Desktop/
└── mole-clean-list-YYYYMMDD-HHMMSS.csv # Complete CSV listCredits
- Mole: https://github.com/tw93/Mole
- Author: tw93 (https://tw93.fun)