$npx -y skills add kar2phi/video-lens --skill video-lens-galleryOpen or rebuild the video-lens gallery index — your personal library of saved video summaries. Use this whenever the user wants to browse, open, or search saved video reports: "show my gallery", "open video library", "browse saved videos", "build gallery", "what videos have I sav
| 1 | # video-lens-gallery |
| 2 | |
| 3 | Manage and browse your saved video-lens reports. |
| 4 | |
| 5 | ## Step 1 — Locate skill scripts |
| 6 | |
| 7 | Discover both `video-lens/scripts` (`$_sd`) and `video-lens-gallery/scripts` (`$_gd`) using the standard 8-agent discovery loop: |
| 8 | |
| 9 | ```bash |
| 10 | _sd=$(for d in ~/.agents ~/.claude ~/.copilot ~/.gemini ~/.cursor ~/.windsurf ~/.opencode ~/.codex; do |
| 11 | [ -d "$d/skills/video-lens/scripts" ] && echo "$d/skills/video-lens/scripts" && break |
| 12 | done) |
| 13 | _gd=$(for d in ~/.agents ~/.claude ~/.copilot ~/.gemini ~/.cursor ~/.windsurf ~/.opencode ~/.codex; do |
| 14 | [ -d "$d/skills/video-lens-gallery/scripts" ] && echo "$d/skills/video-lens-gallery/scripts" && break |
| 15 | done) |
| 16 | [ -z "$_sd" ] && echo "video-lens skill not found — install it first: npx skills add kar2phi/video-lens" && exit 1 |
| 17 | [ -z "$_gd" ] && echo "video-lens-gallery skill not found — install it first: npx skills add kar2phi/video-lens" && exit 1 |
| 18 | ``` |
| 19 | |
| 20 | ## Step 2 — Backfill metadata (only if requested) |
| 21 | |
| 22 | If the user's request mentions "backfill", run: |
| 23 | |
| 24 | ```bash |
| 25 | python3 "$_gd/backfill_meta.py" --dir ~/Downloads/video-lens |
| 26 | ``` |
| 27 | |
| 28 | ## Step 3 — Rebuild index |
| 29 | |
| 30 | Check that the reports directory exists before running: |
| 31 | |
| 32 | ```bash |
| 33 | [ -d ~/Downloads/video-lens ] || { echo "No reports directory found — save some videos first with the video-lens skill."; exit 1; } |
| 34 | python3 "$_gd/build_index.py" --dir ~/Downloads/video-lens |
| 35 | ``` |
| 36 | |
| 37 | Tell the user the number of reports indexed, from the script's output. |
| 38 | |
| 39 | ## Step 4 — Serve gallery |
| 40 | |
| 41 | ```bash |
| 42 | bash "$_sd/serve_report.sh" ~/Downloads/video-lens/index.html ~/Downloads/video-lens |
| 43 | ``` |
| 44 | |
| 45 | If `serve_report.sh` prints an `ERROR:` line (e.g. `ERROR:SERVE_PORT_BUSY` when port 8765 is held by another program), report the message and stop. Otherwise — confirmed by its `HTML_REPORT:` line — tell the user the gallery is now available at `http://localhost:8765/index.html`. |