disk-cleaner
Analyze disk usage, find large/old files, and suggest safe cleanup actions.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- description
- Analyze disk usage, find large/old files, and suggest safe cleanup actions.
02 资源文件 2
- 参考文档_meta.json276 B
- 参考文档README.md322 B
03 SKILL.md 正文
Disk Cleaner
Analyze disk usage and identify cleanup opportunities.
Instructions
-
Filesystem overview:
df -h --output=source,size,used,avail,pcent,target | grep -v tmpfs -
Directory analysis (top space consumers):
du -sh /path/* 2>/dev/null | sort -rh | head -20 -
Find large files:
find /path -type f -size +100M -exec ls -lh {} \; 2>/dev/null | sort -k5 -rh | head -20 -
Find old files (not modified in 90+ days):
find /path -type f -mtime +90 -size +10M -exec ls -lh {} \; 2>/dev/null | sort -k5 -rh -
Common cleanup targets:
# Package caches du -sh ~/.cache/pip ~/.npm/_cacache ~/.cache/yarn 2>/dev/null # Docker docker system df 2>/dev/null # Logs du -sh /var/log/* 2>/dev/null | sort -rh | head -10 # Trash du -sh ~/.local/share/Trash 2>/dev/null # Temp du -sh /tmp 2>/dev/null -
Report format:
? Disk Report — /home (85% used, 12GB free) ## Top Space Users | Path | Size | Last Modified | |------|------|---------------| | ~/Downloads | 8.2 GB | various | | ~/.cache | 3.1 GB | today | ## Cleanup Suggestions | Action | Saves | Command | Risk | |--------|-------|---------|------| | Clear npm cache | ~1.2 GB | npm cache clean --force | ? Safe | | Docker prune | ~4.5 GB | docker system prune -a | ? Review | | Old logs | ~800 MB | find /var/log -mtime +30 -delete | ? Review |
Security
- Never auto-delete — always show commands and let user confirm
- Use
trashoverrmwhen available (recoverable) - Skip
/proc,/sys,/devin scans - Don't scan directories outside user's permission
Edge Cases
- Permission denied: Use
2>/dev/nullto suppress; note inaccessible dirs - Symlinks: Use
-not -type lto avoid counting symlinked data twice - Mounted drives: Identify mount points; don't accidentally clean external storage
Requirements
- Standard Unix tools:
du,df,find,sort - No API keys needed
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.