snaptidy
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "snaptidy" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-9f42114d4e02ba24b72660017ab97713e8e5c01d14abe5660541495a469cd080. Verify the upstream source and version against https://skillhub.cn/skills/user_9a6f5769/snaptidy before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
SnapTidy is an AI-driven photo and video organization tool designed for macOS. It intelligently scans libraries, detects duplicate files (supports SHA-256 exact matching and pHash perceptual hashing), and generates safe move plans without ever deleting original files. Useful for tidying messy libraries, finding duplicate photos, and cleaning redundant content on phones or external drives to help free storage efficiently.
Introduction source: third_party · user_9a6f5769 · 2.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Translation pending; see source documentation.
- Inputs and outputs
- python3 scripts/scan_photos.py --input <photo_directory> --output photo_index.db
- Testing
- Not tested
Browse files
Frontmatter
name: snaptidy
version: 2.0.0
description: |
AI-powered photo & video organizer for macOS. Scan libraries, detect duplicates (SHA-256 exact + pHash perceptual), and generate safe move plans — without ever deleting your originals.
Use this skill when you need to: scan and tidy large photo/video folders, find duplicate photos, deduplicate archives, organize a messy photo library, or generate a dedup report for human review.
Trigger phrases: "organize my photos", "find duplicate photos", "dedup my library", "tidy photo folder", "scan for duplicates", "整理照片", "去重", "整理相册", "重複写真削除", "写真整理", "사진 정리", "중복 사진"
author: chicogong
license: MIT
homepage: https://github.com/chicogong/snaptidy
compatibility: "Claude Code, Cursor, Windsurf, OpenClaw, WorkBuddy, Cline, Aider"
metadata:
openclaw:
always: false
emoji: "🗂️"
os:
- darwin
requires:
bins:
- python3
install:
- kind: pip
packages: [Pillow, piexif, imagehash]SnapTidy — Photo & Video Organizer
When to Use
Invoke this skill when the user asks to:
- Organize or tidy up photo/video folders on macOS
- Find and remove duplicate photos
- Scan a photo library for duplicates
- Generate a dedup report or move plan
- Prepare a clean photo archive
- Free up disk space by finding and moving duplicates
- Consolidate photos from Android/iPhone/external drives
- 整理照片、去重、清理相册
- 重複写真を削除・整理する
- 사진 정리, 중복 사진 찾기
Safety Rules (MANDATORY)
- NEVER delete originals — all scripts are read-only by default.
apply_move_plan.pyonly moves files, never deletes. - NEVER permanently delete — use macOS Trash mode (
--mode trash) or move to review folder. Users can recover from Trash via Finder. - Stay out of Photos Libraries — never enter
.photoslibraryor.photolibrarydirectories. Always scan exported folders. - Operate only inside user-provided paths — never scan system directories or disk roots.
- Respect external backups — skip directories named
Original_Backupor similar. - Ask before moving — ALWAYS present the move plan and get user confirmation before running
apply_move_plan.py. - Ask which folder to prioritize — when duplicates span multiple folders, ask the user which folder's photos they prefer to keep.
- Ask about trash vs move — offer the user a choice: move to review folder or move to macOS Trash (recoverable).
Process
Step 1: Install Dependencies
pip install -r requirements.txt
Dependencies: Pillow (image metadata), piexif (EXIF extraction), imagehash (perceptual hashing). No pandas, no numpy, no heavy frameworks. SQLite is built into Python.
Step 2: Scan the Photo Library
# Output to SQLite (recommended — fast for 100k+ photos, stores locally, no context bloat)
python3 scripts/scan_photos.py --input <photo_directory> --output photo_index.db
# Or output to CSV (fallback for small libraries)
python3 scripts/scan_photos.py --input <photo_directory> --output photo_index.csv
This extracts: file size, SHA-256, EXIF date, GPS location, camera make/model, dimensions, perceptual hash, auto-category (photo/screenshot/wechat/burst), and folder tag.
Step 3: Find Duplicates
Exact duplicates (SHA-256, works with both .db and .csv):
python3 scripts/find_exact_duplicates.py --index photo_index.db --output duplicates_exact.csv
Perceptually similar (pHash, optional):
# Exact pHash match (default)
python3 scripts/find_similar_photos.py --index photo_index.db --output duplicates_similar.csv
# Fuzzy match with Hamming distance threshold (catches near-duplicates)
python3 scripts/find_similar_photos.py --index photo_index.db --output duplicates_similar.csv --threshold 5
Step 4: Generate Move Plan (Smart Priority)
# Default: quality strategy — keep highest resolution, largest file, best EXIF
python3 scripts/generate_move_plan.py \
--duplicates duplicates_exact.csv \
--index photo_index.db \
--plan move_plan.csv \
--target-root <photo_directory>
# Keep files from a preferred folder (e.g., camera originals over WeChat downloads)
python3 scripts/generate_move_plan.py \
--duplicates duplicates_exact.csv \
--index photo_index.db \
--plan move_plan.csv \
--target-root <photo_directory> \
--prefer-folder "DCIM" --prefer-folder "相机"
# Strategy options: quality (default), oldest, newest, folder
python3 scripts/generate_move_plan.py \
--duplicates duplicates_exact.csv \
--index photo_index.db \
--plan move_plan.csv \
--target-root <photo_directory> \
--strategy oldest
Step 5: Review and Apply
- Open the generated
move_plan.csv— verify every proposed move - Present the plan summary to the user
- Ask the user: move to review folder OR move to macOS Trash?
- Only after explicit confirmation, apply:
# Move to review folder (safe, files stay on disk)
python3 scripts/apply_move_plan.py --plan move_plan.csv --mode move
# Move to macOS Trash (recoverable via Finder > Put Back)
python3 scripts/apply_move_plan.py --plan move_plan.csv --mode trash
Every action is logged to move_log.csv with full audit trail.
Smart Priority Rules
When deciding which duplicate to KEEP, SnapTidy scores files by:
| Factor | Weight | Rationale |
|---|---|---|
| Resolution (pixels) | High | Higher res = better quality |
| File size | Medium | Larger = less compressed |
| EXIF completeness | High | Has metadata = likely original |
| Format (RAW > HEIC > JPG) | Medium | Better format = better quality |
| Category (photo > wechat > screenshot) | Medium | Real photos over screenshots |
| Folder preference | Configurable | User-specified priority folders |
Strategies: --strategy quality (default), oldest, newest, folder
Auto-Categorization
| Category | Detected by |
|---|---|
| photo | Default for camera photos |
| screenshot | "screenshot", "截图", "截屏", "スクリーンショット", "스크린샷", "скриншот" |
| "mmexport", "wxcamera", "microMsg", "微信" | |
| burst | "_HDR", "_burst", "连拍" |
| video | Video file extensions |
Storage & Performance
- SQLite (.db) — Recommended. Handles 100k+ photos efficiently. Query speed 400x faster than CSV for large libraries. Data stays local, no context bloat.
- CSV (.csv) — Fallback for small libraries. Compatible with Excel/Numbers.
Supported Formats
| Type | Extensions |
|---|---|
| Images | jpg, jpeg, png, bmp, gif, tif, tiff, heic, heif, webp |
| RAW | dng, cr2, nef, arw |
| Videos | mov, mp4, m4v, avi, mkv, 3gp, mpg, mpeg, hevc, wmv, flv |
Troubleshooting
- Permission denied: Enable Full Disk Access (System Settings → Privacy & Security → Full Disk Access)
- No EXIF data: Screenshots and downloaded photos lack EXIF. Scan still works.
- pHash false positives: Solid-color images produce identical pHash. Use SHA-256 as primary method.
- Large library slow scan: Use SQLite output (not CSV). Index is stored locally between runs.
- External drive: Scan directly from the external drive path. Use
--prefer-folderfor the drive's photo folder.
Current listing version
2.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决 macOS 用户照片/视频去重的真实高频痛点
- 提供从扫描到安全执行的完整闭环流程
- 强调安全性:只移动不删除,支持 Trash 恢复模式
Highlights
- 触发词覆盖中英文及多语言变体,边界清晰
- description 位置正确且内容完整
Highlights
- 五步流程清晰,含端到端命令示例
- frontmatter 完整,含安全规则和 When to Use 章节
Highlights
- 依赖明确(Pillow/piexif/imagehash),无重型框架
- 覆盖权限、EXIF缺失、pHash误报等关键异常场景
- 不可逆操作需用户确认,支持 move/trash 双模式
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 58
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.