skills/file-cleaner/SKILL.md
系统文件清理工具。扫描和识别大文件、垃圾文件(临时文件、缓存、日志、备份等),提供交互式清理界面让用户选择删除。当用户需要清理磁盘空间、整理系统文件、查找大文件、删除垃圾文件或释放存储空间时使用此技能。
npx skillsauth add aaaaqwq/agi-super-skills file-cleanerInstall 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.
系统文件清理工具,帮助用户扫描、识别和清理大文件与垃圾文件。
扫描指定目录,找出占用空间的大文件(默认 >10MB)。
python3 scripts/find_large_files.py <directory> [options]
选项:
--min-size <MB> - 最小文件大小(默认: 10)--max-results <N> - 最大结果数(默认: 100)--show <N> - 显示的文件数(默认: 20)--export <path> - 导出结果到 JSON示例:
# 扫描 home 目录的大文件
python3 scripts/find_large_files.py ~
# 扫描大于 50MB 的文件
python3 scripts/find_large_files.py ~ --min-size 50
# 导出结果
python3 scripts/find_large_files.py ~ --export large_files.json
扫描并识别各类垃圾文件:临时文件、缓存、日志、备份等。
python3 scripts/find_garbage.py <directory> [options]
垃圾文件类别:
temp_files - 临时文件(.tmp, .temp, .bak, .swp, .DS_Store)cache_files - 缓存文件(pycache, *.pyc, .cache)log_files - 日志文件(*.log)backup_files - 备份文件(.backup, .old)build_artifacts - 构建产物(dist, build, .next, out)editor_temp - 编辑器临时文件(.swo, .swn)download_temp - 下载临时文件(.crdownload, .part)选项:
--categories <cat1> <cat2> - 指定扫描类别(默认: 全部)--show <N> - 每个类别显示的文件数(默认: 10)--export <path> - 导出结果到 JSON--script <path> - 生成清理脚本示例:
# 扫描所有垃圾文件
python3 scripts/find_garbage.py ~
# 只扫描缓存和临时文件
python3 scripts/find_garbage.py ~ --categories cache_files temp_files
# 导出结果
python3 scripts/find_garbage.py ~ --export garbage_scan.json
# 生成清理脚本
python3 scripts/find_garbage.py ~ --script cleanup.sh
基于扫描结果,提供交互式界面让用户选择要清理的文件。
python3 scripts/clean_interactive.py <scan_result.json> [options]
选项:
--type <garbage|large> - 扫描结果类型(默认: garbage)--dry-run - 预演模式,不实际删除文件示例:
# 清理垃圾文件
python3 scripts/clean_interactive.py garbage_scan.json
# 清理大文件
python3 scripts/clean_interactive.py large_files.json --type large
# 预演模式(测试)
python3 scripts/clean_interactive.py garbage_scan.json --dry-run
# 步骤 1: 扫描垃圾文件
python3 scripts/find_garbage.py ~ --export /tmp/garbage_scan.json
# 步骤 2: 交互式清理
python3 scripts/clean_interactive.py /tmp/garbage_scan.json
对于垃圾文件,可以直接生成清理脚本:
# 生成清理脚本
python3 scripts/find_garbage.py ~ --script cleanup.sh
# 检查脚本(确认要删除的文件)
cat cleanup.sh
# 执行清理
bash cleanup.sh
对于大文件,推荐使用交互式清理:
# 扫描大文件
python3 scripts/find_large_files.py ~ --export /tmp/large_files.json
# 交互式选择删除
python3 scripts/clean_interactive.py /tmp/large_files.json --type large
以下目录和文件会自动排除,避免误删:
/proc, /sys, /dev, /usr, /bin等.git, .svn, .hgvenv, .venv, env垃圾文件分为两类:
🟢 安全删除(自动标记):
🟡 需要确认(需手动检查):
使用 --dry-run 测试清理操作,不实际删除:
python3 scripts/clean_interactive.py scan.json --dry-run
建议每月执行一次文件清理:
# 每月清理脚本
python3 scripts/find_garbage.py ~ --export /tmp/monthly_scan.json
python3 scripts/clean_interactive.py /tmp/monthly_scan.json
当磁盘空间不足时:
# 1. 找出最大的文件
python3 scripts/find_large_files.py ~ --min-size 100 --show 20
# 2. 清理垃圾文件
python3 scripts/find_garbage.py ~ --script cleanup.sh
bash cleanup.sh
清理开发项目目录:
# 清理构建产物和缓存
python3 scripts/find_garbage.py ~/projects \
--categories build_artifacts cache_files \
--script project_cleanup.sh
⚠️ 使用前必读:
先预览再删除
--dry-run 测试重要文件备份
权限问题
不可恢复
trash 命令而不是直接删除扫描大文件,输出文件列表和总大小。自动排除系统目录和版本控制目录。
识别 7 种垃圾文件类型,分类统计,标记安全删除状态。可生成自动清理脚本。
交互式清理界面,支持按类别选择、批量操作、预演模式。显示文件详情和总大小。
# 快速找出大文件
python3 scripts/find_large_files.py ~ --min-size 500 --show 10
# 清理所有构建产物
python3 scripts/find_garbage.py ~/projects \
--categories build_artifacts cache_files \
--export dev_cleanup.json
python3 scripts/clean_interactive.py dev_cleanup.json
# 完整扫描
python3 scripts/find_garbage.py ~ --export monthly_scan.json
python3 scripts/find_large_files.py ~ --export large_files.json
# 分别处理
python3 scripts/clean_interactive.py monthly_scan.json
python3 scripts/clean_interactive.py large_files.json --type large
# 使用 sudo(谨慎)
sudo python3 scripts/find_large_files.py /
# 限制扫描深度(只扫描指定目录)
python3 scripts/find_large_files.py ~/Downloads --max-results 50
# 确保目录存在
mkdir -p /tmp
python3 scripts/find_garbage.py ~ --export /tmp/scan.json
testing
AI驱动的智能浏览器自动化工具。使用LLM理解页面并自动执行任务,比传统Playwright更智能、更省token。适用于复杂交互、动态页面、需要智能决策的浏览器操作。Chrome浏览器优先。
tools
网页登录态管理。使用 fast-browser-use (fbu) 管理各平台登录状态,定期检查可用性,新平台授权时自动保存 profile。
development
Monitor and report on API provider quotas, balances, and usage. Query official providers (Moonshot, DeepSeek, xAI, Google AI Studio) and relay/proxy providers (Xingjiabiapi, Aixn, WoW) via their billing APIs. Also checks subscription services (Brave Search, OpenRouter). Generates quota reports. Triggers on "查额度", "API余额", "quota check", "billing report", "api balance", "供应商额度", "中转站余额", "费用报告", "check balance", "how much credit".
development
# A股基金监控 Skill A股基金净值监控,支持实时估值和盘后净值,自动判断交易日/节假日。 ## 用法 ### 快速监控(命令行) ```bash # 默认配置,输出到控制台 bash ~/clawd/skills/a-fund-monitor/scripts/monitor.sh # 推送到群(使用--push参数) bash ~/clawd/skills/a-fund-monitor/scripts/monitor.sh --push # 监控指定基金 bash ~/clawd/skills/a-fund-monitor/scripts/monitor.sh --codes "000979 002943" ``` ### Agent调用 ``` 执行A股基金监控任务。 1. 读取配置文件: ~/clawd/skills/a-fund-monitor/config.json 2. 获取实时净值数据 3. 非交易日自动切换为简短报告 配置文件格式: { "funds": [ {"code": "000979", "name": "景顺长城沪港深精选股票