微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🖼️

AI 智能索引 · 安全无损管理

Photos · v1.0.0
效率 安全 S+ 级 作者 ivangdavila 公开目录收录
下载 1.9k 安装 2 收藏 8.1k 浏览 25

简介

AI驱动的本地照片库管理,支持智能索引、安全搜索与无损编辑,零误删风险。

原始描述

Organize, index, and search local photo libraries with AI-powered metadata and safe file handling.

安装

下载 zip 解压后,把里面的文件放进你的 Agent 的 skills 目录即可使用。

给 Agent 的直链(让它自己下载安装):

Claude Code 放 ~/.claude/skills/;Codex、TypingMind 等按各自文档的 skills 目录放置。技能申请什么权限由作者决定,装前请确认。

中文使用说明 来自收录源

核心功能与用法

Photos 是一款专为本地照片库设计的 AI 增强型管理工具,核心能力围绕「安全优先 + 智能索引 + 无损操作」展开。用户可通过自然语言搜索照片内容(如「2023年海边生日聚会」),系统自动调用缓存的视觉分析描述,无需重复调用 AI 模型。

典型工作流:

  1. 初始化索引:在照片库根目录创建 .photo-index/,为每张照片生成 {hash}.json 侧车文件,记录 EXIF 信息、AI 描述、GPS 反向地理编码结果及人脸标签
  2. 增量维护:跳过已索引文件,仅处理新增/修改内容
  3. 智能搜索:优先匹配侧车中的文本描述,未命中时可按需触发视觉重分析
  4. 安全整理:按日期重命名并提议 YYYY/MM/ 目录结构,所有编辑输出至 edited/ 子文件夹

显著优点

  • 零误删设计:删除操作仅移至 .photo-trash/ 并保留原路径信息,批量操作前生成可审查的 photos-pending.json 清单
  • 非破坏性编辑:原始文件永不覆盖,EXIF 修改、格式转换均作用于副本
  • Token 效率:视觉分析采用「按需触发 + 永久缓存」策略,避免全库 upfront 分析的成本浪费;自动跳过截图/梗图(通过宽高比 + 缺失 EXIF 检测)
  • 跨平台兼容:支持 Linux/macOS/Windows,NAS 场景优化(识别 @eaDir、.DS_Store,支持慢速挂载目录的本地缓存索引)

潜在局限与风险

  • 依赖外部工具:需预装 exiftool,HEIC 转换依赖平台特定命令(macOS sips / Linux heif-convert)
  • 人脸标记局限:「相似面孔」标签基于用户一次性标注扩散,无内置人脸识别模型,准确性依赖用户初始判断
  • 视觉分析成本:首次搜索未命中缓存时仍需调用 AI,高频模糊查询可能产生意外 token 消耗
  • NAS 性能瓶颈:远程挂载目录的批量哈希计算可能缓慢,需依赖周期性同步的本地缓存

适合人群

  • 拥有 10GB+ 本地照片库、重视数据安全不愿使用云端服务的隐私敏感用户
  • 需要快速检索「那张照片」但不愿手动打标签的效率型用户
  • NAS 用户(Synology 等)希望保留本地控制权的同时获得 AI 搜索能力

常规风险提示

  • 哈希冲突风险:perceptual hash(pHash)用于近似去重,极端情况下可能误判相似图像为重复
  • 时区处理:EXIF 日期为本地时间,需用户主动配置时区至 .photo-index/config.json,否则跨设备导入时间排序可能错乱
  • 缓存失效:侧车文件与照片分离存储,手动移动照片文件后若未同步更新索引,将导致「幽灵条目」
  • 隐私泄露:GPS 数据反向地理编码后存储于侧车,分享前需使用 exiftool -gps:all= 剥离敏感位置信息

技能正文


name: Photos description: Organize, index, and search local photo libraries with AI-powered metadata and safe file handling. metadata: {"clawdbot":{"emoji":"🖼️","requires":{"bins":["exiftool"]},"os":["linux","darwin","win32"]}}

Safety First

  • Never delete photos directly — move to .photo-trash/ folder with original path preserved in filename
  • Never overwrite originals — edits go to edited/ subfolder, originals stay untouched
  • Before bulk operations, create manifest: photos-pending.json with planned actions for user review
  • When user says "delete duplicates", move to trash and report count — let them empty trash manually

Indexing Strategy

  • Create .photo-index/ in library root with one JSON sidecar per photo
  • Sidecar filename: {original-hash}.json — survives renames and moves
  • Index fields: hash, path, date_taken, camera, gps, description, tags, indexed_at
  • Run indexing incrementally — skip files with matching hash already indexed
  • Store description from vision analysis in sidecar, not in EXIF (non-destructive)

Vision Analysis (Token-Efficient)

  • Don't analyze every photo upfront — index on-demand when user searches or asks
  • Cache vision results permanently in sidecar JSON — never re-analyze same photo
  • For bulk analysis, process in batches of 20 with progress updates
  • Use concise prompts: "Describe this photo in 2-3 sentences. List people, objects, location, activity."
  • Skip screenshots and memes (detect by aspect ratio + lack of EXIF) unless explicitly requested

Duplicate Detection

  • Generate perceptual hash (pHash) alongside content hash — catches near-duplicates and resized copies
  • Group duplicates by pHash similarity, keep highest resolution as "original"
  • Report duplicates with thumbnails/paths, never auto-delete
  • Consider EXIF date — oldest is likely the original, newer copies are backups

Search Patterns

  • By content: Search sidecar descriptions with simple text match first, vision re-analysis if no hits
  • By date: Parse EXIF DateTimeOriginal, fall back to file mtime
  • By location: Reverse geocode GPS once, store city/country in sidecar for text search
  • By person: If user identifies someone once ("that's Maria"), tag all similar faces in index

EXIF Handling

  • Read: exiftool -json photo.jpg — returns all metadata as JSON
  • Write date: exiftool -DateTimeOriginal="2024:03:15 14:30:00" photo.jpg
  • Strip GPS before sharing: exiftool -gps:all= photo.jpg (operates on copy, not original)
  • Batch read: exiftool -json -r /photos/ — recursive, outputs array

File Organization

  • Propose structure, don't impose: YYYY/MM/ or YYYY/MM-DD/ based on user preference
  • Rename pattern: YYYYMMDD_HHMMSS_originalname.ext — preserves original name, adds sortable prefix
  • Handle timezone: EXIF dates are local time — ask user's timezone once, store in .photo-index/config.json
  • HEIC to JPEG: sips -s format jpeg input.heic --out output.jpg (macOS) or heif-convert (Linux)

NAS/Remote Libraries

  • For Synology/NAS: work with mounted paths, don't assume local speeds
  • Test connection before bulk operations: ls /Volumes/photos | head -1
  • For slow connections, build local index cache that syncs periodically
  • Respect @eaDir (Synology thumbnails) and .DS_Store — skip in indexing

正文来自原始仓库, 版权归作者所有,许可:MIT。 权利人认为有不妥,可申请下架。

标签

media-managementexifai-visionlocal-firstprivacynasduplicate-detectionmetadata

同类 Skill