System.Analyze Disk Space Use
БесплатноБез исполняемых скриптовНе проверенAnalyze disk usage to find the largest space consumers and reclaim options
от gpsaggese★ 158 звёзд на GitHubОб этом скилле
Goal
- Find what consumes the most disk space. Identify what is safely reclaimable (unused container/VM images, caches, logs) and what needs manual review
- Never delete, move, or modify anything. Analysis only
Workflow
Check Overall Disk Usage
- Run
df -hto see total, used, and available space per volume - On macOS, user data lives on
/System/Volumes/Data, not/. Use itsCapacity/Availcolumns to judge urgency
Survey the Home Directory
List top-level home directory usage, largest first:
> du -sh ~/* 2>/dev/null | sort -rhRecurse one level at a time into the dominant directory (on macOS, often
~/Library), sorting by size, until you reach the actual large items:> /usr/bin/du -sh ~/Library/* 2>/dev/null | sort -rh | head -30Track every directory measured. They feed the top-10 list in "Rank Findings And Write The Report"
Check Container and VM Engines First
- Container and VM engines are usually the biggest consumer on a dev machine. They cache every pulled or built image and rarely self-prune
- For each installed engine, check its usage report before raw directory sizes:
- Docker: if
dockerexists, rundocker system df -vfor a per-image and per-volume breakdown. Images withCONTAINERS= 0 are unused and reclaimable - Apple
containerCLI (native macOS containers): ifcontainerexists, runcontainer system df. Its data lives under~/Library/Application Support/com.apple.container. Docker's VM disk lives under~/Library/Containers/com.docker.docker - Other engines (
podman,colima,lima,nerdctl): use their equivalentsystem df/ usage-report command
- Docker: if
- The tool can report a builder container (Docker
buildxstate volume, Applebuildkitbuilder) as "active", which excludes it fromRECLAIMABLEeven when it is very large- Size it with
/usr/bin/du -sh <PATH>. Report it as a manual candidate, with the reset command (docker buildx prune --all, orcontainer builder stop && container builder delete)
- Size it with
Check Common Cache/Log Locations
- MacOS:
~/Library/Caches~/Library/Logs- Per-app
Cache/Code Cachefolders under~/Library/Application Support/<App> ~/.Trashtmutil listlocalsnapshots /: flag any entry that is not a normalcom.apple.os.update-*system snapshot
- Linux equivalents:
~/.cache,/var/cache,/var/log, and package-manager caches (apt,dnf,pacman)
Spot-Check Dev Artifacts
- Look for large, likely-stale developer artifacts:
venv/.venvdirectories,node_modules, old or duplicate repo clones, and suspiciously named directories (backups,ancient_*,old_*) - Report these as "needs manual review", never as auto-recommended deletions. They can hold unique, irreplaceable data
Rank Findings and Write the Report
- For each candidate, record: path, size, and whether it is safely reclaimable (rebuildable, re-pullable, re-cacheable) or needs manual review (may hold unique data)
- Fill in
.claude/skills/system.analyze_disk_space_use/report.template.md, formatted per.claude/skills/markdown.rules.md - Save the report to
system.analyze_disk_space_use.mdin the current dir - Right after the title, add how the report was generated:
- Generated by `.claude/skills/system.analyze_disk_space_use/SKILL.md` - List the top 10 directories measured in "Survey The Home Directory" and "Check
Container And VM Engines First", largest first. Prefer the most specific directory
that explains the bytes (e.g., the Docker VM disk, not just
~/Library) - Take every reclaim command from the tool's own output (e.g.,
docker system df). Never guess one. Pair each with the size it frees - Lead the report with a summary table of every command and its estimated savings.
Then give the full nested breakdown per
.claude/skills/markdown.rules.md"List of Items": one bold-labeled bullet per reclaimable item, with the command and size nested under it - Rank the breakdown by impact (space freed) first, then by risk
Create a Script to Perform the Cleanup
- Create a Bash script
system.analyze_disk_space_use.shin the current dir- Do not make it executable, since the user must review it first
- Add a comment for each potential saving: how safe it is, how much space it
saves, and the command
# SAFETY: low (cache rebuilds automatically on next use) # SPACE FREED: ~20GB # COMMAND: delete uv package manager cache # rm -rf ~/.cache/uv
Constraints
- Only run read-only commands:
df,du,*system df,*ls,tmutil listlocalsnapshots,find(without-delete) - Never run a destructive command (
docker system prune,docker image rm,container image rm,rm -rf,container builder delete, etc.). List them in the report only, as candidates for the user to run - If a read-only command fails with an unexpected `usage:
Установить System.Analyze Disk Space Use в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл System.Analyze Disk Space Use?
Analyze disk usage to find the largest space consumers and reclaim options
Как установить скилл System.Analyze Disk Space Use?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл System.Analyze Disk Space Use запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic