Token导航 LogoToken导航

Agent Skill · 研究检索

disk-hygiene(磁盘卫生)

disk-hygiene 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

disk-hygiene 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 27,391。

总安装 3,398周安装 143GitHub Stars 38下载 1,190核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:disk-hygiene(磁盘卫生)
来源仓库:https://github.com/terrylica/cc-skills
仓库路径:skills/disk-hygiene
安装命令:
npx skills add https://github.com/terrylica/cc-skills --skill disk-hygiene
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/terrylica/cc-skills --skill disk-hygiene

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

disk-hygiene 针对开发者环境进行存储健康度检查,识别 brew、uv、pip 等工具产生的缓存垃圾。特别关注 Downloads 目录积压与 Xcode 派生数据等易忽略的大文件聚集区。随着使用次数增加持续优化检测规则,但每次更新都应经过充分测试验证。

清理操作前会列出受影响路径供人工确认,避免自动执行引发意外后果。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/disk-hygiene

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/terrylica/cc-skills --skill disk-hygiene;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

disk-hygiene 怎么安装?

在终端执行 npx skills add https://github.com/terrylica/cc-skills --skill disk-hygiene。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

disk-hygiene 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

disk-hygiene 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

disk-hygiene 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

disk-hygiene 用的人多吗?

公开数据是累计安装 3,398 次,近一周安装 143 次,下载 1,190 次,GitHub 38 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

disk-hygiene 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
disk-hygiene

磁盘卫生 · 本页

3,39838操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Disk Hygiene

Audit disk usage, clean developer caches, find forgotten large files, and triage Downloads on macOS.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.

When to Use This Skill

Use this skill when:

  • User asks about disk space, storage, or cleanup
  • System is running low on free space
  • User wants to find old/forgotten large files
  • User wants to clean developer caches (brew, uv, pip, npm, cargo)
  • User wants to triage their Downloads folder
  • User asks about disk analysis tools (dust, dua, gdu, ncdu)

TodoWrite Task Templates

Template A - Full Disk Audit

1. Run disk overview (df -h / and major directories)
2. Audit developer caches (uv, brew, pip, npm, cargo, rustup, Docker)
3. Scan for forgotten large files (>50MB, not accessed in 180+ days)
4. Present findings with AskUserQuestion for cleanup choices
5. Execute selected cleanups
6. Report space reclaimed

Template B - Cache Cleanup Only

1. Measure current cache sizes
2. Run safe cache cleanups (brew, uv, pip, npm)
3. Report space reclaimed

Template C - Downloads Triage

1. List Downloads contents with dates and sizes
2. Categorize into groups (media, dev artifacts, personal docs, misc)
3. Present AskUserQuestion multi-select for deletion/move
4. Execute selected actions

Template D - Forgotten File Hunt

1. Scan home directory for large files not accessed in 180+ days
2. Group by location and type (media, ISOs, dev artifacts, documents)
3. Present findings sorted by size
4. Offer cleanup options via AskUserQuestion

Phase 1 - Disk Overview

Get the lay of the land before diving into specifics.

/usr/bin/env bash << 'OVERVIEW_EOF'
echo "=== Disk Overview ==="
df -h /

echo ""
echo "=== Major Directories ==="
du -sh ~/Library/Caches ~/Library/Logs ~/Library/Application\ Support \
  ~/.Trash ~/Downloads ~/Documents ~/Desktop ~/Movies ~/Music ~/Pictures \
  2>/dev/null | sort -rh

echo ""
echo "=== Developer Tool Caches ==="
du -sh ~/.docker ~/.npm ~/.cargo ~/.rustup ~/.local ~/.cache \
  ~/.conda ~/.pyenv ~/.local/share/mise 2>/dev/null | sort -rh
OVERVIEW_EOF

Phase 2 - Cache Audit & Cleanup

Cache Size Reference

CacheLocationTypical SizeClean Command
uv~/Library/Caches/uv/5-15 GBuv cache clean
Homebrew~/Library/Caches/Homebrew/3-10 GBbrew cleanup --prune=all
pip~/Library/Caches/pip/0.5-2 GBpip cache purge
npm~/.npm/_cacache/0.5-2 GBnpm cache clean --force
cargo~/.cargo/registry/cache/1-5 GBcargo cache -a (needs cargo-cache)
rustup~/.rustup/toolchains/2-8 GBrustup toolchain remove <old>
DockerDocker.app5-30 GBdocker system prune -a
Playwright~/Library/Caches/ms-playwright/0.5-2 GBnpx playwright uninstall
sccache~/Library/Caches/Mozilla.sccache/1-3 GBrm -rf ~/Library/Caches/Mozilla.sccache
huggingface~/.cache/huggingface/1-10 GBrm -rf ~/.cache/huggingface/hub/<model>

Safe Cleanup Commands (Always Re-downloadable)

/usr/bin/env bash << 'CACHE_CLEAN_EOF'
set -euo pipefail

echo "=== Measuring current cache sizes ==="
echo "uv:       $(du -sh ~/Library/Caches/uv/ 2>/dev/null | cut -f1 || echo 'N/A')"
echo "Homebrew: $(du -sh ~/Library/Caches/Homebrew/ 2>/dev/null | cut -f1 || echo 'N/A')"
echo "pip:      $(du -sh ~/Library/Caches/pip/ 2>/dev/null | cut -f1 || echo 'N/A')"
echo "npm:      $(du -sh ~/.npm/_cacache/ 2>/dev/null | cut -f1 || echo 'N/A')"

echo ""
echo "=== Cleaning ==="
brew cleanup --prune=all 2>&1 | tail -3
uv cache clean --force 2>&1
pip cache purge 2>&1
npm cache clean --force 2>&1
CACHE_CLEAN_EOF

Troubleshooting Cache Cleanup

IssueCauseSolution
uv cache lock heldAnother uv process runningUse uv cache clean --force
brew cleanup skips formulaeLinked but not latestSafe to ignore, or brew reinstall <pkg>
pip cache purge permission deniedSystem pip vs user pipUse python -m pip cache purge
Docker not runningDocker Desktop not startedStart Docker.app first, or skip

Phase 3 - Forgotten File Detection

Find large files that have not been accessed in 180+ days.

/usr/bin/env bash << 'STALE_EOF'
echo "=== Large forgotten files (>50MB, untouched 180+ days) ==="
echo ""

# Scan home directory (excluding Library, node_modules, .git, hidden dirs)
find "$HOME" -maxdepth 4 \
  -not -path '*/\.*' \
  -not -path '*/Library/*' \
  -not -path '*/node_modules/*' \
  -not -path '*/.git/*' \
  -type f -atime +180 -size +50M 2>/dev/null | \
while read -r f; do
  mod_date=$(stat -f '%Sm' -t '%Y-%m-%d' "$f" 2>/dev/null)
  size=$(du -sh "$f" 2>/dev/null | cut -f1)
  echo "${mod_date} ${size} ${f}"
done | sort

echo ""
echo "=== Documents & Desktop (>10MB, untouched 180+ days) ==="
find "$HOME/Documents" "$HOME/Desktop" \
  -type f -atime +180 -size +10M 2>/dev/null | \
while read -r f; do
  mod_date=$(stat -f '%Sm' -t '%Y-%m-%d' "$f" 2>/dev/null)
  size=$(du -sh "$f" 2>/dev/null | cut -f1)
  echo "${mod_date} ${size} ${f}"
done | sort
STALE_EOF

Common Forgotten File Types

TypeTypical LocationExample
Windows/Linux ISOsDocuments, Downloads.iso files from VM setup
CapCut/iMovie exportsMovies/Large .mp4 renders
Phone video transfersPictures/, DCIM/.MOV files from iPhone
Old Zoom recordingsDocuments/.aac, .mp4 from meetings
Orphaned downloadsDocuments/CFNetworkDownload_*.mp4
Screen recordingsDocuments/, Desktop/Capto/QuickTime .mov

Phase 4 - Downloads Triage

Use AskUserQuestion with multi-select to let the user choose what to clean.

Workflow

  1. List all files in ~/Downloads with dates and sizes
  2. Categorize into logical groups
  3. Present AskUserQuestion with categories as multi-select options
  4. Offer personal/sensitive PDFs separately (keep, move to Documents, or delete)
  5. Execute selected actions

Categorization Pattern

/usr/bin/env bash << 'DL_LIST_EOF'
echo "=== Downloads by date and size ==="
find "$HOME/Downloads" -maxdepth 1 \( -type f -o -type d \) ! -path "$HOME/Downloads" | \
while read -r f; do
  mod_date=$(stat -f '%Sm' -t '%Y-%m-%d' "$f" 2>/dev/null)
  size=$(du -sh "$f" 2>/dev/null | cut -f1)
  echo "${mod_date} ${size} $(basename "$f")"
done | sort
DL_LIST_EOF

AskUserQuestion Template

When presenting Downloads cleanup options, use this pattern:

  • Question 1 (multiSelect: true) - "Which items in ~/Downloads do you want to delete?"

- Group by type: movie files (with total size), old PDFs/docs, dev artifacts, app exports

  • Question 2 (multiSelect: false) - "What about personal/sensitive PDFs?"

- Options: Keep all, Move to Documents, Delete (already have copies)

  • Question 3 (multiSelect: false) - "Ongoing cleanup tool preference?"

- Options: dust + dua-cli, Hazel automation, custom launchd script

Disk Analysis Tools Reference

Comparison (Benchmarked on ~632GB home directory, Apple Silicon)

ToolWall TimeCPU UsageInteractive DeleteInstall
dust20.4s637% (parallel)No (view only)brew install dust
gdu-go28.8s845% (very parallel)Yes (TUI)brew install gdu
dua-cli37.1s237% (moderate)Yes (staged safe delete)brew install dua-cli
ncdu96.6s43% (single-thread)Yes (TUI)brew install ncdu

Recommended Combo

  • dust for quick "where is my space going?" - fastest scanner, tree output
  • dua i or gdu-go for interactive exploration with deletion

Quick Usage

# dust - instant tree overview
dust -d 2 ~              # depth 2
dust -r ~/Library         # reverse sort (smallest first)

# dua - interactive TUI with safe deletion
dua i ~                   # navigate, mark, delete with confirmation

# gdu-go - ncdu-like TUI, fast on SSDs
gdu-go ~                  # full TUI with delete support
gdu-go -n ~              # non-interactive (for scripting/benchmarks)

Install All Tools

brew install dust dua-cli gdu

Note: gdu installs as gdu-go to avoid conflict with coreutils.

Quick Wins Summary

Ordered by typical space reclaimed (highest first):

ActionTypical SavingsRiskCommand
uv cache clean5-15 GBNone (re-downloads)uv cache clean --force
brew cleanup --prune=all3-10 GBNone (re-downloads)brew cleanup --prune=all
Delete movie files in Downloads2-10 GBCheck firstManual after AskUserQuestion
npm cache clean --force0.5-2 GBNone (re-downloads)npm cache clean --force
pip cache purge0.5-2 GBNone (re-downloads)pip cache purge
Prune old rustup toolchains2-5 GBKeep currentrustup toolchain list then remove
Docker system prune5-30 GBRemoves stopped containersdocker system prune -a
Empty TrashVariableIrreversiblerm -rf ~/.Trash/*

Post-Change Checklist

After modifying this skill:

  1. Cache commands tested on macOS (Apple Silicon)
  2. Benchmark data still current (re-run if tools updated)
  3. AskUserQuestion patterns match current tool API
  4. All bash blocks use /usr/bin/env bash << 'EOF' wrapper
  5. No hardcoded user paths (use $HOME)
  6. Append changes to evolution-log.md

Troubleshooting

IssueCauseSolution
uv cache clean hangsLock held by running uvUse --force flag
brew cleanup frees 0 bytesAlready clean or formulae linkedRun brew cleanup --prune=all
find reports permission deniedSystem Integrity ProtectionAdd 2>/dev/null to suppress
gdu command not foundInstalled as gdu-goUse gdu-go (coreutils conflict)
dust shows different size than dfCounting method differsNormal - df includes filesystem overhead
Stale file scan is slowDeep directory treeLimit -maxdepth or exclude more paths
Docker not accessibleDesktop app not runningStart Docker.app or skip Docker cleanup

Post-Execution Reflection

After this skill completes, reflect before closing the task:

  1. Locate yourself. — Find this SKILL.md's canonical path before editing.
  2. What failed? — Fix the instruction that caused it.
  3. What worked better than expected? — Promote to recommended practice.
  4. What drifted? — Fix any script, reference, or dependency that no longer matches reality.
  5. Log it. — Evolution-log entry with trigger, fix, and evidence.

Do NOT defer. The next invocation inherits whatever you leave behind.

平台分布

Codex

33.28%
按下载量换算396

Claude

30.7%
按下载量换算365

Cursor

19%
按下载量换算226

Gemini CLI

9.68%
按下载量换算115

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills