skills/file-cleaner/SKILL.md
系统文件清理工具。扫描和识别大文件、垃圾文件(临时文件、缓存、日志、备份等),提供交互式清理界面让用户选择删除。当用户需要清理磁盘空间、整理系统文件、查找大文件、删除垃圾文件或释放存储空间时使用此技能。
npx skillsauth add aaaaqwq/claude-code-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
通用自媒体文章自动发布工具。支持百家号、搜狐号、知乎、微信公众号、小红书、抖音号六个平台的自动化发布流程。使用Playwright自动化实现平台导航和发布,支持通过storageState管理Cookie实现账号切换。
development
# SKILL.md - Model Configuration Status (mcstatus) ## 触发条件 - `/mcstatus` 命令 - 用户询问模型配备、模型配置、model status、模型列表等 ## 功能 实时生成 Agent + Cron 的模型配置报告,展示当前所有 agent 的主模型/fallback链和所有 cron 任务的模型分配。 ## 执行步骤 ### Step 1: 收集 Agent 模型配置 读取各 agent 的 models.json 获取主模型和 fallback 链: ```bash for agent in main ops code quant data research content market finance pm law product sales batch; do config=$(cat ~/.openclaw/agents/$agent/agent/models.json 2>/dev/null) if [ -n "$config" ]; then echo "=== $agent
tools
MCP 服务器智能管理助手。自动检测 MCP 可用性、智能开关、功能问答,提供人性化的 MCP 管理体验。
tools
从GitHub搜索并自动安装配置MCP(Model Context Protocol)服务器工具到Claude配置文件。当用户需要安装MCP工具时触发此技能。工作流程:搜索GitHub上的MCP项目 -> 提取npx配置 -> 添加到~/.claude.json -> 处理API密钥(如有)。