← Back to Skills Marketplace
Dandan File Organizer
by
realorange1994
· GitHub ↗
· v1.0.1
· MIT-0
296
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install dandan-file-organizer
Description
智能文件/桌面整理技能。当用户说"整理桌面"、"文件整理"、"整理文件夹"、"清理桌面"时触发。提供零删除、零篡改的安全文件归类,支持智能扫描、关键词匹配、按类型自动分类、多平台支持(macOS/Linux/Windows)。
README (SKILL.md)
File Organizer 📁
智能文件归类整理,跨平台支持。
触发条件
- 用户说"整理桌面"、"文件整理"、"整理文件夹"、"清理桌面"
- 用户说"桌面太乱了"、"文件太多了"
- 用户要求按类型分类文件
文件分类规则
按扩展名分类
| 分类 | 扩展名 |
|---|---|
| 图片 | png, jpg, jpeg, gif, bmp, tiff, webp, svg, ico, heic |
| 文档 | docx, pdf, txt, doc, ppt, pptx, odt, rtf, pages |
| 表格 | xlsx, csv, xls, numbers, ods, tsv |
| 视频 | mp4, avi, mov, mkv, flv, wmv, webm, m4v |
| 音频 | mp3, wav, flac, m4a, ogg, aac, wma, aiff |
| 代码 | py, js, tsx, java, c, cpp, h, go, rb, php, swift, kt, rs, sh, html, css, json, yaml |
| 压缩包 | zip, rar, 7z, tar, gz, bz2, xz |
| 电子书 | epub, mobi, azw3, djvu |
| 安装包 | exe, dmg, pkg, msi, apk, deb, rpm, appimage |
| 设计文件 | psd, ai, sketch, fig, xd, indd |
| 字体 | ttf, otf, woff, woff2 |
| 日志 | log |
整理策略
策略1:已有文件夹匹配
扫描目标目录 → 匹配文件名到已有文件夹 → 移动文件
关键词匹配:文件名包含文件夹名 → 移入
命名规律匹配:共享3字符以上前缀 → 移入
策略2:按类型分类(无匹配时)
不常用文件(60天未访问)→ 不常用文件/
其余按扩展名分类 → 图片/ | 文档/ | 表格/ | ...
策略3:按项目分类(phase2 AI 语义分析)
深度扫描未分类文件 → 提取关键词 → 生成项目文件夹 → 归类
跨平台命令
macOS
# 列出桌面文件
ls -la ~/Desktop/
# 移动文件到分类文件夹
mv ~/Desktop/report.pdf ~/Documents/报告/
# 创建分类文件夹
mkdir -p ~/Desktop/{图片,文档,表格,代码,压缩包}
# 查看文件大小
du -sh ~/Desktop/*
Linux
# 列出桌面文件
ls -la ~/桌面/ # 或 ~/Desktop/
# 移动文件
mv ~/桌面/report.pdf ~/文档/报告/
# 查看文件大小
du -sh ~/桌面/*
# 查找大文件
find ~/桌面 -type f -size +100M
Windows (PowerShell)
# 列出桌面文件
Get-ChildItem "$env:USERPROFILE\Desktop"
# 移动文件
Move-Item "$env:USERPROFILE\Desktop\report.pdf" "$env:USERPROFILE\Documents\报告\"
# 创建分类文件夹
New-Item -ItemType Directory -Path "$env:USERPROFILE\Desktop\图片"
New-Item -ItemType Directory -Path "$env:USERPROFILE\Desktop\文档"
New-Item -ItemType Directory -Path "$env:USERPROFILE\Desktop\表格"
零删除原则
- ❌ 不删除任何文件,只移动
- ❌ 不覆盖文件,自动重命名(filename_1.pdf)
- ❌ 不处理系统文件(.DS_Store、Thumbs.db 等)
- ⚠️ 快捷方式/别名不移动
- ⚠️ 被占用文件(lsof 检测)跳过
- ✅ 所有操作记录日志,可一键回撤
操作日志格式
原路径 目标路径 分类 方法 状态
/home/user/Desktop/report.pdf /home/user/Desktop/文档/report.pdf 文档 按类型分类 done
使用流程
1. 用户说"整理桌面"
→ 询问目标目录(默认 ~/Desktop)
2. 执行扫描(phase1)
→ 输出:文件列表、已有文件夹、建议分类方案
3. 用户确认
→ 执行整理(phase2)
→ 生成日志
4. 输出结果
→ 整理了多少文件
→ 创建了哪些文件夹
→ 日志文件位置(可回撤)
输出格式
## 📁 文件整理结果
**目录**: ~/Desktop
**扫描时间**: 2026-03-19 19:54
### 📊 统计
- 扫描文件:42 个
- 整理完成:38 个
- 跳过:4 个(系统文件/被占用/白名单)
- 创建文件夹:7 个
### 📂 已创建文件夹
- 图片/(12个文件)
- 文档/(8个文件)
- 表格/(3个文件)
- ...
### 🔄 操作日志
[保存到 .file_organizer_logs/ organize_20260319_1954.log]
### ↩️ 回撤指令
如需回撤,执行:
[根据日志生成回撤命令]
注意事项
- 桌面文件通常较小,大文件建议移至对应分类文件夹
- 60天不常用规则可根据需要调整
- macOS 的
.DS_Store、Windows 的Thumbs.db自动跳过 - 整理前建议先做 phase1 扫描,用户确认后再执行
Usage Guidance
This skill is coherent and appears to do only local file classification and moves. Before running: (1) confirm you trust the source (no homepage/source provided); (2) test on a small or disposable folder first to validate rules and rollback; (3) ensure you have appropriate filesystem permissions and a copy/backup if you are worried about breaking app file paths; (4) note that lsof (or equivalent) is used on macOS/Linux to detect open files — it may not be present on all systems; (5) the SKILL.md references a future 'phase2 AI semantic analysis' (not implemented) which could change behavior if added later — review any future updates for network/credential requests. If you want extra caution, ask for an explicit dry-run mode that outputs the exact mv/move commands before execution.
Capability Analysis
Type: OpenClaw Skill
Name: dandan-file-organizer
Version: 1.0.1
The skill provides instructions for an AI agent to perform automated file organization using high-risk shell commands (e.g., `mv`, `mkdir`, `lsof`, `find`) across macOS, Linux, and Windows. While the logic in SKILL.md is clearly aligned with its stated purpose and includes safety measures like a 'zero deletion' policy and mandatory user confirmation, the broad file system access and command execution capabilities are classified as suspicious according to the provided threshold for risky capabilities. No evidence of malicious intent, data exfiltration, or persistence was found.
Capability Assessment
Purpose & Capability
Name/description (desktop/file organizer) matches the instructions: scanning a target directory, matching filenames/folders, moving files, creating folders, logging and providing rollback. All required actions (filesystem reads/writes, listing, moving, checking file locks) are expected for this functionality.
Instruction Scope
SKILL.md stays within scope: it instructs scanning the target directory (default ~/Desktop), proposing classifications, asking for user confirmation, then moving files and writing a log. It does not instruct transmission of data to external endpoints, access to unrelated system credentials, or reading unrelated system configurations. The only cross-cutting operation is lsof for detecting open files, which is appropriate for skipping in-use files.
Install Mechanism
No install spec and no code files — instruction-only. Nothing will be downloaded or written by an installer, so install risk is minimal.
Credentials
The skill declares no environment variables, credentials, or config paths. The operations require local filesystem access only, which is proportionate to the stated task.
Persistence & Privilege
always is false and the skill is user-invocable; it does not request permanent agent presence, nor does it modify other skills or system-wide configuration. Actions are performed only after user confirmation per the workflow.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install dandan-file-organizer - After installation, invoke the skill by name or use
/dandan-file-organizer - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
dandan-file-organizer 1.0.1
- 增加“零删除、零篡改”原则,所有整理操作安全可回撤
- 支持智能扫描、关键词和命名规律匹配,实现更智能的文件分类
- 丰富文件类型分类规则,兼容图片、文档、表格、代码等多种常见格式
- 跨平台支持 macOS、Linux、Windows,并包含对应整理命令示例
- 操作全流程日志记录,支持一键回撤和状态透明
- 增加整理前确认机制和详细输出格式
Metadata
Frequently Asked Questions
What is Dandan File Organizer?
智能文件/桌面整理技能。当用户说"整理桌面"、"文件整理"、"整理文件夹"、"清理桌面"时触发。提供零删除、零篡改的安全文件归类,支持智能扫描、关键词匹配、按类型自动分类、多平台支持(macOS/Linux/Windows)。 It is an AI Agent Skill for Claude Code / OpenClaw, with 296 downloads so far.
How do I install Dandan File Organizer?
Run "/install dandan-file-organizer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Dandan File Organizer free?
Yes, Dandan File Organizer is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Dandan File Organizer support?
Dandan File Organizer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Dandan File Organizer?
It is built and maintained by realorange1994 (@realorange1994); the current version is v1.0.1.
More Skills