搜索本地微信文件,并继续完成总结、比较和整理等实际任务
编程
wechat-file-organizer
试用微信文件自动归类(无头版)——扫描微信接收文件目录,按类型/月份归类、去重、生成报告。零依赖、默认只读(dry-run)、绝不永久删除源文件。扫描逻辑与 GUI 应用 wechat-file-organizer-gui(main.py)同步。
它能做什么
微信文件自动归类(无头版)——扫描微信接收文件目录,按类型/月份归类、去重、生成报告。零依赖、默认只读(dry-run)、绝不永久删除源文件。扫描逻辑与 GUI 应用 wechat-file-organizer-gui(main.py)同步。
技能文档
微信文件自动归类 (wechat-file-organizer)
何时使用
当用户表达以下意图时加载本 skill:
- 「整理微信接收的文件」「微信文件太乱了」「微信文件归类」
- 「微信里重复文件好多」「清理微信下载的文件」
- 「帮我看看微信都收了些什么文件 / 占了多少空间」
本 skill 调用随附的 scripts/organize.py 完成,无需安装任何第三方依赖。
核心特性
- 零依赖:仅用 Python 标准库,无
pip install。 - 安全优先:默认
dry-run(只读),绝不改动任何源文件;只有显式加--apply才复制。 - 可移植:所有路径运行时推导,无写死绝对路径;支持
WECHAT_FILES_DIR环境变量覆盖。 - 实用能力:按类型/月份归类、内容去重(sha256)、最大文件排行、老旧文件统计、JSON 输出。
如何运行
脚本位置:scripts/organize.py(本 skill 目录内)。
# 1) 先看报告(默认只读,安全)
python scripts/organize.py
# 2) 按「类型 + 月份」归类并复制(不动源文件,复制到新目录)
python scripts/organize.py --apply --scheme type-month
# 3) 去重后归类(相同内容只留一份)
python scripts/organize.py --apply --dedupe
# 4) 机器可读输出(定时任务/脚本消费)
python scripts/organize.py --json
# 指定目录(不自动探测时)
python scripts/organize.py --source "/path/to/WeChat Files" --apply
参数速查
| 参数 | 说明 |
|---|---|
--source DIR | 微信 WeChat Files 或 FileStorage 目录;默认自动探测 ~/Documents/WeChat Files |
--dest DIR | 归类输出目录;默认在 source 同级建 WeChatFiles_Organized |
--scheme | type(默认)/ month / type-month |
--apply | 真正复制归类(不加则只出报告) |
--dedupe | 去重,相同内容只保留一份(配合 --apply) |
--include-media | 连 Image/Video 的 .dat 也处理(默认跳过) |
--scan-all | 扫描 FileStorage 全部子目录(图片/视频/语音等) |
--top N | 列出最大的前 N 个文件(默认 10,0 关闭) |
--old-days N | 超过 N 天的文件计为老旧(默认 365) |
--json | 输出 JSON |
路径发现逻辑
- 若设了
WECHAT_FILES_DIR且存在,直接用。 - 否则探测
~/Documents/WeChat Files(os.path.expanduser)。 - 在其下找含
FileStorage的账号目录(如wxid_xxx/FileStorage),扫描其中的File/子目录。 - 多账号会全部处理。
微信把接收的文件按
File/YYYY-MM/文件名平铺存放,所有发送者混在一起,这正是本 skill 要解决的痛点。图片/视频在Image/、Video/里是加密的.dat,默认跳过(可用--include-media/--scan-all纳入)。
故障处置
| 现象 | 原因 / 处理 |
|---|---|
[FAIL] 找不到微信文件目录 | 微信不在默认位置,用 --source 指定,或设 WECHAT_FILES_DIR |
| 报告里没有图片/视频 | 默认跳过 .dat;加 --scan-all 或 --include-media |
| 想真正移动(而非复制)以腾空间 | 本 skill 只做复制以确保安全;如需移动,先 --apply 归类,确认无误后手动删除源目录 |
| 源文件被误改? | 不会发生——--apply 也是复制,源目录始终只读 |
安全与隐私
- 完全本地运行,不上网、不读任何凭据、不访问微信账号。
- 只读扫描 + 复制输出,任何模式下都不会删除或覆盖源文件。
- 适合在任何环境下分发使用。
复建依据
若 scripts/organize.py 丢失,本 SKILL.md 已完整描述接口与参数;但最稳妥的方式是从源仓库重新安装(见 README 的 install.sh / install.ps1)。
相关技能
Sort and organize files in a directory by type or by modification date, with dry-run preview, duplicate-name handling, and an auto-generated organization report. Use when the user wants to clean up, sort, categorize, or organize files in a folder, or asks for a file classification/overview report.
Organize messy folders by moving files into subfolders grouped by extension, date, or category. Use for downloads cleanups and batch file sorting.
Zero-risk, permission-free WeChat personal contacts extraction and structured CRM pipeline. Uses macOS native screen recording (Cmd+Shift+5), high-FPS FFmpeg frame extraction, Apple Silicon concurrent Vision OCR, and multi-dimensional rule-based NLP extraction (Name, Title, Org, Venue, City, Time) to generate Excel/CSV, JSON, and interactive HTML dashboards.
AI File Organizer for Firefly AI Folder. Local AI file analysis, auto-categorization, smart renaming, auto-tagging, deduplication, semantic search, progress monitoring, and virtual directory plans. / 萤核智能文件夹AI整理助手。支持本地AI文件分析、智能分类与命名、自动打标、查重去重、全文搜索、进度监控与独创多维虚拟目录整理方案。
Drive the installed FinalPlace Windows desktop app's auto-rules engine to automatically organize files — auto-sort, move, copy, compress, unzip, or rename fi...