Smart File Manager

文件整理与归档 skill。管理用户输入文件和我生成的输出文件的存储、命名、分类。 适用于:用户发送图片/视频/PDF等文件给你处理,或你生成文件给用户。 触发:任何文件存档操作前。

MIT-0 · Free to use, modify, and redistribute. No attribution required.
1 · 453 · 1 current installs · 1 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description (file organising and archiving) matches the provided scripts (init, verify, move, fix-nested) which operate on /workspace/user_input_files and /workspace/my_outputs. No unrelated services, binaries, or credentials are requested.
Instruction Scope
SKILL.md instructs using the included scripts and to run verification on certain triggers — that aligns with purpose. Minor concerns: (1) move.sh accepts an arbitrary SOURCE path and will copy any file the agent passes (no code-level restriction to user-uploaded files), which could be abused if the agent is instructed to move sensitive system files; (2) SKILL.md references an external tool 'images_understand' for renaming, but that tool is not included nor declared, so the workflow either fails or requires an external binary not provided.
Install Mechanism
No install spec; this is instruction + local scripts only. No downloads, package installs, or writing of new binaries — lowest-risk install profile.
Credentials
The skill requests no environment variables, credentials, or config paths. The scripts operate only on /workspace; there are no secret-expecting fields. This is proportionate to the stated functionality.
Persistence & Privilege
always is false and the skill does not request persistent system changes or modify other skills. It runs local scripts and exits; no elevated privileges are requested.
Assessment
This skill appears to do what it says (local file organisation). Before installing or invoking it: 1) Review how your agent decides SOURCE paths — move.sh will copy whatever path it's given, so ensure the agent only accepts user-uploaded files (avoid passing system paths). 2) The SKILL.md mentions an external tool ('images_understand') that isn't included; expect that step to fail or require you to provide that tool if you need content-based renaming. 3) Test the scripts in a sandboxed workspace to confirm they behave as expected (they use rm -rf on nested folders and will modify /workspace). If you need stricter controls, add checks to move.sh to restrict SOURCE to a safe input directory.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.2.0
Download zip
latestvk97fkh5m9kr8x8srwh56e472ms83kd55

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

File Manager Skill

目录结构规范

/workspace/
├── user_input_files/    # 用户发给我的输入文件
│   ├── images/
│   ├── videos/
│   ├── pdfs/
│   ├── docxs/
│   ├── excels/
│   └── others/
│
└── my_outputs/         # 我生成给用户的输出文件
    ├── images/
    ├── videos/
    ├── pdfs/
    ├── docxs/
    ├── excels/
    └── others/

文件命名规范

输入文件

input-{描述}-{YYYYMMDD}.{扩展名}
示例:
- input-katheryne-cos-20260325.jpg
- input-fushimi-inari-torii-20241004.jpg
- input-zhumi-cat-20241001.jpg

输出文件

output-{描述}-{YYYYMMDD}.{扩展名}
示例:
- output-katheryne-funko-20260325.png
- output-katheryne-real-heart-20260325.mp4

文件类型分类

类型目录扩展名
图片images/.jpg, .jpeg, .png, .gif, .webp
视频videos/.mp4, .mov, .avi
PDFpdfs/.pdf
Worddocxs/.docx, .doc
Excelexcels/.xlsx, .xls, .csv
其他others/其他所有格式

Scripts

脚本用途
scripts/init.sh初始化目录结构
scripts/verify.sh验证文件结构是否正确
scripts/move.sh移动文件到正确位置
scripts/fix-nested.sh修复嵌套目录问题

使用方法

初始化目录

bash scripts/init.sh

验证结构

bash scripts/verify.sh

移动文件

# 复制文件到正确位置
# 用法: bash scripts/move.sh <源文件> <类型> <描述> <日期>
bash scripts/move.sh /path/to/file.pdf pdf invoice 20250325

修复问题

# 修复嵌套目录等常见问题
bash scripts/fix-nested.sh

常见错误与解决方案

❌ 错误1:文件散落在根目录

问题:生成的文件留在 /workspace/ 根目录,没有按类型分类

解决

  1. 使用 scripts/init.sh 创建目录结构
  2. 使用 scripts/move.sh 移动文件到对应分类目录
  3. 运行 scripts/verify.sh 确认

❌ 错误2:嵌套的 output 目录

问题/workspace/my_outputs/output/images/ 而不是 /workspace/my_outputs/images/

解决

bash scripts/fix-nested.sh

❌ 错误3:历史文件未重命名

问题3888.jpg, 3969.jpg 这种编号文件名无法回溯

解决

  1. images_understand 工具分析图片内容
  2. 根据内容重命名:input-{内容描述}-{日期}.jpg
  3. 使用 scripts/move.sh 移动到正确目录
  4. 更新 FILE_MANAGEMENT.md 记录

操作流程(必须遵循)

1. 接收用户输入时

用户发送文件 → 确认文件类型 → 使用 scripts/move.sh 移动 → scripts/verify.sh 验证

2. 生成输出文件时

生成文件 → 使用 scripts/move.sh 移动到 my_outputs → scripts/verify.sh 验证 → 交付

3. 验证失败时

验证失败 → 使用 fix-nested.sh 修复 → 再次验证 → 通过后才能交付

验证触发时机

必须在以下时机运行验证脚本:

  • 任何文件存档操作完成后
  • 用户询问文件整理情况时
  • 交付文件给用户之前

版本: 1.1.0 - 包含可执行脚本

Files

5 total
Select a file
Select a file to preview.

Comments

Loading comments…