mcpField
V
video-lens-gallery

video-lens-gallery

github.com/kar2phi生产力119448 次安装6 天前更新
代码仓库

关于 video-lens-gallery

video-lens-gallery 用于管理和浏览已保存的 video-lens 报告。它会重建报告索引并启动本地图库供查看。

主要功能

  1. 01重建报告索引
  2. 02可选回填元数据
  3. 03通过本地网页提供图库

适用场景

  1. 01整理已保存的视频分析报告
  2. 02在浏览器中查看报告图库

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/kar2phi/video-lens --skill video-lens-gallery

安装后在 Claude Code 中输入/video-lens-gallery确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

index.html
scripts/
backfill_meta.py
build_index.py

详细介绍

video-lens-gallery

管理和浏览已保存的视频镜头报告。

步骤 1 — 定位技能脚本

使用标准的 8-Agent 发现循环,查找 video-lens/scripts($_sd)和 video-lens-gallery/scripts($_gd):

_sd=$(for d in ~/.agents ~/.claude ~/.copilot ~/.gemini ~/.cursor ~/.windsurf ~/.opencode ~/.codex; do
  [ -d "$d/skills/video-lens/scripts" ] && echo "$d/skills/video-lens/scripts" && break
done)
_gd=$(for d in ~/.agents ~/.claude ~/.copilot ~/.gemini ~/.cursor ~/.windsurf ~/.opencode ~/.codex; do
  [ -d "$d/skills/video-lens-gallery/scripts" ] && echo "$d/skills/video-lens-gallery/scripts" && break
done)
[ -z "$_sd" ] && echo "video-lens skill not found — install it first: npx skills add kar2phi/video-lens" && exit 1
[ -z "$_gd" ] && echo "video-lens-gallery skill not found — install it first: npx skills add kar2phi/video-lens" && exit 1

步骤 2 — 回填元数据(仅在用户要求时)

如果用户的请求中提到“backfill”,请运行:

python3 "$_gd/backfill_meta.py" --dir ~/Downloads/video-lens

步骤 3 — 重建索引

运行前,检查报告目录是否存在:

[ -d ~/Downloads/video-lens ] || { echo "No reports directory found — save some videos first with the video-lens skill."; exit 1; }
python3 "$_gd/build_index.py" --dir ~/Downloads/video-lens

根据脚本的输出,告知用户已编入索引的报告数量。

步骤 4 — 启动图库

bash "$_sd/serve_report.sh" ~/Downloads/video-lens/index.html ~/Downloads/video-lens

如果 serve_report.sh 输出 ERROR: 行(例如,端口 8765 被其他程序占用时输出 ERROR:SERVE_PORT_BUSY),请报告该消息并停止。否则,根据其 HTML_REPORT: 行确认图库已可用,并告知用户访问地址为 http://localhost:8765/index.html。

评论

支持 Markdown