File Organizer - Mac 智能文件整理助手
帮助用户整理下载文件夹中散落的办公文档,支持手动整理(智能文件夹)和自动整理两种模式,并与 disk-cleaner 配合保护重要文件。
When to Use
Use this skill when users:
- 想整理电脑上的文件
- 下载文件夹太乱想整理
- 清理磁盘前想先把重要文件整理好
- 截图太多想归类
- 想找出占空间的大文件
Features
- 📥 默认整理下载文件夹 - 避免误动其他目录
- 🖐️ 手动模式 - 创建 macOS 智能文件夹,用户自己整理
- 🤖 自动模式 - 自动扫描并分类文件
- 📸 截图整理 - 按月份归类截图
- 💾 大文件发现 - 只显示明确用途的文件(PDF、PPT、视频等)
- 🔒 白名单机制 - 排除代码目录,保护项目文件
File Categories
专注办公文档,避免误移动代码文件:
| 分类 |
扩展名 |
| 📊 演示文稿 |
.ppt, .pptx, .key |
| 📝 文档 |
.doc, .docx, .pages, .rtf |
| 📈 表格 |
.xls, .xlsx, .numbers, .csv |
| 📄 PDF |
.pdf |
| 🖼️ 图片 |
.jpg, .png, .gif, .webp, .heic |
| 🎬 视频 |
.mp4, .mov, .avi, .mkv |
| 🎵 音频 |
.mp3, .wav, .flac, .m4a |
| 📦 压缩包 |
.zip, .rar, .7z, .dmg |
| 📚 电子书 |
.epub, .mobi, .azw3 |
Excluded Directories
类似 Mole 的白名单机制,自动排除:
- 代码目录:
.git, node_modules, venv, __pycache__
- 系统目录:
Library, .Trash
- IDE 配置:
.idea, .vscode
- 构建产物:
build, dist, DerivedData
Usage
手动模式(创建智能文件夹)
# 默认整理下载文件夹
python scripts/file_organizer.py --manual
# 整理文档文件夹
python scripts/file_organizer.py --manual --scope documents
# 整理整个用户目录
python scripts/file_organizer.py --manual --scope home
自动模式
# 自动整理下载文件夹
python scripts/file_organizer.py --auto
# 预览模式(不实际移动)
python scripts/file_organizer.py --auto --dry-run
# 只整理最近 30 天的文件
python scripts/file_organizer.py --auto --days 30
截图整理
# 查看截图
python scripts/file_organizer.py --screenshots
# 自动整理截图(按月份)
python scripts/file_organizer.py --screenshots --auto
大文件发现
# 查找大于 100MB 的文件
python scripts/file_organizer.py --large-files
# 查找大于 500MB 的文件
python scripts/file_organizer.py --large-files --min-size 500
查看状态
python scripts/file_organizer.py --status
Output Structure
手动模式
~/Desktop/待整理/
├── 📊 演示文稿.savedSearch
├── 📝 文档.savedSearch
├── 📈 表格.savedSearch
├── 📄 PDF.savedSearch
├── 🖼️ 图片.savedSearch
├── 🎬 视频.savedSearch
├── 🎵 音频.savedSearch
├── 📦 压缩包.savedSearch
├── 📚 电子书.savedSearch
└── 💾 大文件 (>100MB).savedSearch
自动模式
~/Desktop/已整理文件-20240125/
├── 演示文稿/
├── 文档/
├── 表格/
├── PDF/
├── 图片/
├── 视频/
├── 音频/
├── 压缩包/
└── 电子书/
Integration with disk-cleaner
自动模式整理后的文件夹路径会自动写入 ~/.config/mole/whitelist.txt,确保这些文件不会被 disk-cleaner 清理。
Dependencies
- macOS (使用 Spotlight 和智能文件夹功能)
- Python 3.8+
Credits
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: file-organizer3description: Mac 智能文件整理助手,专注整理下载文件夹中的办公文档,避免误移动代码文件 Use when this capability is needed.4---56# File Organizer - Mac 智能文件整理助手78帮助用户整理下载文件夹中散落的办公文档,支持手动整理(智能文件夹)和自动整理两种模式,并与 disk-cleaner 配合保护重要文件。910## When to Use1112Use this skill when users:13- 想整理电脑上的文件14- 下载文件夹太乱想整理15- 清理磁盘前想先把重要文件整理好16- 截图太多想归类17- 想找出占空间的大文件1819## Features2021- **📥 默认整理下载文件夹** - 避免误动其他目录22- **🖐️ 手动模式** - 创建 macOS 智能文件夹,用户自己整理23- **🤖 自动模式** - 自动扫描并分类文件24- **📸 截图整理** - 按月份归类截图25- **💾 大文件发现** - 只显示明确用途的文件(PDF、PPT、视频等)26- **🔒 白名单机制** - 排除代码目录,保护项目文件2728## File Categories2930专注办公文档,避免误移动代码文件:3132| 分类 | 扩展名 |33|------|--------|34| 📊 演示文稿 | .ppt, .pptx, .key |35| 📝 文档 | .doc, .docx, .pages, .rtf |36| 📈 表格 | .xls, .xlsx, .numbers, .csv |37| 📄 PDF | .pdf |38| 🖼️ 图片 | .jpg, .png, .gif, .webp, .heic |39| 🎬 视频 | .mp4, .mov, .avi, .mkv |40| 🎵 音频 | .mp3, .wav, .flac, .m4a |41| 📦 压缩包 | .zip, .rar, .7z, .dmg |42| 📚 电子书 | .epub, .mobi, .azw3 |4344## Excluded Directories4546类似 Mole 的白名单机制,自动排除:4748- 代码目录: `.git`, `node_modules`, `venv`, `__pycache__`49- 系统目录: `Library`, `.Trash`50- IDE 配置: `.idea`, `.vscode`51- 构建产物: `build`, `dist`, `DerivedData`5253## Usage5455### 手动模式(创建智能文件夹)5657```bash58# 默认整理下载文件夹59python scripts/file_organizer.py --manual6061# 整理文档文件夹62python scripts/file_organizer.py --manual --scope documents6364# 整理整个用户目录65python scripts/file_organizer.py --manual --scope home66```6768### 自动模式6970```bash71# 自动整理下载文件夹72python scripts/file_organizer.py --auto7374# 预览模式(不实际移动)75python scripts/file_organizer.py --auto --dry-run7677# 只整理最近 30 天的文件78python scripts/file_organizer.py --auto --days 3079```8081### 截图整理8283```bash84# 查看截图85python scripts/file_organizer.py --screenshots8687# 自动整理截图(按月份)88python scripts/file_organizer.py --screenshots --auto89```9091### 大文件发现9293```bash94# 查找大于 100MB 的文件95python scripts/file_organizer.py --large-files9697# 查找大于 500MB 的文件98python scripts/file_organizer.py --large-files --min-size 50099```100101### 查看状态102103```bash104python scripts/file_organizer.py --status105```106107## Output Structure108109### 手动模式110111```112~/Desktop/待整理/113├── 📊 演示文稿.savedSearch114├── 📝 文档.savedSearch115├── 📈 表格.savedSearch116├── 📄 PDF.savedSearch117├── 🖼️ 图片.savedSearch118├── 🎬 视频.savedSearch119├── 🎵 音频.savedSearch120├── 📦 压缩包.savedSearch121├── 📚 电子书.savedSearch122└── 💾 大文件 (>100MB).savedSearch123```124125### 自动模式126127```128~/Desktop/已整理文件-20240125/129├── 演示文稿/130├── 文档/131├── 表格/132├── PDF/133├── 图片/134├── 视频/135├── 音频/136├── 压缩包/137└── 电子书/138```139140## Integration with disk-cleaner141142自动模式整理后的文件夹路径会自动写入 `~/.config/mole/whitelist.txt`,确保这些文件不会被 disk-cleaner 清理。143144## Dependencies145146- macOS (使用 Spotlight 和智能文件夹功能)147- Python 3.8+148149## Credits150151- 与 [disk-cleaner](../disk-cleaner/) 配合使用152- 灵感来自 macOS 智能文件夹功能153154---155> Converted and distributed by [TomeVault](https://tomevault.io/claim/crazynomad) — claim your Tome and manage your conversions.156<!-- tomevault:4.0:skill_md:2026-04-11 -->