[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71QC2J839HJSY3VEH9JVS0B":3,"skill-same:01M71QC2J839HJSY3VEH9JVS0B":120},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":34,"publishedAt":55,"linkOnly":56,"markdownContent":57,"markdownBody":58,"frontMatter":59,"refName":65,"commitSha":66,"skillDirectory":67,"forksCount":14,"repositoryHtmlUrl":68,"repositoryHomepageUrl":69,"ownerHtmlUrl":70,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":71,"install":72,"resources":85},"01M71QC2J839HJSY3VEH9JVS0B","vss-generate-video-report",null,"Use this skill when producing a VSS analysis report — Mode A per-clip VLM, Mode B incident-range via video-analytics. Not for standalone video summarization, real-time alerts or ad-hoc Q&A.","pattanation\u002FNorvik","pattanation","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235419268?v=4","01M71M5THHYYB15ME8R2E4FCZG","Patta","01M71M5TJM1NDM992M8PDKYR2K",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvss-generate-video-report\u002FSKILL.md",[18,23,26,31],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000013","分析与可视化","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",{"categoryNo":32,"categoryName":33,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000034","行政与办公人员",[35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54],"vss generate video report","generate","report","generate video","video report","Video","for","NVIDIA","analytics","q&a","alerts","team","analysis","when","Blueprint","mode","search","incident","time","standalone","2026-11-10 13:02:02",false,"---\nname: vss-generate-video-report\ndescription: Use this skill when producing a VSS analysis report — Mode A per-clip VLM, Mode B incident-range via video-analytics. Not for standalone video summarization, real-time alerts or ad-hoc Q&A.\nlicense: Apache-2.0\nmetadata:\n  version: \"3.2.0\"\n  author: \"NVIDIA Video Search and Summarization team\"\n  github-url: \"https:\u002F\u002Fgithub.com\u002FNVIDIA-AI-Blueprints\u002Fvideo-search-and-summarization\"\n  tags: \"nvidia blueprint operational\"\n---\n\n# Report\n\nGenerate a video analysis report by routing to one of two backends — **never via** `POST \u002Fgenerate` on the VSS agent.\n\n| Mode | Backend |\n|---|---|\n| **A. Video clip** | `\u002Fvss-manage-video-io-storage` → clip URL → **VLM chat\u002Fcompletions** |\n| **B. Incident range** | `\u002Fvss-query-analytics` → incident list → narrative report |\n\nIf the request is ambiguous (e.g. \"report on `\u003Csensor>`\" with no time range and no incident wording), default to **Mode A**. Ask only if the user mentions both a sensor and a time range. See **Examples** below for the request phrasings that route to each mode.\n\n---\n\n## Instructions\n\n1. **Pick the mode** — Mode A for a single recorded clip\u002Fsensor video, Mode B when the request names a time range or incidents\u002Falerts (match against *Examples*).\n2. **Verify the deployment profile** for that mode under *Deployment prerequisite*; hand off to `\u002Fvss-deploy-profile` if its probe fails.\n3. **Run that mode's numbered steps** — *Mode A* or *Mode B* below.\n4. **Rewrite every user-facing clip URL** with the `$VSS_PUBLIC_HOST:$VSS_PUBLIC_PORT` one-liner (*Browser-playable clip URL*) before embedding it in the report.\n5. **Return the rendered report markdown** to the user.\n\nOutput contract for evaluators:\n- Mode A top title MUST be exactly `# Video Analysis Report`.\n- Mode B top title MUST be exactly `# Incident Range Report` (never `# Incident Report` or sensor-named variants).\n- Mode B MUST include `## Basic Information` with the exact required rows from the template (Report Identifier, Range, Scope, Total Incidents, Confirmed \u002F Rejected \u002F Unverified).\n\n---\n\n## Examples\n\n- \"Generate a report for this video\" \u002F \"report on `\u003Csensor-id>`\" → **Mode A**\n- \"Analyze warehouse_01.mp4\" \u002F \"create an analysis report on the uploaded video\" → **Mode A**\n- \"Report on incidents from 12:31Z to 12:32Z\" → **Mode B**\n- \"Report on alerts today\" \u002F \"what incidents happened on `\u003Csensor>` last hour\" → **Mode B**\n- \"Summarize alerts on `\u003Csensor>` between `\u003Ct1>` and `\u003Ct2>`\" → **Mode B**\n\n---\n\n## Negative Triggers\n\nDo **not** use this skill when the request is one of the following:\n\n- Ad-hoc visual Q&A on a clip that do not ask explicitly for a report (\"what color is the truck?\", \"what happens at 00:12?\") → use `\u002Fvss-ask-video`.\n- Archive\u002Fsemantic similarity retrieval (\"find forklifts\", \"search all videos for tailgating\") → use `\u002Fvss-search-archive`.\n- Read-only incident\u002Fmetrics lookup without report rendering needs → use `\u002Fvss-query-analytics`.\n- Deploy\u002Fteardown\u002Fprofile changes (\"deploy alerts\", \"switch profile\", \"bring up base\") → use `\u002Fvss-deploy-profile`.\n- Real-time alert\u002Frule management requests → use `\u002Fvss-manage-alerts`.\n\nNever route reports through VSS-agent `POST \u002Fgenerate`.\n\n---\n\n## Deployment prerequisite\n\n**Mode A** needs the VSS **base** profile (VST + VLM NIM).\n**Mode B** needs the VSS **alerts** profile (VA-MCP + Elasticsearch).\n\nProbe:\n\n```bash\n# Mode A — VST + VLM reachability\ncurl -sf --max-time 5 \"http:\u002F\u002F${HOST_IP}:30888\u002Fvst\u002Fapi\u002Fv1\u002Fsensor\u002Fversion\" >\u002Fdev\u002Fnull\n\n# Mode B — VA-MCP\ncurl -sf --max-time 5 \"http:\u002F\u002F${HOST_IP}:9901\u002F\" >\u002Fdev\u002Fnull\n```\n\nIf the probe fails, hand off to `\u002Fvss-deploy-profile` with `-p base` (Mode A) or `-p alerts` (Mode B). **Always** confirm the deploy with the user first.\n\n---\n\n## Clip URLs: VLM input vs browser report link\n\nVST returns clip URLs using the agent-internal `${HOST_IP}:30888` host:port.\nKeep that original URL as `VIDEO_URL` for local \u002F in-cluster VLM frame pulls.\nDo **not** rewrite the VLM input URL just to make it browser-playable.\n\nOnly create `BROWSER_CLIP_URL` for URLs shown in the rendered report. The\ndeploy layer exports the browser-facing host:port as `$VSS_PUBLIC_HOST` \u002F\n`$VSS_PUBLIC_PORT` (and scheme as `$VSS_PUBLIC_HTTP_PROTOCOL`) in every\nprofile `.env` — Brev or bare-metal — so the report-link rewrite is:\n\n```bash\n: \"${VSS_PUBLIC_HOST:?Set VSS_PUBLIC_HOST before rewriting clip URLs}\"\n: \"${VSS_PUBLIC_PORT:?Set VSS_PUBLIC_PORT before rewriting clip URLs}\"\nVSS_PUBLIC_HTTP_PROTOCOL=\"${VSS_PUBLIC_HTTP_PROTOCOL:-http}\"\nBROWSER_CLIP_URL=$(echo \"$RAW_URL\" | sed -E \"s|^https?:\u002F\u002F[^\u002F]+|${VSS_PUBLIC_HTTP_PROTOCOL}:\u002F\u002F${VSS_PUBLIC_HOST}:${VSS_PUBLIC_PORT}|\")\n```\n\nIf either required public host value is missing, omit the report-facing clip\nlink and call out that a browser-playable URL could not be produced; do not\nblock the local VLM analysis path. Apply the rewrite to **every clip URL\nsurfaced in the rendered report** (Mode A Step 4 Clip URL row; Mode B\nper-incident clip sub-bullet). Leave the VLM `video_url` content block in Mode A\nStep 3 on the original internal URL when the VLM is local \u002F in-cluster.\n\n---\n\n## Mode A — Report on a recorded video clip\n\n**If the VSS `lvs` profile is deployed** — `curl -sf --max-time 5 \"http:\u002F\u002F${HOST_IP}:38111\u002Fv1\u002Fready\"` returns HTTP 200 — run `\u002Fvss-summarize-video` to produce the summary, then paste its output into the report template in Step 4 and skip Steps 1–3 (the VLM-direct path). Run Steps 1–3 only when `\u002Fv1\u002Fready` is non-200.\n\n### Step 1 — Resolve the clip URL\n\nHand off to `\u002Fvss-manage-video-io-storage` to:\n\n1. List sensors and confirm the named `\u003Csensor-id>` exists (upload first if not).\n2. Fetch `\u002Fstorage\u002F\u003CstreamId>\u002Ftimelines` for the recorded range when the user did not supply `startTime` \u002F `endTime`.\n3. Request a clip URL:\n\n   ```bash\n   curl -s \"http:\u002F\u002F${HOST_IP}:30888\u002Fvst\u002Fapi\u002Fv1\u002Fstorage\u002Ffile\u002F\u003CstreamId>\u002Furl?startTime=\u003CstartTime>&endTime=\u003CendTime>&container=mp4&disableAudio=true\" | jq -r .videoUrl\n   ```\n\n   That gives a direct `mp4` URL that the local \u002F in-cluster VLM can pull frames from. Bind it to `VIDEO_URL` (used by the VLM in Step 3) and set `RAW_URL=\"$VIDEO_URL\"` before applying the report-link rewrite to produce `BROWSER_CLIP_URL` for Step 4 — the user's browser cannot reach `$VIDEO_URL` directly.\n   Mode A requires the selected VLM endpoint to be able to fetch `VIDEO_URL`.\n   Local NIM\u002FRT-VLM deployments normally can; remote endpoints generally cannot\n   fetch `localhost`, private `HOST_IP`, or VST-internal URLs. If the live\n   `VLM_ENDPOINT` is remote, surface that reachability requirement instead of\n   making a chat request that will fail after `\u002Fv1\u002Fmodels` succeeds.\n\n### Step 2 — Resolve VLM endpoint and model\n\nThe deploy may serve the VLM through either of two stacks. Both expose an OpenAI-compatible `chat\u002Fcompletions` API — pick whichever is live:\n\n| Backend | Env vars | Typical host endpoint | Picked when |\n|---|---|---|---|\n| **NIM Cosmos** | `VLM_BASE_URL`, `VLM_NAME`, `VLM_MODE`, `VLM_MODEL_TYPE` | `${VLM_BASE_URL}\u002Fv1` (no trailing `\u002Fv1` on the env var; the agent appends it) | `VLM_MODEL_TYPE != rtvi` **and** `VLM_MODE` ∈ {`local`, `local_shared`, `remote`} **and** `VLM_BASE_URL` is non-empty |\n| **RT-VLM Cosmos** | `RTVI_VLM_BASE_URL`, `RTVI_VLM_MODEL_TO_USE`, `VLM_MODEL_TYPE` | `${RTVI_VLM_BASE_URL}\u002Fv1` — if unset, derive from `${HOST_IP}` (`http:\u002F\u002F${HOST_IP}:8018\u002Fv1` for alerts, `http:\u002F\u002F${HOST_IP}:30082\u002Fv1` for base) | `VLM_MODEL_TYPE = rtvi`, or `VLM_MODE=none`, or `VLM_BASE_URL` empty; also the only path for `warehouse` |\n\nRead the live values off the running agent container — do not guess:\n\n```bash\ndocker exec vss-agent sh -lc '\nfor k in HOST_IP VLM_MODE VLM_MODEL_TYPE VLM_BASE_URL VLM_NAME RTVI_VLM_BASE_URL RTVI_VLM_MODEL_TO_USE; do\n  v=\"$(printenv \"$k\")\"\n  [ -n \"$v\" ] && printf \"%s=%s\\n\" \"$k\" \"$v\"\ndone\n'\n```\n\nDo not require `RTVI_VLM_ENDPOINT` from `vss-agent` env; several profiles do not inject it.\n\nSelection rule:\n\n```bash\nif [ \"${VLM_MODEL_TYPE:-}\" = \"rtvi\" ]; then\n  VLM_BACKEND=\"rtvlm\"\n  VLM_ENDPOINT=\"${RTVI_VLM_BASE_URL:+${RTVI_VLM_BASE_URL%\u002F}\u002Fv1}\"\n  [ -z \"${VLM_ENDPOINT}\" ] && VLM_ENDPOINT=\"http:\u002F\u002F${HOST_IP}:8018\u002Fv1\"   # alerts default\n  VLM_MODEL=\"${RTVI_VLM_MODEL_TO_USE}\"\nelif [ -n \"${VLM_BASE_URL}\" ] && [ \"${VLM_MODE}\" != \"none\" ]; then\n  VLM_BACKEND=\"nim_cosmos\"\n  VLM_ENDPOINT=\"${VLM_BASE_URL%\u002F}\u002Fv1\"\n  VLM_MODEL=\"${VLM_NAME}\"\nelse\n  VLM_BACKEND=\"rtvlm\"\n  VLM_ENDPOINT=\"${RTVI_VLM_BASE_URL:+${RTVI_VLM_BASE_URL%\u002F}\u002Fv1}\"\n  [ -z \"${VLM_ENDPOINT}\" ] && VLM_ENDPOINT=\"http:\u002F\u002F${HOST_IP}:30082\u002Fv1\"  # base default\n  VLM_MODEL=\"${RTVI_VLM_MODEL_TO_USE}\"\nfi\n```\n\nProbe `\u002Fv1\u002Fmodels` before sending a chat request to confirm the chosen endpoint is alive and the model is loaded:\n\n```bash\ncurl -sf --max-time 5 \"${VLM_ENDPOINT}\u002Fmodels\" | jq -r '.data[].id'\n```\n\nIf the probe fails or the listed ids don't include `${VLM_MODEL}`, fall back to the other backend (or surface the error — never silently pick a model that isn't on the server).\n\n### Step 3 — Call the VLM directly\n\nUse the OpenAI-compatible `chat\u002Fcompletions` endpoint with a `video_url` content block — the same payload shape **and multimodal settings** `video_understanding` builds in `src\u002Fvss_agents\u002Ftools\u002Fvideo_understanding.py` (`_build_vlm_messages` + the Cosmos `base_vlm.bind(...)` call).\n\nThe frame sampling and visual-token (pixel) budget must mirror the **live** `video_understanding` settings for the active profile. **Send `mm_processor_kwargs` and `media_io_kwargs`** so the direct call uses the same frame sampling and pixel budget as the in-agent `video_understanding` tool — omitting them lets the VLM apply its own defaults, so the output diverges from the agent path.\n\n```bash\nPROMPT='Describe in detail what happens in the video, with timestamps (start–end in seconds from clip start) for each segment or event. Cover scenes, objects, people, vehicles, and notable actions.'\n\n# Reasoning is OFF by default — matches the base-profile video_understanding config (`reasoning: false`).\n# video_understanding.py uses config.reasoning unless the caller overrides it, so default to non-reasoning.\n# Append the Cosmos Reason 2 reasoning suffix ONLY when the user explicitly asks for reasoning\n# (drop it for non-cosmos-reason2 VLMs). With reasoning off, the response has no \u003Cthink> block.\nif [ \"${REASONING:-false}\" = \"true\" ]; then\nPROMPT=\"${PROMPT}\n\nAnswer the question using the following format:\n\n\u003Cthink>\nYour reasoning.\n\u003C\u002Fthink>\n\nWrite your final answer immediately after the \u003C\u002Fthink> tag.\"\nfi\n\n# If Step 3 is run standalone, derive missing backend from current env\u002Fmodel.\n[ -z \"${VLM_BACKEND:-}\" ] && {\n  if [ \"${VLM_MODEL_TYPE:-}\" = \"rtvi\" ]; then\n    VLM_BACKEND=\"rtvlm\"\n  elif [[ \"${VLM_MODEL:-}\" == nvidia\u002Fcosmos* ]]; then\n    VLM_BACKEND=\"nim_cosmos\"\n  else\n    VLM_BACKEND=\"rtvlm\"\n  fi\n}\n\n# Multimodal settings — resolve from the live agent config file path, not hardcoded candidates.\nCFG_JSON=$(\ndocker exec vss-agent python3 -c '\nimport json, os, yaml\np = os.getenv(\"VSS_AGENT_CONFIG_FILE\")\nif not p:\n    raise SystemExit(\"VSS_AGENT_CONFIG_FILE is not set in vss-agent\")\nif not os.path.isabs(p):\n    p = os.path.join(\"\u002Fvss-agent\", p.lstrip(\".\u002F\"))\nwith open(p, encoding=\"utf-8\") as f:\n    cfg = yaml.safe_load(f) or {}\nvu = (cfg.get(\"functions\", {}) or {}).get(\"video_understanding\", {}) or {}\nprint(json.dumps({\n    \"max_fps\": int(vu.get(\"max_fps\", 2)),\n    \"max_frames\": int(vu.get(\"max_frames\", 30)),\n    \"min_pixels\": int(vu.get(\"min_pixels\", 3136)),\n    \"max_pixels\": int(vu.get(\"max_pixels\", 8388608)),\n}))\n')\n)\n[ -n \"${CFG_JSON}\" ] || { echo \"Failed to read video_understanding config from vss-agent\"; exit 1; }\njq -e . >\u002Fdev\u002Fnull \u003C\u003C\u003C \"${CFG_JSON}\" || { echo \"Invalid config JSON from vss-agent\"; exit 1; }\nMAX_FPS=\"$(jq -r '.max_fps' \u003C\u003C\u003C \"${CFG_JSON}\")\"\nMAX_FRAMES=\"$(jq -r '.max_frames' \u003C\u003C\u003C \"${CFG_JSON}\")\"\nMIN_PIXELS=\"$(jq -r '.min_pixels' \u003C\u003C\u003C \"${CFG_JSON}\")\"\nMAX_PIXELS=\"$(jq -r '.max_pixels' \u003C\u003C\u003C \"${CFG_JSON}\")\"\n\n# num_frames = min(int(clip_seconds) * max_fps, max_frames), min 1 — matches video_understanding.py.\n# clip_seconds (Step 1 endTime-startTime) may be fractional; truncate to integer seconds — bash $((...))\n# is integer-only and errors on \"15.0\"\u002F\"1.5\". Default 15s -> caps at MAX_FRAMES.\nCLIP_SECONDS=$(awk -v s=\"${CLIP_SECONDS:-15}\" 'BEGIN{printf \"%d\", s}')\nNUM_FRAMES=$(( CLIP_SECONDS * MAX_FPS ))\n[ \"$NUM_FRAMES\" -gt \"$MAX_FRAMES\" ] && NUM_FRAMES=$MAX_FRAMES\n[ \"$NUM_FRAMES\" -lt 1 ] && NUM_FRAMES=1\n\n# Only apply Cosmos mm\u002Fmedia kwargs on the NIM Cosmos path.\n# RT-VLM mode uses its own server-side preprocessing and should not receive these kwargs.\nMM_KWARGS=\"\"\nif [ \"${VLM_BACKEND}\" = \"nim_cosmos\" ]; then\n  case \"$VLM_MODEL\" in\n    *cosmos-reason2*) MM_KWARGS=\", \\\"mm_processor_kwargs\\\": {\\\"size\\\": {\\\"shortest_edge\\\": ${MIN_PIXELS}, \\\"longest_edge\\\": ${MAX_PIXELS}}}, \\\"media_io_kwargs\\\": {\\\"video\\\": {\\\"num_frames\\\": ${NUM_FRAMES}}}\" ;;\n    *cosmos*)         MM_KWARGS=\", \\\"mm_processor_kwargs\\\": {\\\"videos_kwargs\\\": {\\\"min_pixels\\\": ${MIN_PIXELS}, \\\"max_pixels\\\": ${MAX_PIXELS}}}, \\\"media_io_kwargs\\\": {\\\"video\\\": {\\\"num_frames\\\": ${NUM_FRAMES}}}\" ;;\n    *)                      MM_KWARGS=\"\" ;;\n  esac\nfi\n\ncurl -s --connect-timeout 5 --max-time 120 -X POST \"${VLM_ENDPOINT}\u002Fchat\u002Fcompletions\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d @- \u003C\u003CEOF | jq -r '.choices[0].message.content'\n{\n  \"model\": $(jq -Rs . \u003C\u003C\u003C \"${VLM_MODEL}\"),\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": [\n        {\"type\": \"text\", \"text\": $(jq -Rs . \u003C\u003C\u003C \"${PROMPT}\")},\n        {\"type\": \"video_url\", \"video_url\": {\"url\": $(jq -Rs . \u003C\u003C\u003C \"${VIDEO_URL}\")}}\n      ]\n    }\n  ],\n  \"max_tokens\": 1024,\n  \"temperature\": 0.0${MM_KWARGS}\n}\nEOF\n```\n\n> The kwargs block is backend-aware: on `nim_cosmos`, Reason2 variants (`nvidia\u002Fcosmos-reason2*`) use `mm_processor_kwargs.size{shortest_edge,longest_edge}` and other NIM Cosmos variants (`nvidia\u002Fcosmos*`) use `mm_processor_kwargs.videos_kwargs{min_pixels,max_pixels}`; both also send `media_io_kwargs.video.num_frames`. On `rtvlm`, no Cosmos kwargs are sent.\n\nIf the VLM returns a `\u003Cthink>…\u003C\u002Fthink>` block (Cosmos Reason reasoning mode), keep only the text after `\u003C\u002Fthink>` as the report body.\n\n### Step 4 — Fill the Video Analysis Report template\n\nCopy [`assets\u002Fvideo-analysis-report.md`](assets\u002Fvideo-analysis-report.md), fill every placeholder, and return the rendered markdown to the user. Keep the source asset unchanged. Before rendering, verify `BROWSER_CLIP_URL` is set and non-empty, then replace `\u003CBROWSER_CLIP_URL>` with that exact value in the `Clip URL` row. Never leave the placeholder in the output, never include template instructions in a filled cell, and never use the raw `HOST_IP:30888` URL.\n\n---\n\n## Mode B — Report on incidents in a time range\n\n### Step 1 — Resolve the time range and (optionally) sensor\n\n- `start_time` \u002F `end_time` must be ISO 8601 UTC (`YYYY-MM-DDTHH:MM:SS.sssZ`). Resolve relative phrases (\"last hour\", \"today\") against the current host clock.\n- If the user names a sensor, capture it as `source` + `source_type=sensor`. Otherwise leave both unset for an all-sensors query.\n\n### Step 2 — Fetch incidents via `\u002Fvss-query-analytics`\n\nHand off to `\u002Fvss-query-analytics` (initialize → `tools\u002Fcall`) with:\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"tools\u002Fcall\",\n  \"params\": {\n    \"name\": \"video_analytics__get_incidents\",\n    \"arguments\": {\n      \"source\": \"\u003Csensor-id-or-omit>\",\n      \"source_type\": \"sensor\",\n      \"start_time\": \"\u003CISO>\",\n      \"end_time\": \"\u003CISO>\",\n      \"max_count\": 100,\n      \"includes\": [\"objectIds\", \"info\"]\n    }\n  },\n  \"id\": 1\n}\n```\n\nRead-only boundary (mandatory):\n- Mode B is strictly read-only analytics retrieval. Never write, seed, backfill, or mutate Elasticsearch\u002FVA data.\n- Forbidden examples: indexing synthetic incidents, replaying fixture payloads into ES, calling write\u002Fupdate\u002Fdelete APIs to \"make data available\" for the report.\n- If no incidents exist for the requested range\u002Fscope, handle as empty results (see below); do not fabricate data.\n\nFor each incident keep: `id`, `sensorId`, `timestamp`, `end`, `category`, `place.name`, `info.verdict`, `info.reasoning`, `objectIds`, and the clip URL (commonly `info.clip_url`, `clip_url`, or whichever clip-pointer field the response carries). **Apply the `$VSS_PUBLIC_HOST:$VSS_PUBLIC_PORT` rewrite (see *Browser-playable clip URL* above) to every clip URL before pasting it into the report** — the raw value is a `HOST_IP:30888` URL the user's browser cannot reach.\n\n### Step 3 — Fill the Incident Range Report template\n\nCopy [`assets\u002Fincident-range-report.md`](assets\u002Fincident-range-report.md), then group by sensor (or by category if no sensor scope), tally verdicts, and list each incident with timestamp \u002F category \u002F verdict \u002F reasoning. Keep the source asset unchanged. Every incident clip value must be a rewritten browser-playable URL; omit the clip line when the incident carries no clip URL. Never include template instructions in a filled cell.\n\nIf `get_incidents` returns zero results, STOP and return exactly a one-line empty-range statement naming the requested range and scope. Do not render the full Incident Range template, do not invent incidents, do not seed test data, and do not fall back to Mode A.\n\n---\n\n## Error Handling\n\n- If a probe, `curl`, VLM call, or `\u002Fvss-query-analytics` request fails, stop the workflow and report the failing endpoint, HTTP status or command error, and the next useful recovery step. Do not fabricate a report from partial or missing data.\n- If the VLM response is empty, malformed, or contains only a reasoning block, surface that response problem and suggest checking model readiness\u002Flogs before retrying.\n- If a clip URL cannot be rewritten to the public host\u002Fport, omit it from the rendered report and call out that the browser-playable URL could not be produced.\n- For Mode B, treat missing optional incident fields (`info.reasoning`, `objectIds`, clip URL) as omissions in the report, but treat missing `id`, `timestamp`, or `category` as a data-quality error that should be reported.\n\n---\n\n## Cross-Reference\n\n- **`\u002Fvss-manage-video-io-storage`** — sensor list, timelines, and clip URL for Mode A Step 1.\n- **`\u002Fvss-query-analytics`** — incident retrieval (and verdict \u002F reasoning enrichment) for Mode B Step 2.\n- **`\u002Fvss-ask-video`** — ad-hoc VLM Q&A on a single clip (not a structured report).\n- **`\u002Fvss-summarize-video`** — used by Mode A to produce the summary body when the `lvs` profile is deployed; the report template (Step 4) is still filled here.\n\n","# Report\n\nGenerate a video analysis report by routing to one of two backends — **never via** `POST \u002Fgenerate` on the VSS agent.\n\n| Mode | Backend |\n|---|---|\n| **A. Video clip** | `\u002Fvss-manage-video-io-storage` → clip URL → **VLM chat\u002Fcompletions** |\n| **B. Incident range** | `\u002Fvss-query-analytics` → incident list → narrative report |\n\nIf the request is ambiguous (e.g. \"report on `\u003Csensor>`\" with no time range and no incident wording), default to **Mode A**. Ask only if the user mentions both a sensor and a time range. See **Examples** below for the request phrasings that route to each mode.\n\n---\n\n## Instructions\n\n1. **Pick the mode** — Mode A for a single recorded clip\u002Fsensor video, Mode B when the request names a time range or incidents\u002Falerts (match against *Examples*).\n2. **Verify the deployment profile** for that mode under *Deployment prerequisite*; hand off to `\u002Fvss-deploy-profile` if its probe fails.\n3. **Run that mode's numbered steps** — *Mode A* or *Mode B* below.\n4. **Rewrite every user-facing clip URL** with the `$VSS_PUBLIC_HOST:$VSS_PUBLIC_PORT` one-liner (*Browser-playable clip URL*) before embedding it in the report.\n5. **Return the rendered report markdown** to the user.\n\nOutput contract for evaluators:\n- Mode A top title MUST be exactly `# Video Analysis Report`.\n- Mode B top title MUST be exactly `# Incident Range Report` (never `# Incident Report` or sensor-named variants).\n- Mode B MUST include `## Basic Information` with the exact required rows from the template (Report Identifier, Range, Scope, Total Incidents, Confirmed \u002F Rejected \u002F Unverified).\n\n---\n\n## Examples\n\n- \"Generate a report for this video\" \u002F \"report on `\u003Csensor-id>`\" → **Mode A**\n- \"Analyze warehouse_01.mp4\" \u002F \"create an analysis report on the uploaded video\" → **Mode A**\n- \"Report on incidents from 12:31Z to 12:32Z\" → **Mode B**\n- \"Report on alerts today\" \u002F \"what incidents happened on `\u003Csensor>` last hour\" → **Mode B**\n- \"Summarize alerts on `\u003Csensor>` between `\u003Ct1>` and `\u003Ct2>`\" → **Mode B**\n\n---\n\n## Negative Triggers\n\nDo **not** use this skill when the request is one of the following:\n\n- Ad-hoc visual Q&A on a clip that do not ask explicitly for a report (\"what color is the truck?\", \"what happens at 00:12?\") → use `\u002Fvss-ask-video`.\n- Archive\u002Fsemantic similarity retrieval (\"find forklifts\", \"search all videos for tailgating\") → use `\u002Fvss-search-archive`.\n- Read-only incident\u002Fmetrics lookup without report rendering needs → use `\u002Fvss-query-analytics`.\n- Deploy\u002Fteardown\u002Fprofile changes (\"deploy alerts\", \"switch profile\", \"bring up base\") → use `\u002Fvss-deploy-profile`.\n- Real-time alert\u002Frule management requests → use `\u002Fvss-manage-alerts`.\n\nNever route reports through VSS-agent `POST \u002Fgenerate`.\n\n---\n\n## Deployment prerequisite\n\n**Mode A** needs the VSS **base** profile (VST + VLM NIM).\n**Mode B** needs the VSS **alerts** profile (VA-MCP + Elasticsearch).\n\nProbe:\n\n```bash\n# Mode A — VST + VLM reachability\ncurl -sf --max-time 5 \"http:\u002F\u002F${HOST_IP}:30888\u002Fvst\u002Fapi\u002Fv1\u002Fsensor\u002Fversion\" >\u002Fdev\u002Fnull\n\n# Mode B — VA-MCP\ncurl -sf --max-time 5 \"http:\u002F\u002F${HOST_IP}:9901\u002F\" >\u002Fdev\u002Fnull\n```\n\nIf the probe fails, hand off to `\u002Fvss-deploy-profile` with `-p base` (Mode A) or `-p alerts` (Mode B). **Always** confirm the deploy with the user first.\n\n---\n\n## Clip URLs: VLM input vs browser report link\n\nVST returns clip URLs using the agent-internal `${HOST_IP}:30888` host:port.\nKeep that original URL as `VIDEO_URL` for local \u002F in-cluster VLM frame pulls.\nDo **not** rewrite the VLM input URL just to make it browser-playable.\n\nOnly create `BROWSER_CLIP_URL` for URLs shown in the rendered report. The\ndeploy layer exports the browser-facing host:port as `$VSS_PUBLIC_HOST` \u002F\n`$VSS_PUBLIC_PORT` (and scheme as `$VSS_PUBLIC_HTTP_PROTOCOL`) in every\nprofile `.env` — Brev or bare-metal — so the report-link rewrite is:\n\n```bash\n: \"${VSS_PUBLIC_HOST:?Set VSS_PUBLIC_HOST before rewriting clip URLs}\"\n: \"${VSS_PUBLIC_PORT:?Set VSS_PUBLIC_PORT before rewriting clip URLs}\"\nVSS_PUBLIC_HTTP_PROTOCOL=\"${VSS_PUBLIC_HTTP_PROTOCOL:-http}\"\nBROWSER_CLIP_URL=$(echo \"$RAW_URL\" | sed -E \"s|^https?:\u002F\u002F[^\u002F]+|${VSS_PUBLIC_HTTP_PROTOCOL}:\u002F\u002F${VSS_PUBLIC_HOST}:${VSS_PUBLIC_PORT}|\")\n```\n\nIf either required public host value is missing, omit the report-facing clip\nlink and call out that a browser-playable URL could not be produced; do not\nblock the local VLM analysis path. Apply the rewrite to **every clip URL\nsurfaced in the rendered report** (Mode A Step 4 Clip URL row; Mode B\nper-incident clip sub-bullet). Leave the VLM `video_url` content block in Mode A\nStep 3 on the original internal URL when the VLM is local \u002F in-cluster.\n\n---\n\n## Mode A — Report on a recorded video clip\n\n**If the VSS `lvs` profile is deployed** — `curl -sf --max-time 5 \"http:\u002F\u002F${HOST_IP}:38111\u002Fv1\u002Fready\"` returns HTTP 200 — run `\u002Fvss-summarize-video` to produce the summary, then paste its output into the report template in Step 4 and skip Steps 1–3 (the VLM-direct path). Run Steps 1–3 only when `\u002Fv1\u002Fready` is non-200.\n\n### Step 1 — Resolve the clip URL\n\nHand off to `\u002Fvss-manage-video-io-storage` to:\n\n1. List sensors and confirm the named `\u003Csensor-id>` exists (upload first if not).\n2. Fetch `\u002Fstorage\u002F\u003CstreamId>\u002Ftimelines` for the recorded range when the user did not supply `startTime` \u002F `endTime`.\n3. Request a clip URL:\n\n   ```bash\n   curl -s \"http:\u002F\u002F${HOST_IP}:30888\u002Fvst\u002Fapi\u002Fv1\u002Fstorage\u002Ffile\u002F\u003CstreamId>\u002Furl?startTime=\u003CstartTime>&endTime=\u003CendTime>&container=mp4&disableAudio=true\" | jq -r .videoUrl\n   ```\n\n   That gives a direct `mp4` URL that the local \u002F in-cluster VLM can pull frames from. Bind it to `VIDEO_URL` (used by the VLM in Step 3) and set `RAW_URL=\"$VIDEO_URL\"` before applying the report-link rewrite to produce `BROWSER_CLIP_URL` for Step 4 — the user's browser cannot reach `$VIDEO_URL` directly.\n   Mode A requires the selected VLM endpoint to be able to fetch `VIDEO_URL`.\n   Local NIM\u002FRT-VLM deployments normally can; remote endpoints generally cannot\n   fetch `localhost`, private `HOST_IP`, or VST-internal URLs. If the live\n   `VLM_ENDPOINT` is remote, surface that reachability requirement instead of\n   making a chat request that will fail after `\u002Fv1\u002Fmodels` succeeds.\n\n### Step 2 — Resolve VLM endpoint and model\n\nThe deploy may serve the VLM through either of two stacks. Both expose an OpenAI-compatible `chat\u002Fcompletions` API — pick whichever is live:\n\n| Backend | Env vars | Typical host endpoint | Picked when |\n|---|---|---|---|\n| **NIM Cosmos** | `VLM_BASE_URL`, `VLM_NAME`, `VLM_MODE`, `VLM_MODEL_TYPE` | `${VLM_BASE_URL}\u002Fv1` (no trailing `\u002Fv1` on the env var; the agent appends it) | `VLM_MODEL_TYPE != rtvi` **and** `VLM_MODE` ∈ {`local`, `local_shared`, `remote`} **and** `VLM_BASE_URL` is non-empty |\n| **RT-VLM Cosmos** | `RTVI_VLM_BASE_URL`, `RTVI_VLM_MODEL_TO_USE`, `VLM_MODEL_TYPE` | `${RTVI_VLM_BASE_URL}\u002Fv1` — if unset, derive from `${HOST_IP}` (`http:\u002F\u002F${HOST_IP}:8018\u002Fv1` for alerts, `http:\u002F\u002F${HOST_IP}:30082\u002Fv1` for base) | `VLM_MODEL_TYPE = rtvi`, or `VLM_MODE=none`, or `VLM_BASE_URL` empty; also the only path for `warehouse` |\n\nRead the live values off the running agent container — do not guess:\n\n```bash\ndocker exec vss-agent sh -lc '\nfor k in HOST_IP VLM_MODE VLM_MODEL_TYPE VLM_BASE_URL VLM_NAME RTVI_VLM_BASE_URL RTVI_VLM_MODEL_TO_USE; do\n  v=\"$(printenv \"$k\")\"\n  [ -n \"$v\" ] && printf \"%s=%s\\n\" \"$k\" \"$v\"\ndone\n'\n```\n\nDo not require `RTVI_VLM_ENDPOINT` from `vss-agent` env; several profiles do not inject it.\n\nSelection rule:\n\n```bash\nif [ \"${VLM_MODEL_TYPE:-}\" = \"rtvi\" ]; then\n  VLM_BACKEND=\"rtvlm\"\n  VLM_ENDPOINT=\"${RTVI_VLM_BASE_URL:+${RTVI_VLM_BASE_URL%\u002F}\u002Fv1}\"\n  [ -z \"${VLM_ENDPOINT}\" ] && VLM_ENDPOINT=\"http:\u002F\u002F${HOST_IP}:8018\u002Fv1\"   # alerts default\n  VLM_MODEL=\"${RTVI_VLM_MODEL_TO_USE}\"\nelif [ -n \"${VLM_BASE_URL}\" ] && [ \"${VLM_MODE}\" != \"none\" ]; then\n  VLM_BACKEND=\"nim_cosmos\"\n  VLM_ENDPOINT=\"${VLM_BASE_URL%\u002F}\u002Fv1\"\n  VLM_MODEL=\"${VLM_NAME}\"\nelse\n  VLM_BACKEND=\"rtvlm\"\n  VLM_ENDPOINT=\"${RTVI_VLM_BASE_URL:+${RTVI_VLM_BASE_URL%\u002F}\u002Fv1}\"\n  [ -z \"${VLM_ENDPOINT}\" ] && VLM_ENDPOINT=\"http:\u002F\u002F${HOST_IP}:30082\u002Fv1\"  # base default\n  VLM_MODEL=\"${RTVI_VLM_MODEL_TO_USE}\"\nfi\n```\n\nProbe `\u002Fv1\u002Fmodels` before sending a chat request to confirm the chosen endpoint is alive and the model is loaded:\n\n```bash\ncurl -sf --max-time 5 \"${VLM_ENDPOINT}\u002Fmodels\" | jq -r '.data[].id'\n```\n\nIf the probe fails or the listed ids don't include `${VLM_MODEL}`, fall back to the other backend (or surface the error — never silently pick a model that isn't on the server).\n\n### Step 3 — Call the VLM directly\n\nUse the OpenAI-compatible `chat\u002Fcompletions` endpoint with a `video_url` content block — the same payload shape **and multimodal settings** `video_understanding` builds in `src\u002Fvss_agents\u002Ftools\u002Fvideo_understanding.py` (`_build_vlm_messages` + the Cosmos `base_vlm.bind(...)` call).\n\nThe frame sampling and visual-token (pixel) budget must mirror the **live** `video_understanding` settings for the active profile. **Send `mm_processor_kwargs` and `media_io_kwargs`** so the direct call uses the same frame sampling and pixel budget as the in-agent `video_understanding` tool — omitting them lets the VLM apply its own defaults, so the output diverges from the agent path.\n\n```bash\nPROMPT='Describe in detail what happens in the video, with timestamps (start–end in seconds from clip start) for each segment or event. Cover scenes, objects, people, vehicles, and notable actions.'\n\n# Reasoning is OFF by default — matches the base-profile video_understanding config (`reasoning: false`).\n# video_understanding.py uses config.reasoning unless the caller overrides it, so default to non-reasoning.\n# Append the Cosmos Reason 2 reasoning suffix ONLY when the user explicitly asks for reasoning\n# (drop it for non-cosmos-reason2 VLMs). With reasoning off, the response has no \u003Cthink> block.\nif [ \"${REASONING:-false}\" = \"true\" ]; then\nPROMPT=\"${PROMPT}\n\nAnswer the question using the following format:\n\n\u003Cthink>\nYour reasoning.\n\u003C\u002Fthink>\n\nWrite your final answer immediately after the \u003C\u002Fthink> tag.\"\nfi\n\n# If Step 3 is run standalone, derive missing backend from current env\u002Fmodel.\n[ -z \"${VLM_BACKEND:-}\" ] && {\n  if [ \"${VLM_MODEL_TYPE:-}\" = \"rtvi\" ]; then\n    VLM_BACKEND=\"rtvlm\"\n  elif [[ \"${VLM_MODEL:-}\" == nvidia\u002Fcosmos* ]]; then\n    VLM_BACKEND=\"nim_cosmos\"\n  else\n    VLM_BACKEND=\"rtvlm\"\n  fi\n}\n\n# Multimodal settings — resolve from the live agent config file path, not hardcoded candidates.\nCFG_JSON=$(\ndocker exec vss-agent python3 -c '\nimport json, os, yaml\np = os.getenv(\"VSS_AGENT_CONFIG_FILE\")\nif not p:\n    raise SystemExit(\"VSS_AGENT_CONFIG_FILE is not set in vss-agent\")\nif not os.path.isabs(p):\n    p = os.path.join(\"\u002Fvss-agent\", p.lstrip(\".\u002F\"))\nwith open(p, encoding=\"utf-8\") as f:\n    cfg = yaml.safe_load(f) or {}\nvu = (cfg.get(\"functions\", {}) or {}).get(\"video_understanding\", {}) or {}\nprint(json.dumps({\n    \"max_fps\": int(vu.get(\"max_fps\", 2)),\n    \"max_frames\": int(vu.get(\"max_frames\", 30)),\n    \"min_pixels\": int(vu.get(\"min_pixels\", 3136)),\n    \"max_pixels\": int(vu.get(\"max_pixels\", 8388608)),\n}))\n')\n)\n[ -n \"${CFG_JSON}\" ] || { echo \"Failed to read video_understanding config from vss-agent\"; exit 1; }\njq -e . >\u002Fdev\u002Fnull \u003C\u003C\u003C \"${CFG_JSON}\" || { echo \"Invalid config JSON from vss-agent\"; exit 1; }\nMAX_FPS=\"$(jq -r '.max_fps' \u003C\u003C\u003C \"${CFG_JSON}\")\"\nMAX_FRAMES=\"$(jq -r '.max_frames' \u003C\u003C\u003C \"${CFG_JSON}\")\"\nMIN_PIXELS=\"$(jq -r '.min_pixels' \u003C\u003C\u003C \"${CFG_JSON}\")\"\nMAX_PIXELS=\"$(jq -r '.max_pixels' \u003C\u003C\u003C \"${CFG_JSON}\")\"\n\n# num_frames = min(int(clip_seconds) * max_fps, max_frames), min 1 — matches video_understanding.py.\n# clip_seconds (Step 1 endTime-startTime) may be fractional; truncate to integer seconds — bash $((...))\n# is integer-only and errors on \"15.0\"\u002F\"1.5\". Default 15s -> caps at MAX_FRAMES.\nCLIP_SECONDS=$(awk -v s=\"${CLIP_SECONDS:-15}\" 'BEGIN{printf \"%d\", s}')\nNUM_FRAMES=$(( CLIP_SECONDS * MAX_FPS ))\n[ \"$NUM_FRAMES\" -gt \"$MAX_FRAMES\" ] && NUM_FRAMES=$MAX_FRAMES\n[ \"$NUM_FRAMES\" -lt 1 ] && NUM_FRAMES=1\n\n# Only apply Cosmos mm\u002Fmedia kwargs on the NIM Cosmos path.\n# RT-VLM mode uses its own server-side preprocessing and should not receive these kwargs.\nMM_KWARGS=\"\"\nif [ \"${VLM_BACKEND}\" = \"nim_cosmos\" ]; then\n  case \"$VLM_MODEL\" in\n    *cosmos-reason2*) MM_KWARGS=\", \\\"mm_processor_kwargs\\\": {\\\"size\\\": {\\\"shortest_edge\\\": ${MIN_PIXELS}, \\\"longest_edge\\\": ${MAX_PIXELS}}}, \\\"media_io_kwargs\\\": {\\\"video\\\": {\\\"num_frames\\\": ${NUM_FRAMES}}}\" ;;\n    *cosmos*)         MM_KWARGS=\", \\\"mm_processor_kwargs\\\": {\\\"videos_kwargs\\\": {\\\"min_pixels\\\": ${MIN_PIXELS}, \\\"max_pixels\\\": ${MAX_PIXELS}}}, \\\"media_io_kwargs\\\": {\\\"video\\\": {\\\"num_frames\\\": ${NUM_FRAMES}}}\" ;;\n    *)                      MM_KWARGS=\"\" ;;\n  esac\nfi\n\ncurl -s --connect-timeout 5 --max-time 120 -X POST \"${VLM_ENDPOINT}\u002Fchat\u002Fcompletions\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d @- \u003C\u003CEOF | jq -r '.choices[0].message.content'\n{\n  \"model\": $(jq -Rs . \u003C\u003C\u003C \"${VLM_MODEL}\"),\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": [\n        {\"type\": \"text\", \"text\": $(jq -Rs . \u003C\u003C\u003C \"${PROMPT}\")},\n        {\"type\": \"video_url\", \"video_url\": {\"url\": $(jq -Rs . \u003C\u003C\u003C \"${VIDEO_URL}\")}}\n      ]\n    }\n  ],\n  \"max_tokens\": 1024,\n  \"temperature\": 0.0${MM_KWARGS}\n}\nEOF\n```\n\n> The kwargs block is backend-aware: on `nim_cosmos`, Reason2 variants (`nvidia\u002Fcosmos-reason2*`) use `mm_processor_kwargs.size{shortest_edge,longest_edge}` and other NIM Cosmos variants (`nvidia\u002Fcosmos*`) use `mm_processor_kwargs.videos_kwargs{min_pixels,max_pixels}`; both also send `media_io_kwargs.video.num_frames`. On `rtvlm`, no Cosmos kwargs are sent.\n\nIf the VLM returns a `\u003Cthink>…\u003C\u002Fthink>` block (Cosmos Reason reasoning mode), keep only the text after `\u003C\u002Fthink>` as the report body.\n\n### Step 4 — Fill the Video Analysis Report template\n\nCopy [`assets\u002Fvideo-analysis-report.md`](assets\u002Fvideo-analysis-report.md), fill every placeholder, and return the rendered markdown to the user. Keep the source asset unchanged. Before rendering, verify `BROWSER_CLIP_URL` is set and non-empty, then replace `\u003CBROWSER_CLIP_URL>` with that exact value in the `Clip URL` row. Never leave the placeholder in the output, never include template instructions in a filled cell, and never use the raw `HOST_IP:30888` URL.\n\n---\n\n## Mode B — Report on incidents in a time range\n\n### Step 1 — Resolve the time range and (optionally) sensor\n\n- `start_time` \u002F `end_time` must be ISO 8601 UTC (`YYYY-MM-DDTHH:MM:SS.sssZ`). Resolve relative phrases (\"last hour\", \"today\") against the current host clock.\n- If the user names a sensor, capture it as `source` + `source_type=sensor`. Otherwise leave both unset for an all-sensors query.\n\n### Step 2 — Fetch incidents via `\u002Fvss-query-analytics`\n\nHand off to `\u002Fvss-query-analytics` (initialize → `tools\u002Fcall`) with:\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"tools\u002Fcall\",\n  \"params\": {\n    \"name\": \"video_analytics__get_incidents\",\n    \"arguments\": {\n      \"source\": \"\u003Csensor-id-or-omit>\",\n      \"source_type\": \"sensor\",\n      \"start_time\": \"\u003CISO>\",\n      \"end_time\": \"\u003CISO>\",\n      \"max_count\": 100,\n      \"includes\": [\"objectIds\", \"info\"]\n    }\n  },\n  \"id\": 1\n}\n```\n\nRead-only boundary (mandatory):\n- Mode B is strictly read-only analytics retrieval. Never write, seed, backfill, or mutate Elasticsearch\u002FVA data.\n- Forbidden examples: indexing synthetic incidents, replaying fixture payloads into ES, calling write\u002Fupdate\u002Fdelete APIs to \"make data available\" for the report.\n- If no incidents exist for the requested range\u002Fscope, handle as empty results (see below); do not fabricate data.\n\nFor each incident keep: `id`, `sensorId`, `timestamp`, `end`, `category`, `place.name`, `info.verdict`, `info.reasoning`, `objectIds`, and the clip URL (commonly `info.clip_url`, `clip_url`, or whichever clip-pointer field the response carries). **Apply the `$VSS_PUBLIC_HOST:$VSS_PUBLIC_PORT` rewrite (see *Browser-playable clip URL* above) to every clip URL before pasting it into the report** — the raw value is a `HOST_IP:30888` URL the user's browser cannot reach.\n\n### Step 3 — Fill the Incident Range Report template\n\nCopy [`assets\u002Fincident-range-report.md`](assets\u002Fincident-range-report.md), then group by sensor (or by category if no sensor scope), tally verdicts, and list each incident with timestamp \u002F category \u002F verdict \u002F reasoning. Keep the source asset unchanged. Every incident clip value must be a rewritten browser-playable URL; omit the clip line when the incident carries no clip URL. Never include template instructions in a filled cell.\n\nIf `get_incidents` returns zero results, STOP and return exactly a one-line empty-range statement naming the requested range and scope. Do not render the full Incident Range template, do not invent incidents, do not seed test data, and do not fall back to Mode A.\n\n---\n\n## Error Handling\n\n- If a probe, `curl`, VLM call, or `\u002Fvss-query-analytics` request fails, stop the workflow and report the failing endpoint, HTTP status or command error, and the next useful recovery step. Do not fabricate a report from partial or missing data.\n- If the VLM response is empty, malformed, or contains only a reasoning block, surface that response problem and suggest checking model readiness\u002Flogs before retrying.\n- If a clip URL cannot be rewritten to the public host\u002Fport, omit it from the rendered report and call out that the browser-playable URL could not be produced.\n- For Mode B, treat missing optional incident fields (`info.reasoning`, `objectIds`, clip URL) as omissions in the report, but treat missing `id`, `timestamp`, or `category` as a data-quality error that should be reported.\n\n---\n\n## Cross-Reference\n\n- **`\u002Fvss-manage-video-io-storage`** — sensor list, timelines, and clip URL for Mode A Step 1.\n- **`\u002Fvss-query-analytics`** — incident retrieval (and verdict \u002F reasoning enrichment) for Mode B Step 2.\n- **`\u002Fvss-ask-video`** — ad-hoc VLM Q&A on a single clip (not a structured report).\n- **`\u002Fvss-summarize-video`** — used by Mode A to produce the summary body when the `lvs` profile is deployed; the report template (Step 4) is still filled here.\n\n",{"name":5,"license":15,"metadata":60,"description":7},{"tags":61,"author":62,"version":63,"github-url":64},"nvidia blueprint operational","NVIDIA Video Search and Summarization team","3.2.0","https:\u002F\u002Fgithub.com\u002FNVIDIA-AI-Blueprints\u002Fvideo-search-and-summarization","claude\u002Finstall-gsd-build-foQdV","d86cd127f527124b5fd0fd0bc679a4d79b7d01d7",".agents\u002Fskills\u002Fvss-generate-video-report","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik","https:\u002F\u002Fnorvik-orpin.vercel.app","https:\u002F\u002Fgithub.com\u002Fpattanation","2026-07-17 11:17:04",{"source":8,"skillName":5,"commands":73,"prompt":83,"zipAvailable":84},[74,77,80],{"tool":75,"command":76},"npx","npx skills add pattanation\u002FNorvik --skill vss-generate-video-report",{"tool":78,"command":79},"bunx","bunx skills add pattanation\u002FNorvik --skill vss-generate-video-report",{"tool":81,"command":82},"pnpm","pnpm dlx skills add pattanation\u002FNorvik --skill vss-generate-video-report","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvss-generate-video-report\u002FSKILL.md",true,[86,92,96,102,106,110,114],{"path":87,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":90,"sourceHtmlUrl":91},"assets\u002Fincident-range-report.md","ASSET","资产文件",686,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvss-generate-video-report\u002Fassets\u002Fincident-range-report.md",{"path":93,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":94,"sourceHtmlUrl":95},"assets\u002Fvideo-analysis-report.md",502,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvss-generate-video-report\u002Fassets\u002Fvideo-analysis-report.md",{"path":97,"resourceType":98,"resourceTypeDesc":99,"sizeBytes":100,"sourceHtmlUrl":101},"BENCHMARK.md","REFERENCE","参考文档",3581,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvss-generate-video-report\u002FBENCHMARK.md",{"path":103,"resourceType":98,"resourceTypeDesc":99,"sizeBytes":104,"sourceHtmlUrl":105},"evals\u002Fbase_profile_report.json",9257,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvss-generate-video-report\u002Fevals\u002Fbase_profile_report.json",{"path":107,"resourceType":98,"resourceTypeDesc":99,"sizeBytes":108,"sourceHtmlUrl":109},"evals\u002Fevals.json",2623,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvss-generate-video-report\u002Fevals\u002Fevals.json",{"path":111,"resourceType":98,"resourceTypeDesc":99,"sizeBytes":112,"sourceHtmlUrl":113},"skill-card.md",3960,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvss-generate-video-report\u002Fskill-card.md",{"path":115,"resourceType":116,"resourceTypeDesc":117,"sizeBytes":118,"sourceHtmlUrl":119},"skill.oms.sig","OTHER","其他",5337,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvss-generate-video-report\u002Fskill.oms.sig",[121,151,177,201,223,238],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":125,"sourceHtmlUrl":126,"categories":127,"keywords":134,"publishedAt":55},"01M71QDV4DM8T19HEHWATEF1K4","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[128,131],{"categoryNo":129,"categoryName":130,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":132,"categoryName":133,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[135,136,137,41,138,139,140,141,142,143,144,145,146,147,148,149,150],"webapp","testing","webapp testing","applications","local","frontend","debugging","toolkit","logs","browser","with","playwright","web","behavior","ui","screenshots",{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":155,"sourceHtmlUrl":156,"categories":157,"keywords":159,"publishedAt":55},"01M71QDH2GGMXGA9105C9W1N7B","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fweb-artifacts-builder\u002FSKILL.md",[158],{"categoryNo":132,"categoryName":133,"taxonomyType":21,"taxonomyTypeDesc":22},[160,161,162,147,163,164,165,41,166,167,140,168,169,170,171,172,173,174,175,176],"builder","artifacts builder","artifacts","web artifacts builder","single-file","css","Tailwind","ui components","single","use","file","components","react","multi","state","routing","state management",{"skillNo":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":181,"licenseFileUrl":182,"sourceHtmlUrl":183,"categories":184,"keywords":186,"publishedAt":55},"01M71QD9T2XC3EWMQNN9ACNWQ1","vueuse-functions","Apply VueUse composables where appropriate to build concise, maintainable Vue.js \u002F Nuxt features.","MIT","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvueuse-functions\u002FLICENSE.md","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvueuse-functions\u002FSKILL.md",[185],{"categoryNo":132,"categoryName":133,"taxonomyType":21,"taxonomyTypeDesc":22},[187,188,189,190,191,192,193,194,195,196,197,198,199,200],"functions","vueuse","vueuse functions","project","nuxt","apply","github","concise","build","https","features","vue","js","composables",{"skillNo":202,"name":203,"nameZh":6,"description":204,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":181,"licenseFileUrl":205,"sourceHtmlUrl":206,"categories":207,"keywords":210,"publishedAt":55},"01M71QD51HWSGYMCMB7RW7PGK8","vue-testing-best-practices","Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvue-testing-best-practices\u002FLICENSE.md","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvue-testing-best-practices\u002FSKILL.md",[208,209],{"categoryNo":129,"categoryName":130,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":132,"categoryName":133,"taxonomyType":21,"taxonomyTypeDesc":22},[211,136,212,198,213,146,214,215,216,193,217,41,218,219,220,169,221,199,222],"vue testing best practices","testing best practices","best practices","test","testing patterns","component","vitest","mocking","e2e","utils","patterns","e2e testing",{"skillNo":224,"name":225,"nameZh":6,"description":226,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":181,"licenseFileUrl":227,"sourceHtmlUrl":228,"categories":229,"keywords":231,"publishedAt":55},"01M71QD358H2DJ9THJRBP77T3T","vue-router-best-practices","Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvue-router-best-practices\u002FLICENSE.md","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvue-router-best-practices\u002FSKILL.md",[230],{"categoryNo":132,"categoryName":133,"taxonomyType":21,"taxonomyTypeDesc":22},[232,198,233,213,234,216,235,193,221,236,237],"router","vue router best practices","route","guards","navigation","lifecycle",{"skillNo":239,"name":240,"nameZh":6,"description":241,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":181,"licenseFileUrl":242,"sourceHtmlUrl":243,"categories":244,"keywords":246,"publishedAt":55},"01M71QCYPNWDE2MQZ1TF3ED5S4","vue-best-practices","MUST be used for Vue.js tasks. Strongly recommends Composition API with `\u003Cscript setup>` and TypeScript as the standard approach. Covers Vue 3, SSR, Volar, vue-tsc. Load for any Vue, .vue files, Vue Router, Pinia, or Vite with Vue work. ALWAYS use Composition API unless the project explicitly requires Options API.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvue-best-practices\u002FLICENSE.md","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvue-best-practices\u002FSKILL.md",[245],{"categoryNo":132,"categoryName":133,"taxonomyType":21,"taxonomyTypeDesc":22},[247,198,213,248,190,249,250,251,232,252,253,254,255,256,257,41,258,169,259,260],"vue best practices","Composition","files","tasks","api","pinia","work","options","ssr","typescript","as","vite","load","standard"]