File Manage Skill — Development skill for Claude Code
Multi-factor date review + safe archive: classify photos/videos by EXIF, container mvhd, filename timestamps and filesystem times, then move into YYYYMM/MMDD with copy-verify-delete.
How to install File Manage Skill
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Bani61/file-manage-skill and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What File Manage Skill does
Multi-factor date review + safe archive: classify photos/videos by EXIF, container mvhd, filename timestamps and filesystem times, then move into YYYYMM/MMDD with copy-verify-delete. Ships as a DSH/Claude-style agent skill.
Alternatives in Development
- Fix E2e — Run all e2e tests, fix failures, and ensure each passes 3 times consecutively 76 ★
- Claude Permissions — Curated permissions config for Claude Code — stop clicking Allow 47 times per session 58 ★
- Agent Cat Releases — Agent Cat downloads — a free macOS menu bar and Windows tray app that shows Claude Code, Codex and Gemini CLI 57 ★
README
file-manage-skill
给 AI Agent 用的「按日期归档」技能:指一个文件夹,它先把每个文件到底属于哪一天查清楚,再干净利落地剪进 `202611\1107` 这种日目录里——**复制、校验、才删源**,一个文件都不会丢。
同时也是一个能直接当命令行工具用的脚本,纯标准库,`Plan → Apply` 两段式,先看报告再动手。
待整理/
├── camera/IMG20261107082206.jpg
├── QQ/Image_1795244625442_632.jpg
├── 微信/无标题.png
└── 家里/2026-06-13_11.55.14.562
↓
202611/1107/IMG20261107082206.jpg
202611/1121/Image_1795244625442_632.jpg
隔离文件/无标题.png ← 没有可信日期,单列清单
隔离文件/2026-06-13_11.55.14.562
为什么不是 `mv` 一把梭
文件名里的日期经常是假的、缺的、或者干脆没有;文件属性里的「创建时间」在跨设备拷贝后通常变成拷贝那一刻。只用一个来源,必然错一堆。这个技能的做法是**四路交叉审查**:
| 因素 | 读什么 | 强度 | 谁有这个信息 |
|---|---|---|---|
exif |
JPEG/TIFF/PNG 的 DateTimeOriginal / DateTimeDigitized / DateTime |
★★★ 拍摄时刻 | 相机、手机原图 |
media |
MP4/MOV/M4V/3GP/HEIC 的 mvhd creation_time |
★★★ 录制时刻 | 视频、实况图 |
filename |
20261107、2026-10-02、IMG20261107_082206、Image_1795244625442(毫秒时间戳) |
★★ 导出时写入 | 微信/QQ/相册导出 |
fs |
修改时间优先,创建时间兜底 | ★ 拷贝会重置 | 什么都没有的文件 |
- 优先级:
exif → media → filename → fs,可改(--priority filename,fs)。 - 合理性过滤:早于 2000 年、晚于今天 +2 天的值直接丢弃,1999 / 1970 / 2100 不会被当成真日期。
- 冲突留痕:强因素之间的分歧进
disagree,与文件系统时间的偏差单独进fs_diff(迁移拷贝导致的偏差不算错)。 - 弱日期标记:只靠创建时间推断出来的条目
weak: true,摘要里单独计数,提示人工抽检。 - 查不出来就隔离:四路都给不出合理日期 →
隔离文件/,并给出清单,绝不硬塞进某一天。
安全保证
plan只读:只stat+ 读文件头,不写不删。apply每个文件都走copy2 → 比大小 → 比 SHA-256 → 全一致才删源。- 任何异常只记录进
errors,源文件原封不动;有失败时退出码非 0。 - 同名不覆盖:目标已存在自动追加
(2)、(3)。 - 不加
--yes就是演练,只打印计划路径。
快速开始
# 1) 审查(只读),产出 plan.json
python scripts/file_organize.py plan --src "D:\待整理" --out plan.json
# 输出示例
# 计划文件: plan.json
# 总文件: 514 归档: 316 隔离: 198 跳过: 0
# 日期来源: exif=190, filename=101, fs=25
# [注意] 因素分歧 3 个(plan 里 disagree 字段可查)
# 202610\1002: 128
# 202611\1107: 14
# ...
# 隔离 198 个(无可用日期)
# 2) 执行(复制→校验→删源)
python scripts/file_organize.py apply --plan plan.json --yes \
--log log.json --report 归档执行清单.md
要求 Python 3.9+,**无第三方依赖**。装了 Pillow 会自动用它读 EXIF,没装就用内置的最小 TIFF/EXIF 解析器,结果一致。
Related Skills
Triage Impact
Triage the Plumbline backlog and recommend the next move by impact times (safe times fast) — the biggest authe
Prune Tests
Prune tests that guard no behavior — classify, mutation-check, rewrite or delete.
02 Evidence
Collect and classify evidence before deciding whether a product request should move forward.
Manage Move
Move or rename a file (GET source → PUT destination → DELETE source — Local REST API has no native move). Repo
Session Manager
See every Claude Code session on your computer, open one, move it (or a whole project) to another folder, and
Export Project Plans With Timestamp
Export project plans with timestamps to current directory
Related Agents
YouTube Updater
YouTube Video Updater Agent — bulk-optimises your product/brand videos for CTR, search rank, and LLM discovera
Media Indexer
Processes the client's source material (photos and videos from sites, production, a phone) and maintains the \
Bd Intake Extract
Extracts text, numbers and labels from source material and indexes the files. Returns EXIF, resolution and sha