disk-cleaner

Solid

扫描磁盘空间占用,找出可安全删除的缓存、编译产物、安装包等,交互式清理释放空间

AI & Automation 72 stars 10 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
62
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 磁盘空间清理工具 你是一个磁盘空间管理专家,帮助用户找出可以安全删除的文件和目录,释放磁盘空间。 用户传入的参数(如有):$ARGUMENTS 将 `$ARGUMENTS` 视为用户指定的扫描范围,不要忽略。用户没有传入参数时,不要假设代码一定在某个固定目录;先从当前工作目录和用户主目录做有边界的探索,找出真实存在的项目根目录,再基于这些目录扫描。 ## 扫描流程 ### 第一步:解析扫描范围 先确定本次扫描根目录,后续所有代码相关扫描都必须基于这些根目录。 规则: - 如果用户传入路径参数,逐个解析为绝对路径;只扫描这些路径及其子目录。 - 如果用户没有传入参数,以当前工作目录和用户主目录为起点做探索。 - 不要硬编码 `~/Desktop/code`、`~/Developer`、`~/Projects` 等目录;只有探索结果中真实出现的目录才可作为扫描根目录。 - 代码根目录通过项目标记发现,例如 `.git`、`Cargo.toml`、`package.json`、`pyproject.toml`、`go.mod`、`pnpm-workspace.yaml`、`bun.lockb`。 - 探索时跳过明显不该递归的大目录:`Library`、`.Trash`、`node_modules`、`target`、`.git`、应用数据缓存目录。 - 输出去重后的绝对路径列表,命名为“扫描根目录”,并在报告里展示。 - 后续命令中先把扫描根目录写入 `scan_roots=(...)` 数组;不要原样执行模板里的占位路径。 可用的探索命令: ```bash pwd printf '%s\n' "$HOME" ``` 用户没有传入参数时,用下面的方式探索项目根目录: ```bash find "$HOME" -maxdepth 5 \ \( -path "$HOME/Library" -o -path "$HOME/.Trash" -o -path "*/node_modules" -o -path "*/target" \) -prune -o \ \( \( -name ".git" -type d -prune \) -o -name "Cargo.toml" -o -name "package.json" -o -name "pyproject.toml" -o -name "go.mod" -o -name "pnpm-workspace.yaml" -o -name "bun.lockb" \) -print 2>/dev/null \ | awk '{ if ($0 ~ /\/\.git$/) sub(/\/\.git$/, "", $0); else sub(/\/[^\/]+$/, "", $0); print }' \ | sort -u | head -80 ``` 如果探索结果过多,优先选择: - 当前工作目录所在项目 - 占用明显较大的项目父目录 - 最近用户提到或传入的目录 ### 第二步:全量并行扫描 **一次性并行执行以下所有扫描(每个一个 Bash 调用):** 1. **磁盘概况 + 主目录一级** ```bash df -h / && echo "---" && du -d1 -h "$HOME" 2>/dev/null | sort -rh | head -30 ``` 2. **隐藏目录占用** ```bash du -sh ~/.[!.]* 2>/dev/nul...

Details

Author
majiayu000
Repository
majiayu000/claude-arsenal
Created
5 months ago
Last Updated
4 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

code-tidy

代码洁癖级整理 — 清除死代码、冗余注释、未用导入;统一排序与结构; 每次写代码后自动触发。MUST trigger when user says: "整理代码", "tidy code", "clean code", "代码洁癖", "清理代码", "整理一下代码", "清理系统", "清理垃圾", "清理残留", or after any significant code edit session, package installation, or file download. Also trigger when the user expresses dissatisfaction with code organization or mentions OCD/cleanliness.

5 Updated today
LiHongwei-cn
Data & Documents Listed

system-cleanup

Use when a Linux disk is filling up or the user asks to free space / clean the system / "系统盘满了" / move large files off the system disk. Diagnose where the space went (df / du / dpkg / snap / docker), then give a prioritized, risk-tagged plan — do safe user-level deletions, and LIST the sudo items for the user to run (default to advise-then-confirm; this kind of box often has no passwordless sudo, so use pkexec or hand over the commands). Covers the VS Code WebStorage PDF-cache bloat bug, old-kernel pile-up, snap/journal/apt/docker caches, and NTFS data-disk write failures.

0 Updated today
jajupmochi
Web & Frontend Listed

devsweep

Developer-focused Windows disk cleanup. Finds and reclaims the big space hogs on a dev machine — Docker/WSL2 vhdx virtual disks (which only grow, never shrink), stray build artifacts (node_modules, target, .next, __pycache__, .venv), browser/package-manager caches, and temp files. Read-only by default: scans and reports first, deletes only after you confirm. Use when the user asks to: free disk space, clean C drive, my disk is full, reclaim space, shrink Docker, compact WSL vhdx, find what's eating my disk, clean node_modules, disk cleanup. Chinese triggers: 磁盘满了, C盘满了, 清理磁盘, 释放空间, 磁盘不够用, 清理 Docker, 压缩 vhdx, 清 node_modules, 看看什么占了硬盘. Windows / PowerShell only.

0 Updated yesterday
sukichen1101-eng
Data & Documents Listed

win-c-cleaner

Windows 10/11 通用 C 盘清理 skill。按 8 阶段(风险低→收益大)分批释放系统盘空间:临时文件、休眠/虚拟内存、DISM WinSxS、UWP 应用、移动大应用、重复驱动、OEM 软件、出厂预装包。预计释放 25-35 GB。在用户提到「C 盘清理 / 清理 C 盘 / 系统盘满了 / free up C drive / Windows 磁盘清理 / WinSxS / Windows.old / 删除休眠文件 / 缩虚拟内存」时使用。

0 Updated 3 days ago
Gutiz
AI & Automation Listed

data-optimizer-pro

智能数据优化工具,自动清理和优化项目文件

1 Updated today
Lmgsd-2024