首页龙虾技能列表 › Local Image Search — 本地图像快速搜索

Local Image Search — 本地图像快速搜索

v1.0.0

利用 macOS Spotlight 或 fd 进行快速本地图像搜索,支持按名称、日期、位置或元数据搜索。适用于用户快速在本地机器上找到图像,无需手动浏览。

0· 348·0 当前·0 累计
by @zhaomenghuan (匠心)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/1
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
该技能的文件和指令与其声明的目的(macOS 本地图像搜索)一致,未请求额外凭证或安装;脚本中没有数据外泄或执行无关动作的行为。
评估建议
该技能看似连贯,专注于本地图像搜索。使用前:(1)确认您在 macOS 上,并理解脚本指向的目录(脚本将枚举图像文件,如果运行 copy_results.sh,将复制文件)。(2)自己检查脚本(短简单的 shell 脚本),并在测试文件夹中运行以确认行为。(3)注意,GPS/元数据查询将显示照片的位置数据——将结果视为敏感信息。(4)注意小不一致:SKILL.md 中提到的某些脚本缺失,mdfind 时间表达式可能需要根据您的 macOS 版本进行调整。如果需要更强的保证,请先在受限环境中或使用测试数据运行脚本。...
详细分析 ▾
用途与能力
Name/description describe local image search and the included scripts and SKILL.md only perform filesystem queries (mdfind/find/fd), metadata inspection, and file copying which are consistent with that purpose.
指令范围
Runtime instructions and scripts are narrowly scoped to searching and copying image files. There are a few minor inconsistencies: SKILL.md mentions additional scripts (search_by_size.sh, search_similar.sh, thumbnail.sh) that are not present in the package, and the mdfind examples use $time.*() expressions which may not be valid mdfind syntax on all macOS versions — this is a functionality issue, not a security red flag. The scripts only operate on user-specified directories and do not read unrelated system files or environment variables.
安装机制
No install spec is provided (instruction-only with small helper scripts). Nothing is downloaded or written by an installer, minimizing persistence and supply-chain risk.
凭证需求
The skill requires no environment variables, credentials, or config paths. Optional external tools (fd, exiftool) are reasonable for performance/metadata enhancements and are documented as optional.
持久化与权限
always is false and the skill does not request elevated or persistent privileges or modify other skills or system-wide configs. Scripts only perform file reads and optional file copies to destinations you provide.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/3/1

初始发布:使用 Spotlight 或 find 命令进行快速本地图像搜索

● 无害

安装命令 点击复制

官方npx clawhub@latest install local-image-search
镜像加速npx clawhub@latest install local-image-search --registry https://cn.clawhub-mirror.com

技能文档

快速使用 macOS Spotlight 或 fd 搜索本地图像。## 快速开始### 按名称搜索

# 使用 fd(最快)
fd -e jpg -e png -e jpeg -e heic -e webp -e gif -e tiff "模式" /路径/到/搜索
# 使用 Spotlight
mdfind -onlyin /路径/到/搜索 "kMDItemDisplayName == '模式'"

按日期搜索
# 今天

mdfind -onlyin ~/Pictures "kMDItemContentTypeTree == 'public.image' && kMDItemFSContentChangeDate > $time.today()" #最近 7 天 mdfind -onlyin ~/Pictures "kMDItemContentTypeTree == 'public.image' && kMDItemFSContentChangeDate > $time.now(-604800)" # 本月 mdfind -onlyin ~/Pictures "kMDItemContentTypeTree == 'public.image' && kMDItemFSContentChangeDate > $time.this_month()"

按位置(GPS)搜索
# 有 GPS 坐标

mdfind "kMDItemContentTypeTree == 'public.image' && kMDItemGPSStatus == 'GPS'" # 特定区域(近似) mdfind "kMDItemContentTypeTree == 'public.image' && kMDItemGPSLatitude > 39 && kMDItemGPSLatitude < 41"

列出所有图像
# 主目录所有图像

mdfind "kMDItemContentTypeTree == 'public.image'" # 特定目录 mdfind -onlyin ~/Pictures "kMDItemContentTypeTree == 'public.image'" # 特定类型 mdfind -onlyin ~/Pictures "kMDItemContentType == 'public.png'"

可用脚本### 基本搜索

  • scripts/search_by_name.sh - 按文件名模式搜索图像
  • scripts/search_by_date.sh - 按创建/修改日期搜索
  • scripts/list_all.sh - 列出目录中的所有图像### 高级搜索
  • scripts/search_by_location.sh - 按 GPS 坐标搜索
  • scripts/search_by_size.sh - 按图像尺寸搜索
  • scripts/search_similar.sh - 找到视觉上相似的图像(需要感知哈希)### 实用工具
  • scripts/thumbnail.sh - 为结果生成缩略图
  • scripts/copy_results.sh - 将搜索结果复制到目标目录## 支持的图像类型
    扩展名类型
    jpg/jpegJPEG 图像
    pngPNG 图像
    heiciPhone 照片
    webpWebP 图像
    gifGIF 图像
    tiffTIFF 图像
    rawRAW 相机文件
    dng数字负片
    ## 元数据搜索键
    描述
    kMDItemDisplayName文件名
    kMDItemFSContentChangeDate修改日期
    kMDItemContentCreationDate创建日期
    kMDItemPixelWidth图像宽度
    kMDItemPixelHeight图像高度
    kMDItemGPSLatitudeGPS 纬度
    kMDItemGPSLongitudeGPS 经度
    kMDItemMake相机品牌
    kMDItemModel相机型号
    ## 示例
    # 找到所有截屏
./scripts/search_by_name.sh "Screen Shot" ~/Desktop # 找到今天的照片 ./scripts/search_by_date.sh today ~/Pictures # 找到 iPhone 照片 ./scripts/search_by_name.sh "IMG_" ~/Pictures # 将结果复制到文件夹 ./scripts/search_by_date.sh today ~/Pictures | ./scripts/copy_results.sh ~/Desktop/today_photos

要求

  • macOS(使用 Spotlight/mdfind)
  • fd(可选,用于更快的文件名搜索):brew install fd
  • exiftool(可选,用于高级元数据):brew install exiftool
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务