skills/clean-disk-space/SKILL.md
Safe disk space analysis and cleanup workflow for local machines. Use when asked to analyze full disks, identify large cache/log/temp/build artifacts, produce a cleanup report, run or simulate dry-runs, wait for user approval, and then clean only confirmed redundant files without affecting software functionality, user data, databases, models, projects, or developer toolchains. Also use for creating reusable disk cleanup SOPs or post-cleanup reports.
npx skillsauth add mrlyk/skills clean-disk-spaceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to perform conservative disk cleanup. Treat deletion as a separate phase that happens only after read-only analysis, a clear report, dry-run-style confirmation, and explicit user approval.
Clarify or infer:
If user intent includes "do not affect existing functionality", default to a conservative plan and exclude data/config/toolchain directories.
Use platform-appropriate read-only commands. On macOS, check both root and data volume:
df -h /
df -h /System/Volumes/Data 2>/dev/null
Record free space before cleanup. Calculate the gap to the target.
Avoid full home or full disk recursive scans at the beginning. Start with common safe candidates:
du -sh ~/Library/Caches ~/Library/Logs ~/.cache 2>/dev/null
du -sh ~/.npm ~/.pnpm-store ~/.yarn 2>/dev/null
du -sh ~/Downloads 2>/dev/null
For developer machines, inspect tool caches without deleting:
du -sh ~/Library/Developer ~/.gradle ~/.m2 ~/.cargo ~/.rustup 2>/dev/null
If commands produce many permission errors, run for a long time, enter privacy-protected directories, or cause high CPU:
Low-risk default cleanup:
Needs explicit user confirmation:
Default keep list:
.nvm, .m2, .gradle, .rustup/toolchains.Before deletion, present:
Ask for explicit approval before running destructive commands.
If the user asks for dry-run, do not delete. List what would be deleted and what will be kept.
Use real dry-run flags when tools support them. When they do not, simulate with read-only commands such as:
du -sh <candidate-paths> 2>/dev/null
find <candidate-path> -maxdepth 1 -type d 2>/dev/null
For tools without dry-run support, state that the command has no dry-run mode and use read-only size/listing commands instead.
Only after explicit approval:
When deletion fails with permission errors:
Use this only if the user has Docker/Podman/Colima or asks about containers.
Read-only inspection examples for Docker:
docker system df
docker images
docker ps -a --size
docker builder du
Default rules:
After cleanup, run read-only verification:
df -h /
df -h /System/Volumes/Data 2>/dev/null
If relevant, verify optional systems such as container images or build cache.
Final report should include:
development
把一段需求 / 一段思考 / 一段会议纪要写成单页 HTML 格式的「技术方案 / Design Doc」(工程视角的"怎么做",含背景、目标、技术方案、风险、影响范围、产研计划等模块;不是产品 PRD 的"做什么"),或者增量更新一份已有技术方案。新建场景:当用户说「写一份技术方案」「写个 design doc」「整理成 HTML 技术文档」「评审用的方案文档」「create tech spec」时使用。更新场景:当用户指向某份已有技术方案 HTML、说「评审完根据反馈调一下」「在风险章节加一条」「方案 A 改成 B」「补充某个章节」时也使用本 skill —— 走「最小化改动 + 保持文档稳定身份」的更新工作流而不是重写。
tools
Improve typography by fixing font choices, hierarchy, sizing, weight consistency, and readability. Makes text feel intentional and polished.
documentation
One-time setup that gathers design context for your project and saves it to your AI config file. Run once to establish persistent design guidelines.
testing
Tone down overly bold or visually aggressive designs. Reduces intensity while maintaining design quality and impact.