File Organizer logo

File Organizer

Community
coracoo
file-organizer

Use when 用户想诊断 ZSpace NAS 文件库,找出重复文件 + 孤儿文件(只读,不动 NAS)。 触发词:重复文件、孤儿文件、文件整理诊断、哪些文件重复了、哪些文件没归类、找重复电影、找重复照片。 不适用:写操作(删除重复 / 移动孤儿)— 这些走 MCP tool(remove/move/save_file_label)+ LLM 二次确认,不在这 skill 范围。

Overview

Publishercoracoo
Repositoryzspace_skill
Skill namefile-organizer
Stars
39
Forks
13
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by coracoo on GitHub. Read the source before you install it.

Installation

Install the File Organizer AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/coracoo/zspace_skill/tree/master/skills/file-organizer
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/coracoo/zspace_skill.git /tmp/zspace_skill
mkdir -p .claude/skills
cp -r /tmp/zspace_skill/skills/file-organizer .claude/skills/file-organizer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable File Organizer in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads File Organizer on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so File Organizer is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

File Organizer — NAS 文件只读诊断

概述

通过组合 NAS MCP tool + file_organizer.py 脚本,只读诊断文件库的"重复"和"孤儿"问题。 所有写操作都不在 skill 里 — 报告生成后,用户手动决定怎么处理。

为什么只读

  • 删除/移动会丢失数据,需用户确认
  • 没法精确反查"哪些文件已打标签"(NAS 端点不暴露 label↔file 关联表)
  • 诊断先看问题,修复单独做

3 个诊断命令

命令用途走哪个端点
audit-duplicates扫全盘找重复文件(按 size+ext 弱指纹)/v2/file/list + /zspool/info
audit-orphans找无标签 + 非影视目录的孤儿文件/v2/file/list + /zvideo/classification/dirs
audit-all一键全跑(重复 + 孤儿)上面两个一起

工作流

场景 1:用户说"我 NAS 上有没有重复文件"

步骤:

  1. exec python skills/file-organizer/file_organizer.py audit-duplicates --output /tmp/dups.json
  2. 读 stdout 摘要 + JSON 详细清单
  3. 报告:总扫描 N 个文件,发现 X 组重复,共 Y 个冗余文件,占用 Z GB
  4. 列出前 20 组最大的重复(用户优先处理收益大的)
  5. ⚠️ 重要: 由于使用弱指纹(size+ext),误报率较高,需人工核对后再决定删除

场景 2:用户说"哪些文件没归类"

步骤:

  1. exec python skills/file-organizer/file_organizer.py audit-orphans --output /tmp/orphans.json
  2. 报告:总扫描 N 个文件,X 个孤儿(无标签 + 非影视)
  3. 建议处理:
    • 大文件孤儿 → 考虑删除或归档
    • 文档/图片孤儿 → 建议打标签(save_file_label)
    • 临时/缓存文件 → 候选清理

场景 3:用户说"出综合诊断报告"

步骤:

  1. exec python skills/file-organizer/file_organizer.py audit-all --output /tmp/full-report.json
  2. 读 stdout(给人看) + JSON(详细数据)
  3. 两个 section:重复文件诊断 + 孤儿文件诊断

关键约束(必读)

  1. 只读诊断,不动 NAS — 这个 skill 是"找出问题",不是"修复"
  2. 修复走 MCP tool — 删/移/打标 用现有 MCP remove / move / save_file_label,LLM 弹 UI 让用户批
  3. remove 不进回收站,不可逆 — 处理重复文件时优先 move 到 _to_review/,人工确认后再删
  4. 指纹策略(经 Task 7 验证):
    • NAS /v2/file/list 返回的 file_hash 对真实文件也返回空字符串
    • 无法精确去重 → 用 (size, ext) 弱指纹分组
    • 误报率高(同 size 同 ext 但内容不同),需人工核对
  5. 扫描范围 — 默认所有池的 /<pool>/my/data/ 下(注意是 /my/data/,不是 /my/)
  6. 性能约束 — 单线程顺序扫描,每页 200 条,每次请求后 sleep 0.1s(~10 req/s)

命令行选项

通用选项(所有命令都支持)

选项默认值说明
--pool <NAME>(所有池)限定扫描某个池
--output <PATH>(不写文件)将 JSON 详细结果写入文件
--sample <N>0(不限)限制扫描文件数(测试用)
--min-size <MB>1忽略小于 N MB 的文件

示例

bash
# 扫所有池找重复,只看 >= 10MB 的文件
python skills/file-organizer/file_organizer.py audit-duplicates --min-size 10

# 只扫 sata14 池,限制 1000 个文件(测试)
python skills/file-organizer/file_organizer.py audit-orphans --pool sata14 --sample 1000

# 综合诊断,写 JSON
python skills/file-organizer/file_organizer.py audit-all --output /tmp/audit.json

输出格式

stdout 文本摘要(给人看)

======================================================================
file_organizer — 重复文件诊断报告
======================================================================

指纹策略: size+ext(weak)
  NAS list_files 的 file_hash 对真实文件也返回空字符串(Step 7.1 验证),
  无法用于精确去重。本策略用 (size, ext) 弱指纹分组,组内 >1 即候选重复。
  误报率较高(同 size 同 ext 但内容不同),需人工核对。

扫描池: sata14
已扫描文件: 15234
因 < min_size 跳过: 8912
访问目录数: 342

重复组数: 187
浪费总空间: 45.23 GB (48564160032 bytes)

Top 20 候选重复组(按浪费空间降序):
  [1] size=1.23 GB count=3 wasted=2.46 GB
      fp=size:1318584546|ext:zip
      - /sata14/my/data/downloads/backup.zip
      - /sata14/my/data/backup.zip
      - /sata14/my/data/archives/backup.zip
  ...

JSON 详细结果(程序处理)

json
{
  "cmd": "audit-duplicates",
  "strategy": "size+ext(weak)",
  "strategy_note": "NAS list_files 的 file_hash 对真实文件也返回空字符串...",
  "pools_scanned": ["sata14"],
  "pools_skipped": [],
  "total_scanned": 15234,
  "total_skipped_small": 8912,
  "dirs_visited": 342,
  "duplicate_groups": 187,
  "total_wasted_bytes": 48564160032,
  "total_wasted_human": "45.23 GB",
  "duplicates": [
    {
      "fingerprint": "size:1318584546|ext:zip",
      "size": 1318584546,
      "count": 3,
      "wasted_bytes": 2637169092,
      "paths": ["/sata14/my/data/downloads/backup.zip", ...]
    }
  ],
  "errors": [],
  "truncated": false
}

已知 gap

  • ❌ 没法精确反查"哪些文件已打标签" — NAS 端点不暴露 label↔file 关联表,orphan 检测只能退化为"非影视目录 + 无标签 ID 集合"
  • ❌ 大文件 hash 计算 — NAS 没有暴露 chunk hash 端点,只能靠 list_files 返回的元数据(且 file_hash 为空)
  • ❌ 跨用户共享目录 — /<pool>/share/ 不在扫描范围(默认只扫 /<pool>/my/data/)
  • ❌ 误报率高 — 弱指纹策略导致同 size 同 ext 但内容不同的文件被误判为重复

故障排查

现象原因处理
扫描卡住NAS list_files 限流或网络慢加 --sample 1000 限制条数,或等待
audit-duplicates 误报多NAS 不返回 hash,用弱指纹报告里说明,人工核对;勿批量自动删除
audit-orphans 报错"找不到 label 端点"NAS 端点未破或网络问题查 JSON errors 字段详情
某个池显示"perm"跳过/my/ 无权限,应扫 /my/data/脚本已自动修正,但若仍报错检查池权限
N150 性能问题扫描太密集脚本已内置 sleep 0.1s(~10 req/s),若仍卡顿加 --sample

后续可以做(等用户要求再加)

  • 执行 agent:升级为弹 UI 二次确认后真删/真移(skill 外,走 MCP tool)
  • 照片按 EXIF 整理:用 EXIF 时间线分组,建议命名规范
  • 冷热分层:基于 recent_files 找长期未访问的,建议从 SSD 移到 HDD
  • 大文件审查:专门找 >10GB 的文件,分类列出
  • 精确去重:若 NAS 后续暴露 file_hash,可升级为精确去重

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the File Organizer AI skill do?

Use when 用户想诊断 ZSpace NAS 文件库,找出重复文件 + 孤儿文件(只读,不动 NAS)。 触发词:重复文件、孤儿文件、文件整理诊断、哪些文件重复了、哪些文件没归类、找重复电影、找重复照片。 不适用:写操作(删除重复 / 移动孤儿)— 这些走 MCP tool(remove/move/save_file_label)+ LLM 二次确认,不在这 skill 范围。

Why use File Organizer on TypingMind?

Because you install it once and use it with any model. File Organizer is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install File Organizer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/coracoo/zspace_skill/tree/master/skills/file-organizer. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use File Organizer?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with File Organizer?

As many as you like. As long as a model supports skills, you can use File Organizer with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the File Organizer AI skill free?

Yes. It is published on GitHub by coracoo under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇