gitmyhub

disk-cleaner-skills

Python ★ 26 updated 17d ago

macOS & Windows disk cleaner skills for Claude Code - AI-powered disk cleanup with 5-layer detection engine

A Claude Code skill that scans your Mac or Windows computer for safe-to-delete files, generates an interactive HTML report with color-coded cleanup suggestions, and lets you approve deletions in a browser.

Pythonsetup: easycomplexity 1/5

disk-cleaner is a skill for Claude Code, Anthropic's coding assistant, that scans your Mac or Windows computer for files that can safely be deleted and helps you reclaim disk space. You trigger it by telling Claude something like "my disk is full" or "I need to free up space," and it runs a scan script that reads your file system without deleting anything. Claude then analyzes the scan results, classifies each found item by how safe it is to remove, and generates an interactive HTML report you can open in a browser.

The report shows a disk usage bar, color-coded cards for each finding, a ranking of the five largest space consumers, and suggested cleanup actions. You can expand each card to see details and copy the cleanup command for that item. A local web server can be started to let you approve or reject deletions directly in the browser, with each operation logged to a file on disk.

Safety is a central focus. The skill combines path-checking rules drawn from an open-source Mac cleanup project called Mole, a list of more than 200 protected applications that must not be touched, and a tiered whitelist system that separates items safe for permanent deletion from items that should only go to the Trash. The scanner rejects relative paths, path-traversal attempts, symbolic link tricks, and any path inside system directories. Trash failures do not fall back to permanent deletion.

The scan covers more than twenty applications across categories including messaging apps, browsers, developer tools, creative software, and system folders. The project has no external dependencies and runs on pure Python from the standard library, so nothing needs to be installed with pip. It automatically detects whether it is running on macOS or Windows.

Where it fits