finalplace-auto-organize SKILL
finalplace-auto-organize
Section titled “finalplace-auto-organize”让 AI 智能体自动整理、归档、清理、批处理 Windows 文件
适合什么场景
Section titled “适合什么场景”当用户说以下需求时,SKILL 会自动触发:
- “把下载夹的临时文件清掉”
- “桌面乱七八糟,帮我按文件类型分一下”
- “上周的日志按日期归档到 D:/Archive”
- “把所有截图按月份整理”
- “把大于 100MB 的老文件移到备份盘”
- “解压 D:/Downloads 的 zip 到各自文件夹”
- “找合同类文件单独归类”
核心能力:
- 多维筛选:按扩展名、文件名、大小、创建&修改时间、内容、路径
- AND/OR 条件组合:复杂规则一条搞定
- 6 种动作:移动、复制、压缩、解压、改名、删除
- 路径变量:
{Year}/{Month}/{Day}/{FileName}自动建层级目录 - 结构化结果:返回 JSON 信封,统计扫描/匹配/成功/失败/跳过
典型场景示例
Section titled “典型场景示例”| 你说什么 | SKILL 怎么执行 |
|---|---|
| ”把下载夹的 .tmp 文件删掉” | 建规则:ext:tmp, action:delete → 预览 → 确认 → 删除(进回收站) |
| “上周的截图按月归档” | 建规则:ext:png,jpg, mtime:after:7d, action:move → Pictures/{Year}/{Month} |
| ”把合同文件单独归类” | 建规则:name:合同, content:合同, action:move → D:/Contracts |
| ”下载夹的 zip 解压到各自文件夹” | 建规则:ext:zip, action:unzip → Downloads/{FileName}/ |
| ”把大于 500MB 的老文件移到备份盘” | 建规则:size:>500MB, mtime:before:90d, action:move → E:/Archive |
顶层命令(共 10 个)
Section titled “顶层命令(共 10 个)”| 命令 | 用途 |
|---|---|
launch | 启动 FinalPlace GUI |
status | 应用状态(app_version/is_pro/app_running/logged_in) |
auto-rules | 管理文件整理规则(10 个子命令) |
logs | 查执行日志 + 回滚 |
watchdog | 管理保护规则(黑名单/白名单) |
condition-templates | 管理可复用条件模板 |
action-templates | 管理可复用动作模板 |
file-types | 管理自定义文件类型分组 |
common-dirs | 管理常用目标目录 |
feedback | 提交问题/建议 |
auto-rules 子命令(核心)
Section titled “auto-rules 子命令(核心)”| 命令 | 用途 | 关键 flag |
|---|---|---|
auto-rules list | 列出规则 | --enabled(仅启用) |
auto-rules show | 查单条规则 | --uuid <uid> |
auto-rules create | 建规则 | --name --source --conditions-file --action --enable |
auto-rules preview | 试跑(不修改) | --uuid <uid> --path <file> |
auto-rules execute | 执行规则 | --uuid <uid> --path/--all-files --confirm |
auto-rules toggle | 启用/禁用 | --uuid <uid> --enable/--disable |
auto-rules delete | 删除规则 | --uuid <uid> --confirm |
auto-rules update | 改已有规则 | --uuid <uid> + 与 create 同款字段 |
auto-rules reorder | 调规则优先级 | --uuids <uuid1,uuid2,...> |
auto-rules stats | 查执行统计 | --uuid <uid> |
字段 × 合法 op
Section titled “字段 × 合法 op”| 字段 | 合法 op | 值格式 | 备注 |
|---|---|---|---|
ext | contains / equals | 扩展名不带点 | "jpg" |
name | contains / equals / startsWith / endsWith / matches | 文件名主体(去扩展名) | endsWith:".pdf" 永不命中 |
size | greaterThan / lessThan / equals | 10MB / 1KB / 500B | |
ctime | before / after | 1d / 7d | 不是 greaterThan/lessThan |
mtime | before / after | 1d / 7d | 同 ctime |
content | contains | 文本 | |
path | contains / equals | 路径 | 用于排除(pathExclude) |
条件输入三种模式
Section titled “条件输入三种模式”模式 A:文件传参(推荐)
# 把条件写入文件echo '[{"type":"ext","op":"contains","value":"tmp"}]' > /tmp/cond.json
# 透传给 CLIfinalplace.exe auto-rules create \ --name "清理临时文件" \ --source "C:/Downloads" \ --conditions-file /tmp/cond.json \ --action "delete" \ --enable模式 B:直接传 JSON 字符串
finalplace.exe auto-rules create \ --name "整理图片" \ --source "C:/Downloads" \ --conditions-json '[{"type":"ext","op":"contains","value":"jpg"}]' \ --action "move:C:/Pictures/{Year}/{Month}" \ --enable模式 C:简写(最简单)
finalplace.exe auto-rules create \ --name "整理大文件" \ --source "C:/Downloads" \ --condition "ext:jpg,png" \ --condition "size:>10MB" \ --action "move:E:/Archive" \ --enable目标目录支持占位符自动分桶:
{Year}/{Month}/{Day}— 按文件时间{FileName}/{Ext}— 保留原名/扩展名{Date:yyyy-MM-dd}— 自定义格式
例:
# 按年/月分目录--action "move:D:/Photos/{Year}/{Month}"
# 按年/月/日分目录--action "move:D:/Logs/{Year}/{Month}/{Day}"
# 加前缀--action "move:D:/Archive/IMG_{FileName}.{Ext}"- 只读免确认:
status/list/show/preview/stats/logs list - 改配置需确认:
create/update/toggle/reorder/delete - 改文件需确认:
execute/logs rollback --confirm是机器级 fail-safe:execute/delete/logs rollback必须显式带--confirm,否则 CLI 拒绝执行- delete 走回收站:可手动还原,但仍需人工确认
- 全局保护黑名单:自动拦截
*.tmp等敏感文件
常见错误速查
Section titled “常见错误速查”| 现象 | 原因 | 处理 |
|---|---|---|
Err_RuleDisabled | 规则未启用就执行 | 用 toggle --enable 启用,或建规则时直接 --enable |
Err_RuleNotFound | uuid/name 不存在 | 先 list 查真实 uuid |
Err_PermissionDenied:黑名单拦截 | 类型被全局保护忽略(如 *.tmp) | 在设置移出忽略名单 |
| 扫描数为 0 / 偏小 | 命中被黑名单静默排除 | 先 create --dry-run / preview 看 would_match |
INVALID_PARAMETER | 缺必填 flag | execute 须带 --uuid + 目标 + --confirm |
ok:true 但 success:false | 单文件失败(权限/文件占用) | 这是 per-file 失败通道,源文件保留 |
| 时间条件不生效 | 用了 greaterThan/lessThan | ctime/mtime 用 before / after |
| 扩展名筛不中 | 值带了点 | ext 值不带点:"jpg" 不是 ".jpg" |
SKILL 文件包内含 3 个 markdown:
SKILL.md— 主文档(触发条件、SOP、安全规则、FAQ)references/cli-reference.md— 权威命令速查references/examples.md— 自然语言→CLI 命令映射示例
下载后解压查看完整内容。
- 不知道怎么开始?查看快速上手
- 想知道手敲命令怎么用?查看 CLI 集成指南
- 想看更多典型场景?查看新闻动态