ruc-nlpir/clawtrojan/file-manager

Claude Code and agent skill by ruc-nlpir/clawtrojan

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

OpenClaw自动化文件管理助手,用于批量文件操作、智能分类、重复文件清理、文件重命名、目录同步等任务。当用户需要整理文件、批量重命名、清理重复文件、同步目录或自动化文件工作流时使用此技能。

Install

npx vskill@latest install ruc-nlpir/clawtrojan/file-manager

SKILL.md

The same SKILL.md was published earlier as ruc-nlpir/clawtrojan/file-manager.

File Manager - OpenClaw 自动化文件管理

核心功能

1. 智能文件分类 (organize)

按文件类型、日期、大小或自定义规则自动分类文件。

bash
# 按文件类型分类
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)

支持正则表达式、序列号、日期等模式的重命名。

bash
# 添加前缀/后缀
python scripts/batch_rename.py <pattern> --prefix "IMG_" --suffix "_2024"
# 使用正则替换
python scripts/batch_rename.py "*.jpg" --replace "IMG_(\d+)" "Photo_\1"
# 序列号重命名
python scripts/batch_rename.py "*.jpg" --sequence --padding 4
3. 重复文件清理 (deduplicate)

基于内容哈希检测并处理重复文件。

bash
# 扫描并列出重复文件
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)

双向或单向目录同步,支持排除模式和增量同步。

bash
# 单向同步 (源 → 目标)
python scripts/sync.py <source> <target> --mirror
# 双向同步 (尚未实现)
python scripts/sync.py <dir1> <dir2> --bidirectional
# 排除特定文件
python scripts/sync.py <source> <target> --exclude "*.tmp,*.log,.git"

使用模式

常见场景

场景1: 整理下载文件夹

python
# 自动分类下载的文件
python scripts/organize.py ~/Downloads --by-type --move

场景2: 清理重复照片

python
# 扫描重复照片
python scripts/deduplicate.py ~/Pictures --scan-only

场景3: 批量整理项目文件

python
# 按日期整理项目文件
python scripts/organize.py ./projects --by-date --date-format year/month

场景4: 自动备份工作目录

python
# 同步到备份目录,排除临时文件
python scripts/sync.py ~/Work ~/Backups/Work --exclude "node_modules,.git,*.tmp"

工作流

文件整理工作流
  1. 分析目录结构和文件分布
  2. 选择分类策略 (类型/日期/大小/自定义)
  3. 执行整理 (dry-run 预览 → 确认 → 执行)
  4. 验证结果
清理工作流
  1. 扫描重复/过期/大文件
  2. 生成报告并预览
  3. 用户确认或自动处理
  4. 移动到回收站/隔离区/直接删除
同步工作流
  1. 分析源和目标差异
  2. 预览待同步的文件列表
  3. 确认后执行同步
  4. 显示同步统计

安全原则

  • 预览优先: 所有修改操作默认执行 dry-run 预览,需加 --execute 才执行
  • 操作确认: 执行前需要用户输入 yes 确认
  • 符号链接安全: 遍历目录时跳过符号链接,避免无限递归
  • 冲突保护: 目标文件已存在时自动重命名或跳过,不会覆盖

⚙️ 依赖安装与环境初始化

环境要求
  • Python 3.8+
  • 无外部依赖,仅使用 Python 标准库

脚本参数说明

直接查看脚本帮助获取详细参数:

bash
python scripts/<script>.py --help

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
17
7-day trend score
14

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ruc-nlpir/clawtrojan/file-manager/badge)](https://verified-skill.com/skills/ruc-nlpir/clawtrojan/file-manager)

Something wrong with this skill or its page? Tell us.