Muguozi1 Openclaw File Manager 1 0 0
v1.0.0OpenClaw自动化文件管理助手,用于批量文件操作、智能分类、重复文件清理、文件重命名、目录同步等任务。当用户需要整理文件、批量重命名、清理重复文件、同步目录或自动化文件工作流时使用此技能。
MIT-0
Security Scan
OpenClaw
Suspicious
medium confidencePurpose & Capability
The scripts (organize, batch_rename, deduplicate, sync) align with the skill description (file organization, renaming, dedupe, sync). However metadata is inconsistent: registry shows Source: unknown and no homepage, while _meta.json and clawhub.config.json claim a GitHub repo/homepage. That provenance mismatch is unexplained and reduces trust.
Instruction Scope
SKILL.md instructs the agent to run scripts in scripts/*.py and describes a 'watch' feature that calls scripts/watch.py, but there is no scripts/watch.py in the package. Several examples and reference snippets also mix invocation paths (sometimes using scripts/ prefix, sometimes not) and contain TODO placeholders. While the scripts that exist operate only on local filesystem paths provided by the user, the missing watch script and vague TODOs mean the runtime instructions are incomplete or out-of-sync with the code.
Install Mechanism
No install spec is present (instruction-only), and dependencies are simple Python packages listed in requirements.txt (tqdm, colorama). No remote downloads or obscure installers are used. The presence of code files means code will be part of the skill bundle, but there's no automated installer that fetches external binaries.
Credentials
The skill requests no environment variables, no credentials, and does not reference external endpoints. The operations are local-file oriented and the scripts require only standard Python and small libraries—this is proportionate to the stated purpose.
Persistence & Privilege
The skill is not marked always:true and does not request elevated privileges or modify other skills. It performs destructive filesystem operations (delete/move) but these are gated by prompts and a dry-run/--execute pattern in the scripts. No persistent agent-level privileges are requested.
What to consider before installing
This skill largely implements the file-management functions it claims, but there are inconsistencies you should resolve before trusting it with real data:
- Verify provenance: the registry lists no source/homepage while package metadata claims a GitHub repo—confirm the origin and inspect the upstream repository or author.
- Missing script: SKILL.md documents a watch feature (scripts/watch.py) but watch.py is not included; expect broken instructions or incomplete features.
- Placeholders/tests: examples and tests contain TODOs and placeholder text — tests are not real. Don't assume full test coverage.
- Safety when running: always run in dry-run/preview mode first (the scripts default to preview). Back up important data before using --execute or delete actions.
- Manual review: read scripts/deduplicate.py and scripts/sync.py to ensure their delete/move semantics match your expectations (they prompt for confirmation but review command-line options and defaults).
- Run in isolated environment: if you want to try it, run on a small sample directory or in a VM/container first.
If you want, I can: (1) show the exact lines referencing the missing watch script, (2) summarize each script's destructive actions, or (3) produce a short checklist for safe local testing.Like a lobster shell, security has layers — review code before you run it.
latest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
File Manager - OpenClaw 自动化文件管理
核心功能
1. 智能文件分类 (organize)
按文件类型、日期、大小或自定义规则自动分类文件。
# 按文件类型分类
python scripts/organize.py <source_dir> --by-type
# 按日期分类 (年/月/日)
python scripts/organize.py <source_dir> --by-date --date-format year/month
# 按文件大小分类
python scripts/organize.py <source_dir> --by-size --size-ranges "10MB,100MB,1GB"
2. 批量重命名 (batch_rename)
支持正则表达式、序列号、日期等模式的重命名。
# 添加前缀/后缀
python scripts/batch_rename.py <pattern> --prefix "IMG_" --suffix "_2024"
# 使用正则替换
python scripts/batch_rename.py "IMG_(\d+)" --replace "Photo_\1"
# 序列号重命名
python scripts/batch_rename.py "*.jpg" --sequence --start 1 --pad 4
3. 重复文件清理 (deduplicate)
基于内容哈希检测并处理重复文件。
# 扫描并列出重复文件
python scripts/deduplicate.py <directory> --scan-only
# 删除重复文件(保留最旧/最新)
python scripts/deduplicate.py <directory> --keep oldest --action delete
# 移动重复文件到隔离目录
python scripts/deduplicate.py <directory> --action move --to <quarantine_dir>
4. 目录同步 (sync)
双向或单向目录同步,支持排除模式和增量同步。
# 单向同步 (源 → 目标)
python scripts/sync.py <source> <target> --mirror
# 双向同步
python scripts/sync.py <dir1> <dir2> --bidirectional
# 排除特定文件
python scripts/sync.py <source> <target> --exclude "*.tmp,*.log,.git"
5. 文件监控 (watch)
监控目录变化并触发动作。
# 监控并记录变化
python scripts/watch.py <directory> --log changes.log
# 监控并自动执行命令
python scripts/watch.py <directory> --on-change "python scripts/organize.py {path}"
使用模式
常见场景
场景1: 整理下载文件夹
# 自动分类下载的文件
python scripts/organize.py ~/Downloads --by-type --move
场景2: 清理重复照片
# 找出并删除重复照片,保留高质量版本
python scripts/deduplicate.py ~/Pictures --compare-resolution --keep best
场景3: 批量整理项目文件
# 按日期整理并按类型分类
python scripts/organize.py ./projects --by-date --by-type --date-format year/month
场景4: 自动备份工作目录
# 同步到备份目录,排除临时文件
python scripts/sync.py ~/Work ~/Backups/Work --exclude "node_modules,.git,*.tmp"
工作流
文件整理工作流
- 分析目录结构和文件分布
- 选择分类策略 (类型/日期/大小/自定义)
- 执行整理 (dry-run 预览 → 确认 → 执行)
- 验证结果
清理工作流
- 扫描重复/过期/大文件
- 生成报告并预览
- 用户确认或自动处理
- 移动到回收站/隔离区/直接删除
同步工作流
- 分析源和目标差异
- 处理冲突 (保留新/保留旧/保留两者)
- 执行同步
- 生成同步报告
安全原则
- 预览优先: 所有修改操作默认执行 dry-run,确认后再执行
- 备份保护: 删除操作优先移动到隔离区而非永久删除
- 递归警告: 递归操作需要显式确认
- 日志记录: 所有操作记录到日志文件便于审计
⚙️ 依赖安装与环境初始化
依赖安装
本 skill 依赖以下 Python 包:
pip install tqdm colorama
或使用 requirements.txt(如果存在):
pip install -r requirements.txt
环境要求
- Python 3.8+
- tqdm >= 4.60.0 (进度条)
- colorama >= 0.4.4 (Windows 彩色输出)
脚本参数说明
直接查看脚本帮助获取详细参数:
python scripts/<script>.py --help
🚀 30 秒快速开始
# 基础用法
# TODO: 添加具体命令示例
📋 何时使用
当以下情况时使用此技能:
- 场景 1
- 场景 2
- 场景 3
🔧 配置
必需配置
# 环境变量或配置文件
可选配置
# 可选参数
💡 实际应用场景
场景 1: 基础用法
# 命令示例
场景 2: 进阶用法
# 命令示例
🧪 测试
# 运行测试
python3 scripts/test.py
⚠️ 故障排查
常见问题
问题: 描述问题
解决方案:
# 解决步骤
📚 设计原则
本技能遵循 Karpathy 的极简主义设计哲学:
- 单一职责 - 只做一件事,做好
- 清晰可读 - 代码即文档
- 快速上手 - 30 秒理解用法
- 最小依赖 - 只依赖必要的库
- 教育优先 - 详细的注释和示例
最后更新:2026-03-16 | 遵循 Karpathy 设计原则
🏷️ 质量标识
| 标识 | 说明 |
|---|---|
| 质量评分 | 90+/100 ⭐⭐⭐⭐⭐ |
| 优化状态 | ✅ 已优化 (2026-03-16) |
| 设计原则 | Karpathy 极简主义 |
| 测试覆盖 | ✅ 自动化测试 |
| 示例代码 | ✅ 完整示例 |
| 文档完整 | ✅ SKILL.md + README.md |
备注: 本技能已在 2026-03-16 批量优化中完成优化,遵循 Karpathy 设计原则。
Files
13 totalSelect a file
Select a file to preview.
Comments
Loading comments…
