{"id":"9f016745-cab7-4f2b-b9f1-2efb059d5726","shortId":"SXF5SM","kind":"skill","title":"disk-cleaner","tagline":"扫描磁盘空间占用，找出可安全删除的缓存、编译产物、安装包等，交互式清理释放空间","description":"# 磁盘空间清理工具\n\n你是一个磁盘空间管理专家，帮助用户找出可以安全删除的文件和目录，释放磁盘空间。\n\n用户传入的参数（如有）：$ARGUMENTS\n如果用户没有传入参数，默认扫描用户主目录 `~`。\n\n## 扫描流程\n\n### 第一步：磁盘概况\n\n```bash\ndf -h /\n```\n\n### 第二步：并行扫描各类占用\n\n**同时执行以下所有扫描：**\n\n1. **用户主目录一级概览**\n```bash\ndu -sh ~/Desktop ~/Downloads ~/Documents ~/Pictures ~/Music ~/Movies ~/Library 2>/dev/null | sort -rh\n```\n\n2. **隐藏目录占用**\n```bash\ndu -sh ~/.[!.]* 2>/dev/null | sort -rh | head -20\n```\n\n3. **代码目录占用**（如果存在）\n```bash\ndu -sh ~/Desktop/code/*/* 2>/dev/null | sort -rh | head -20\n```\n\n4. **Application Support 大户**\n```bash\ndu -d1 -h ~/Library/Application\\ Support/ 2>/dev/null | sort -rh | head -15\n```\n\n5. **废纸篓**\n```bash\ndu -sh ~/.Trash/ 2>/dev/null\n```\n\n### 第三步：定向扫描可清理项\n\n**并行执行以下扫描：**\n\n1. **Rust target 编译缓存**\n```bash\nfind ~/Desktop/code -name \"target\" -type d -maxdepth 5 -exec du -sh {} \\; 2>/dev/null | sort -rh\n```\n\n2. **node_modules 依赖**\n```bash\nfind ~/Desktop/code -name \"node_modules\" -type d -maxdepth 5 -exec du -sh {} \\; 2>/dev/null | sort -rh | head -15\n```\n\n3. **.next 构建缓存**\n```bash\nfind ~/Desktop/code -name \".next\" -type d -maxdepth 5 -exec du -sh {} \\; 2>/dev/null | sort -rh\n```\n\n4. **包管理器缓存**\n```bash\ndu -sh ~/.cache/uv ~/.cache/huggingface ~/.cache/pre-commit ~/.cache/puppeteer ~/.cache/rod ~/.npm/_cacache ~/.pnpm-store ~/.bun ~/.gradle 2>/dev/null | sort -rh\n```\n\n5. **Downloads 中的安装包**\n```bash\nfind ~/Downloads -maxdepth 1 \\( -name \"*.dmg\" -o -name \"*.pkg\" -o -name \"*.app\" \\) -exec ls -lhS {} \\; 2>/dev/null\n```\n\n6. **大的 .git 目录**\n```bash\nfind ~/Desktop/code -name \".git\" -type d -maxdepth 4 -exec du -sh {} \\; 2>/dev/null | sort -rh | head -10\n```\n\n7. **Docker 占用**（如果 Docker 在运行）\n```bash\ndocker system df 2>/dev/null || true\n```\n\n### 第四步：生成清理报告\n\n按以下格式输出报告：\n\n```\n## 磁盘概况\n总容量: XXX | 已用: XXX | 可用: XXX\n\n## 可清理项目（按释放空间排序）\n\n### 🔴 高价值（可安全删除，释放大量空间）\n| 类别 | 大小 | 说明 |\n|------|------|------|\n| Rust target 编译缓存 | XXG | 重新 cargo build 即可恢复 |\n| 包管理器缓存 | XXG | 按需自动重新下载 |\n| ... | ... | ... |\n\n### 🟡 中等价值（按需清理）\n| 类别 | 大小 | 说明 |\n|------|------|------|\n| node_modules | XXG | 不常用项目可删，bun install 恢复 |\n| Downloads 安装包 | XXXM | 已安装的 .dmg/.pkg 可删 |\n| ... | ... | ... |\n\n### 🔵 低价值 / 需谨慎\n| 类别 | 大小 | 说明 |\n|------|------|------|\n| 应用数据 | XXG | 删除可能丢失应用配置 |\n| ... | ... | ... |\n\n## 预计可释放: XXG\n```\n\n### 第五步：交互式清理\n\n报告输出后，询问用户要清理哪些类别。用户确认后执行删除。\n\n## 安全规则\n\n- **绝不删除**用户文档、照片、代码源文件\n- **绝不删除** `.git` 目录（只报告大小供参考）\n- **绝不删除**当前工作目录下的 `target/` 或 `node_modules/`\n- 只删除缓存、编译产物、安装包等可恢复的内容\n- 每次删除前列出完整路径，等用户确认\n- 删除后运行 `df -h /` 报告释放了多少空间\n\n## 注意事项\n\n- 用中文输出所有信息\n- 扫描时最大化并行执行，减少等待时间\n- 如果遇到权限问题，先用 `chmod -R u+w` 尝试，不要用 sudo","tags":["disk","cleaner","claude","arsenal","majiayu000","agent-skills","ai-agents","ai-coding-assistant","automation","claude-code","code-review","developer-tools"],"capabilities":["skill","source-majiayu000","skill-disk-cleaner","topic-agent-skills","topic-ai-agents","topic-ai-coding-assistant","topic-automation","topic-claude","topic-claude-code","topic-code-review","topic-developer-tools","topic-devops","topic-productivity","topic-prompt-engineering","topic-python"],"categories":["claude-arsenal"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/majiayu000/claude-arsenal/disk-cleaner","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add majiayu000/claude-arsenal","source_repo":"https://github.com/majiayu000/claude-arsenal","install_from":"skills.sh"}},"qualityScore":"0.464","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 29 github stars · SKILL.md body (2,518 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-01T07:01:13.639Z","embedding":null,"createdAt":"2026-04-18T22:24:08.708Z","updatedAt":"2026-05-01T07:01:13.639Z","lastSeenAt":"2026-05-01T07:01:13.639Z","tsv":"'-10':216 '-15':82,136 '-20':53,66 '/.bun':168 '/.cache/huggingface':162 '/.cache/pre-commit':163 '/.cache/puppeteer':164 '/.cache/rod':165 '/.cache/uv':161 '/.gradle':169 '/.npm/_cacache':166 '/.pnpm-store':167 '/.trash':88 '/desktop':32 '/desktop/code':60,100,120,142,201 '/dev/null':40,49,62,78,90,111,132,153,171,194,212,228 '/documents':34 '/downloads':33,179 '/library':38 '/library/application':75 '/movies':37 '/music':36 '/pictures':35 '1':27,94,181 '2':39,43,48,61,77,89,110,114,131,152,170,193,211,227 '3':54,137 '4':67,156,207 '5':83,106,127,148,174 '6':195 '7':217 'app':189 'applic':68 'argument':15 'bash':21,29,45,57,71,85,98,118,140,158,177,199,223 'build':254 'bun':268 'cargo':253 'chmod':322 'cleaner':3 'd':104,125,146,205 'd1':73 'df':22,226,313 'disk':2 'disk-clean':1 'dmg':183 'dmg/.pkg':275 'docker':218,221,224 'download':175,271 'du':30,46,58,72,86,108,129,150,159,209 'exec':107,128,149,190,208 'find':99,119,141,178,200 'git':197,203,298 'h':23,74,314 'head':52,65,81,135,215 'instal':269 'lhs':192 'ls':191 'maxdepth':105,126,147,180,206 'modul':116,123,265,306 'name':101,121,143,182,185,188,202 'next':138,144 'node':115,122,264,305 'o':184,187 'pkg':186 'r':323 'rh':42,51,64,80,113,134,155,173,214 'rust':95,248 'sh':31,47,59,87,109,130,151,160,210 'skill' 'skill-disk-cleaner' 'sort':41,50,63,79,112,133,154,172,213 'source-majiayu000' 'sudo':328 'support':69,76 'system':225 'target':96,102,249,303 'topic-agent-skills' 'topic-ai-agents' 'topic-ai-coding-assistant' 'topic-automation' 'topic-claude' 'topic-claude-code' 'topic-code-review' 'topic-developer-tools' 'topic-devops' 'topic-productivity' 'topic-prompt-engineering' 'topic-python' 'true':229 'type':103,124,145,204 'u':324 'w':325 'xxg':251,257,266,283,286 'xxx':235,237,239 'xxxm':273 '不常用项目可删':267 '不要用':327 '中的安装包':176 '中等价值':259 '交互式清理':288 '交互式清理释放空间':8 '代码源文件':296 '代码目录占用':55 '低价值':277 '你是一个磁盘空间管理专家':10 '依赖':117 '先用':321 '减少等待时间':319 '删除可能丢失应用配置':284 '删除后运行':312 '包管理器缓存':157,256 '占用':219 '即可恢复':255 '只删除缓存':307 '只报告大小供参考':300 '可删':276 '可安全删除':243 '可清理项目':240 '可用':238 '同时执行以下所有扫描':26 '在运行':222 '大小':246,262,280 '大户':70 '大的':196 '如有':14 '如果':220 '如果存在':56 '如果用户没有传入参数':16 '如果遇到权限问题':320 '安全规则':292 '安装包':272 '安装包等':7 '安装包等可恢复的内容':309 '定向扫描可清理项':92 '尝试':326 '已安装的':274 '已用':236 '帮助用户找出可以安全删除的文件和目录':11 '并行执行以下扫描':93 '并行扫描各类占用':25 '应用数据':282 '废纸篓':84 '当前工作目录下的':302 '总容量':234 '恢复':270 '或':304 '扫描时最大化并行执行':318 '扫描流程':18 '扫描磁盘空间占用':4 '找出可安全删除的缓存':5 '报告输出后':289 '报告释放了多少空间':315 '按以下格式输出报告':232 '按释放空间排序':241 '按需清理':260 '按需自动重新下载':258 '构建缓存':139 '每次删除前列出完整路径':310 '注意事项':316 '照片':295 '生成清理报告':231 '用中文输出所有信息':317 '用户主目录一级概览':28 '用户传入的参数':13 '用户文档':294 '用户确认后执行删除':291 '目录':198,299 '磁盘概况':20,233 '磁盘空间清理工具':9 '第一步':19 '第三步':91 '第二步':24 '第五步':287 '第四步':230 '等用户确认':311 '类别':245,261,279 '绝不删除':293,297,301 '编译产物':6,308 '编译缓存':97,250 '询问用户要清理哪些类别':290 '说明':247,263,281 '释放大量空间':244 '释放磁盘空间':12 '重新':252 '隐藏目录占用':44 '需谨慎':278 '预计可释放':285 '高价值':242 '默认扫描用户主目录':17","prices":[{"id":"b4e1134c-ece1-4ec8-a71d-05e9d1fa00b5","listingId":"9f016745-cab7-4f2b-b9f1-2efb059d5726","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"majiayu000","category":"claude-arsenal","install_from":"skills.sh"},"createdAt":"2026-04-18T22:24:08.708Z"}],"sources":[{"listingId":"9f016745-cab7-4f2b-b9f1-2efb059d5726","source":"github","sourceId":"majiayu000/claude-arsenal/disk-cleaner","sourceUrl":"https://github.com/majiayu000/claude-arsenal/tree/main/skills/disk-cleaner","isPrimary":false,"firstSeenAt":"2026-04-18T22:24:08.708Z","lastSeenAt":"2026-05-01T07:01:13.639Z"}],"details":{"listingId":"9f016745-cab7-4f2b-b9f1-2efb059d5726","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"majiayu000","slug":"disk-cleaner","github":{"repo":"majiayu000/claude-arsenal","stars":29,"topics":["agent-skills","ai-agents","ai-coding-assistant","automation","claude","claude-code","code-review","developer-tools","devops","productivity","prompt-engineering","python","software-development","typescript","workflows"],"license":"mit","html_url":"https://github.com/majiayu000/claude-arsenal","pushed_at":"2026-04-29T04:12:22Z","description":"52 production-ready Claude Code skills and 7 specialized agents for software development, DevOps, product workflows, and automation.","skill_md_sha":"b68028139c7bf436e8deecfacb6974b73af38f5f","skill_md_path":"skills/disk-cleaner/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/majiayu000/claude-arsenal/tree/main/skills/disk-cleaner"},"layout":"multi","source":"github","category":"claude-arsenal","frontmatter":{"name":"disk-cleaner","description":"扫描磁盘空间占用，找出可安全删除的缓存、编译产物、安装包等，交互式清理释放空间"},"skills_sh_url":"https://skills.sh/majiayu000/claude-arsenal/disk-cleaner"},"updatedAt":"2026-05-01T07:01:13.639Z"}}