[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DAZBJ9Z46155V8WHG7AEQT":3,"skill-same:01M6DAZBJ9Z46155V8WHG7AEQT":119},{"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":23,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":14,"repositoryHtmlUrl":54,"repositoryHomepageUrl":6,"ownerHtmlUrl":55,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":56,"install":57,"resources":70},"01M6DAZBJ9Z46155V8WHG7AEQT","videodb",null,"See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP\u002Flive feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual\u002Fsemantic\u002Ftemporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text\u002Fimage overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.","Prekzursil\u002Fagent-skills-toolchain","Prekzursil","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F54636077?v=4","01M6DACZ1PCQHD99SCR1YXG28B","Andrei Mihai Visalon","01M6DACZ670WZF535V3WYYSS4Z",0,"MIT","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Flibrary\u002Fskills\u002Fvideodb\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[5,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"read","live","act","alerts","local","time","translation","files","auto","image","text","Bash","Audio","Media","Video","feeds","search","generate","create","2026-11-10 10:12:30",false,"---\nname: videodb\ndescription: See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP\u002Flive feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual\u002Fsemantic\u002Ftemporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text\u002Fimage overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.\norigin: ECC\nallowed-tools: Read Grep Glob Bash(python:*)\nargument-hint: \"[task description]\"\n---\n\n# VideoDB Skill\n\n**Perception + memory + actions for video, live streams, and desktop sessions.**\n\n## When to use\n\n### Desktop Perception\n- Start\u002Fstop a **desktop session** capturing **screen, mic, and system audio**\n- Stream **live context** and store **episodic session memory**\n- Run **real-time alerts\u002Ftriggers** on what's spoken and what's happening on screen\n- Produce **session summaries**, a searchable timeline, and **playable evidence links**\n\n### Video ingest + stream\n- Ingest a **file or URL** and return a **playable web stream link**\n- Transcode\u002Fnormalize: **codec, bitrate, fps, resolution, aspect ratio**\n\n### Index + search (timestamps + evidence)\n- Build **visual**, **spoken**, and **keyword** indexes\n- Search and return exact moments with **timestamps** and **playable evidence**\n- Auto-create **clips** from search results\n\n### Timeline editing + generation\n- Subtitles: **generate**, **translate**, **burn-in**\n- Overlays: **text\u002Fimage\u002Fbranding**, motion captions\n- Audio: **background music**, **voiceover**, **dubbing**\n- Programmatic composition and exports via **timeline operations**\n\n### Live streams (RTSP) + monitoring\n- Connect **RTSP\u002Flive feeds**\n- Run **real-time visual and spoken understanding** and emit **events\u002Falerts** for monitoring workflows\n\n## How it works\n\n### Common inputs\n- Local **file path**, public **URL**, or **RTSP URL**\n- Desktop capture request: **start \u002F stop \u002F summarize session**\n- Desired operations: get context for understanding, transcode spec, index spec, search query, clip ranges, timeline edits, alert rules\n\n### Common outputs\n- **Stream URL**\n- Search results with **timestamps** and **evidence links**\n- Generated assets: subtitles, audio, images, clips\n- **Event\u002Falert payloads** for live streams\n- Desktop **session summaries** and memory entries\n\n### Running Python code\n\nBefore running any VideoDB code, change to the project directory and load environment variables:\n\n```python\nfrom dotenv import load_dotenv\nload_dotenv(\".env\")\n\nimport videodb\nconn = videodb.connect()\n```\n\nThis reads `VIDEO_DB_API_KEY` from:\n1. Environment (if already exported)\n2. Project's `.env` file in current directory\n\nIf the key is missing, `videodb.connect()` raises `AuthenticationError` automatically.\n\nDo NOT write a script file when a short inline command works.\n\nWhen writing inline Python (`python -c \"...\"`), always use properly formatted code — use semicolons to separate statements and keep it readable. For anything longer than ~3 statements, use a heredoc instead:\n\n```bash\npython \u003C\u003C 'EOF'\nfrom dotenv import load_dotenv\nload_dotenv(\".env\")\n\nimport videodb\nconn = videodb.connect()\ncoll = conn.get_collection()\nprint(f\"Videos: {len(coll.get_videos())}\")\nEOF\n```\n\n### Setup\n\nWhen the user asks to \"setup videodb\" or similar:\n\n### 1. Install SDK\n\n```bash\npip install \"videodb[capture]\" python-dotenv\n```\n\nIf `videodb[capture]` fails on Linux, install without the capture extra:\n\n```bash\npip install videodb python-dotenv\n```\n\n### 2. Configure API key\n\nThe user must set `VIDEO_DB_API_KEY` using **either** method:\n\n- **Export in terminal** (before starting Claude): `export VIDEO_DB_API_KEY=your-key`\n- **Project `.env` file**: Save `VIDEO_DB_API_KEY=your-key` in the project's `.env` file\n\nGet a free API key at [console.videodb.io](https:\u002F\u002Fconsole.videodb.io) (50 free uploads, no credit card).\n\n**Do NOT** read, write, or handle the API key yourself. Always let the user set it.\n\n### Quick Reference\n\n### Upload media\n\n```python\n# URL\nvideo = coll.upload(url=\"https:\u002F\u002Fexample.com\u002Fvideo.mp4\")\n\n# YouTube\nvideo = coll.upload(url=\"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=VIDEO_ID\")\n\n# Local file\nvideo = coll.upload(file_path=\"\u002Fpath\u002Fto\u002Fvideo.mp4\")\n```\n\n### Transcript + subtitle\n\n```python\n# force=True skips the error if the video is already indexed\nvideo.index_spoken_words(force=True)\ntext = video.get_transcript_text()\nstream_url = video.add_subtitle()\n```\n\n### Search inside videos\n\n```python\nfrom videodb.exceptions import InvalidRequestError\n\nvideo.index_spoken_words(force=True)\n\n# search() raises InvalidRequestError when no results are found.\n# Always wrap in try\u002Fexcept and treat \"No results found\" as empty.\ntry:\n    results = video.search(\"product demo\")\n    shots = results.get_shots()\n    stream_url = results.compile()\nexcept InvalidRequestError as e:\n    if \"No results found\" in str(e):\n        shots = []\n    else:\n        raise\n```\n\n### Scene search\n\n```python\nimport re\nfrom videodb import SearchType, IndexType, SceneExtractionType\nfrom videodb.exceptions import InvalidRequestError\n\n# index_scenes() has no force parameter — it raises an error if a scene\n# index already exists. Extract the existing index ID from the error.\ntry:\n    scene_index_id = video.index_scenes(\n        extraction_type=SceneExtractionType.shot_based,\n        prompt=\"Describe the visual content in this scene.\",\n    )\nexcept Exception as e:\n    match = re.search(r\"id\\s+([a-f0-9]+)\", str(e))\n    if match:\n        scene_index_id = match.group(1)\n    else:\n        raise\n\n# Use score_threshold to filter low-relevance noise (recommended: 0.3+)\ntry:\n    results = video.search(\n        query=\"person writing on a whiteboard\",\n        search_type=SearchType.semantic,\n        index_type=IndexType.scene,\n        scene_index_id=scene_index_id,\n        score_threshold=0.3,\n    )\n    shots = results.get_shots()\n    stream_url = results.compile()\nexcept InvalidRequestError as e:\n    if \"No results found\" in str(e):\n        shots = []\n    else:\n        raise\n```\n\n### Timeline editing\n\n**Important:** Always validate timestamps before building a timeline:\n- `start` must be >= 0 (negative values are silently accepted but produce broken output)\n- `start` must be \u003C `end`\n- `end` must be \u003C= `video.length`\n\n```python\nfrom videodb.timeline import Timeline\nfrom videodb.asset import VideoAsset, TextAsset, TextStyle\n\ntimeline = Timeline(conn)\ntimeline.add_inline(VideoAsset(asset_id=video.id, start=10, end=30))\ntimeline.add_overlay(0, TextAsset(text=\"The End\", duration=3, style=TextStyle(fontsize=36)))\nstream_url = timeline.generate_stream()\n```\n\n### Transcode video (resolution \u002F quality change)\n\n```python\nfrom videodb import TranscodeMode, VideoConfig, AudioConfig\n\n# Change resolution, quality, or aspect ratio server-side\njob_id = conn.transcode(\n    source=\"https:\u002F\u002Fexample.com\u002Fvideo.mp4\",\n    callback_url=\"https:\u002F\u002Fexample.com\u002Fwebhook\",\n    mode=TranscodeMode.economy,\n    video_config=VideoConfig(resolution=720, quality=23, aspect_ratio=\"16:9\"),\n    audio_config=AudioConfig(mute=False),\n)\n```\n\n### Reframe aspect ratio (for social platforms)\n\n**Warning:** `reframe()` is a slow server-side operation. For long videos it can take\nseveral minutes and may time out. Best practices:\n- Always limit to a short segment using `start`\u002F`end` when possible\n- For full-length videos, use `callback_url` for async processing\n- Trim the video on a `Timeline` first, then reframe the shorter result\n\n```python\nfrom videodb import ReframeMode\n\n# Always prefer reframing a short segment:\nreframed = video.reframe(start=0, end=60, target=\"vertical\", mode=ReframeMode.smart)\n\n# Async reframe for full-length videos (returns None, result via webhook):\nvideo.reframe(target=\"vertical\", callback_url=\"https:\u002F\u002Fexample.com\u002Fwebhook\")\n\n# Presets: \"vertical\" (9:16), \"square\" (1:1), \"landscape\" (16:9)\nreframed = video.reframe(start=0, end=60, target=\"square\")\n\n# Custom dimensions\nreframed = video.reframe(start=0, end=60, target={\"width\": 1280, \"height\": 720})\n```\n\n### Generative media\n\n```python\nimage = coll.generate_image(\n    prompt=\"a sunset over mountains\",\n    aspect_ratio=\"16:9\",\n)\n```\n\n## Error handling\n\n```python\nfrom videodb.exceptions import AuthenticationError, InvalidRequestError\n\ntry:\n    conn = videodb.connect()\nexcept AuthenticationError:\n    print(\"Check your VIDEO_DB_API_KEY\")\n\ntry:\n    video = coll.upload(url=\"https:\u002F\u002Fexample.com\u002Fvideo.mp4\")\nexcept InvalidRequestError as e:\n    print(f\"Upload failed: {e}\")\n```\n\n### Common pitfalls\n\n| Scenario | Error message | Solution |\n|----------|--------------|----------|\n| Indexing an already-indexed video | `Spoken word index for video already exists` | Use `video.index_spoken_words(force=True)` to skip if already indexed |\n| Scene index already exists | `Scene index with id XXXX already exists` | Extract the existing `scene_index_id` from the error with `re.search(r\"id\\s+([a-f0-9]+)\", str(e))` |\n| Search finds no matches | `InvalidRequestError: No results found` | Catch the exception and treat as empty results (`shots = []`) |\n| Reframe times out | Blocks indefinitely on long videos | Use `start`\u002F`end` to limit segment, or pass `callback_url` for async |\n| Negative timestamps on Timeline | Silently produces broken stream | Always validate `start >= 0` before creating `VideoAsset` |\n| `generate_video()` \u002F `create_collection()` fails | `Operation not allowed` or `maximum limit` | Plan-gated features — inform the user about plan limits |\n\n## Examples\n\n### Canonical prompts\n- \"Start desktop capture and alert when a password field appears.\"\n- \"Record my session and produce an actionable summary when it ends.\"\n- \"Ingest this file and return a playable stream link.\"\n- \"Index this folder and find every scene with people, return timestamps.\"\n- \"Generate subtitles, burn them in, and add light background music.\"\n- \"Connect this RTSP URL and alert when a person enters the zone.\"\n\n### Screen Recording (Desktop Capture)\n\nUse `ws_listener.py` to capture WebSocket events during recording sessions. Desktop capture supports **macOS** only.\n\n#### Quick Start\n\n1. **Choose state dir**: `STATE_DIR=\"${VIDEODB_EVENTS_DIR:-$HOME\u002F.local\u002Fstate\u002Fvideodb}\"`\n2. **Start listener**: `VIDEODB_EVENTS_DIR=\"$STATE_DIR\" python scripts\u002Fws_listener.py --clear \"$STATE_DIR\" &`\n3. **Get WebSocket ID**: `cat \"$STATE_DIR\u002Fvideodb_ws_id\"`\n4. **Run capture code** (see reference\u002Fcapture.md for the full workflow)\n5. **Events written to**: `$STATE_DIR\u002Fvideodb_events.jsonl`\n\nUse `--clear` whenever you start a fresh capture run so stale transcript and visual events do not leak into the new session.\n\n#### Query Events\n\n```python\nimport json\nimport os\nimport time\nfrom pathlib import Path\n\nevents_dir = Path(os.environ.get(\"VIDEODB_EVENTS_DIR\", Path.home() \u002F \".local\" \u002F \"state\" \u002F \"videodb\"))\nevents_file = events_dir \u002F \"videodb_events.jsonl\"\nevents = []\n\nif events_file.exists():\n    with events_file.open(encoding=\"utf-8\") as handle:\n        for line in handle:\n            try:\n                events.append(json.loads(line))\n            except json.JSONDecodeError:\n                continue\n\ntranscripts = [e[\"data\"][\"text\"] for e in events if e.get(\"channel\") == \"transcript\"]\ncutoff = time.time() - 300\nrecent_visual = [\n    e for e in events\n    if e.get(\"channel\") == \"visual_index\" and e[\"unix_ts\"] > cutoff\n]\n```\n\n## Additional docs\n\nReference documentation is in the `reference\u002F` directory adjacent to this SKILL.md file. Use the Glob tool to locate it if needed.\n\n- [reference\u002Fapi-reference.md](reference\u002Fapi-reference.md) - Complete VideoDB Python SDK API reference\n- [reference\u002Fsearch.md](reference\u002Fsearch.md) - In-depth guide to video search (spoken word and scene-based)\n- [reference\u002Feditor.md](reference\u002Feditor.md) - Timeline editing, assets, and composition\n- [reference\u002Fstreaming.md](reference\u002Fstreaming.md) - HLS streaming and instant playback\n- [reference\u002Fgenerative.md](reference\u002Fgenerative.md) - AI-powered media generation (images, video, audio)\n- [reference\u002Frtstream.md](reference\u002Frtstream.md) - Live stream ingestion workflow (RTSP\u002FRTMP)\n- [reference\u002Frtstream-reference.md](reference\u002Frtstream-reference.md) - RTStream SDK methods and AI pipelines\n- [reference\u002Fcapture.md](reference\u002Fcapture.md) - Desktop capture workflow\n- [reference\u002Fcapture-reference.md](reference\u002Fcapture-reference.md) - Capture SDK and WebSocket events\n- [reference\u002Fuse-cases.md](reference\u002Fuse-cases.md) - Common video processing patterns and examples\n\n**Do not use ffmpeg, moviepy, or local encoding tools** when VideoDB supports the operation. The following are all handled server-side by VideoDB — trimming, combining clips, overlaying audio or music, adding subtitles, text\u002Fimage overlays, transcoding, resolution changes, aspect-ratio conversion, resizing for platform requirements, transcription, and media generation. Only fall back to local tools for operations listed under Limitations in reference\u002Feditor.md (transitions, speed changes, crop\u002Fzoom, colour grading, volume mixing).\n\n### When to use what\n\n| Problem | VideoDB solution |\n|---------|-----------------|\n| Platform rejects video aspect ratio or resolution | `video.reframe()` or `conn.transcode()` with `VideoConfig` |\n| Need to resize video for Twitter\u002FInstagram\u002FTikTok | `video.reframe(target=\"vertical\")` or `target=\"square\"` |\n| Need to change resolution (e.g. 1080p → 720p) | `conn.transcode()` with `VideoConfig(resolution=720)` |\n| Need to overlay audio\u002Fmusic on video | `AudioAsset` on a `Timeline` |\n| Need to add subtitles | `video.add_subtitle()` or `CaptionAsset` |\n| Need to combine\u002Ftrim clips | `VideoAsset` on a `Timeline` |\n| Need to generate voiceover, music, or SFX | `coll.generate_voice()`, `generate_music()`, `generate_sound_effect()` |\n\n## Provenance\n\nReference material for this skill is vendored locally under `skills\u002Fvideodb\u002Freference\u002F`.\nUse the local copies above instead of following external repository links at runtime.\n\n**Maintained By:** [VideoDB](https:\u002F\u002Fwww.videodb.io\u002F)\n","# VideoDB Skill\n\n**Perception + memory + actions for video, live streams, and desktop sessions.**\n\n## When to use\n\n### Desktop Perception\n- Start\u002Fstop a **desktop session** capturing **screen, mic, and system audio**\n- Stream **live context** and store **episodic session memory**\n- Run **real-time alerts\u002Ftriggers** on what's spoken and what's happening on screen\n- Produce **session summaries**, a searchable timeline, and **playable evidence links**\n\n### Video ingest + stream\n- Ingest a **file or URL** and return a **playable web stream link**\n- Transcode\u002Fnormalize: **codec, bitrate, fps, resolution, aspect ratio**\n\n### Index + search (timestamps + evidence)\n- Build **visual**, **spoken**, and **keyword** indexes\n- Search and return exact moments with **timestamps** and **playable evidence**\n- Auto-create **clips** from search results\n\n### Timeline editing + generation\n- Subtitles: **generate**, **translate**, **burn-in**\n- Overlays: **text\u002Fimage\u002Fbranding**, motion captions\n- Audio: **background music**, **voiceover**, **dubbing**\n- Programmatic composition and exports via **timeline operations**\n\n### Live streams (RTSP) + monitoring\n- Connect **RTSP\u002Flive feeds**\n- Run **real-time visual and spoken understanding** and emit **events\u002Falerts** for monitoring workflows\n\n## How it works\n\n### Common inputs\n- Local **file path**, public **URL**, or **RTSP URL**\n- Desktop capture request: **start \u002F stop \u002F summarize session**\n- Desired operations: get context for understanding, transcode spec, index spec, search query, clip ranges, timeline edits, alert rules\n\n### Common outputs\n- **Stream URL**\n- Search results with **timestamps** and **evidence links**\n- Generated assets: subtitles, audio, images, clips\n- **Event\u002Falert payloads** for live streams\n- Desktop **session summaries** and memory entries\n\n### Running Python code\n\nBefore running any VideoDB code, change to the project directory and load environment variables:\n\n```python\nfrom dotenv import load_dotenv\nload_dotenv(\".env\")\n\nimport videodb\nconn = videodb.connect()\n```\n\nThis reads `VIDEO_DB_API_KEY` from:\n1. Environment (if already exported)\n2. Project's `.env` file in current directory\n\nIf the key is missing, `videodb.connect()` raises `AuthenticationError` automatically.\n\nDo NOT write a script file when a short inline command works.\n\nWhen writing inline Python (`python -c \"...\"`), always use properly formatted code — use semicolons to separate statements and keep it readable. For anything longer than ~3 statements, use a heredoc instead:\n\n```bash\npython \u003C\u003C 'EOF'\nfrom dotenv import load_dotenv\nload_dotenv(\".env\")\n\nimport videodb\nconn = videodb.connect()\ncoll = conn.get_collection()\nprint(f\"Videos: {len(coll.get_videos())}\")\nEOF\n```\n\n### Setup\n\nWhen the user asks to \"setup videodb\" or similar:\n\n### 1. Install SDK\n\n```bash\npip install \"videodb[capture]\" python-dotenv\n```\n\nIf `videodb[capture]` fails on Linux, install without the capture extra:\n\n```bash\npip install videodb python-dotenv\n```\n\n### 2. Configure API key\n\nThe user must set `VIDEO_DB_API_KEY` using **either** method:\n\n- **Export in terminal** (before starting Claude): `export VIDEO_DB_API_KEY=your-key`\n- **Project `.env` file**: Save `VIDEO_DB_API_KEY=your-key` in the project's `.env` file\n\nGet a free API key at [console.videodb.io](https:\u002F\u002Fconsole.videodb.io) (50 free uploads, no credit card).\n\n**Do NOT** read, write, or handle the API key yourself. Always let the user set it.\n\n### Quick Reference\n\n### Upload media\n\n```python\n# URL\nvideo = coll.upload(url=\"https:\u002F\u002Fexample.com\u002Fvideo.mp4\")\n\n# YouTube\nvideo = coll.upload(url=\"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=VIDEO_ID\")\n\n# Local file\nvideo = coll.upload(file_path=\"\u002Fpath\u002Fto\u002Fvideo.mp4\")\n```\n\n### Transcript + subtitle\n\n```python\n# force=True skips the error if the video is already indexed\nvideo.index_spoken_words(force=True)\ntext = video.get_transcript_text()\nstream_url = video.add_subtitle()\n```\n\n### Search inside videos\n\n```python\nfrom videodb.exceptions import InvalidRequestError\n\nvideo.index_spoken_words(force=True)\n\n# search() raises InvalidRequestError when no results are found.\n# Always wrap in try\u002Fexcept and treat \"No results found\" as empty.\ntry:\n    results = video.search(\"product demo\")\n    shots = results.get_shots()\n    stream_url = results.compile()\nexcept InvalidRequestError as e:\n    if \"No results found\" in str(e):\n        shots = []\n    else:\n        raise\n```\n\n### Scene search\n\n```python\nimport re\nfrom videodb import SearchType, IndexType, SceneExtractionType\nfrom videodb.exceptions import InvalidRequestError\n\n# index_scenes() has no force parameter — it raises an error if a scene\n# index already exists. Extract the existing index ID from the error.\ntry:\n    scene_index_id = video.index_scenes(\n        extraction_type=SceneExtractionType.shot_based,\n        prompt=\"Describe the visual content in this scene.\",\n    )\nexcept Exception as e:\n    match = re.search(r\"id\\s+([a-f0-9]+)\", str(e))\n    if match:\n        scene_index_id = match.group(1)\n    else:\n        raise\n\n# Use score_threshold to filter low-relevance noise (recommended: 0.3+)\ntry:\n    results = video.search(\n        query=\"person writing on a whiteboard\",\n        search_type=SearchType.semantic,\n        index_type=IndexType.scene,\n        scene_index_id=scene_index_id,\n        score_threshold=0.3,\n    )\n    shots = results.get_shots()\n    stream_url = results.compile()\nexcept InvalidRequestError as e:\n    if \"No results found\" in str(e):\n        shots = []\n    else:\n        raise\n```\n\n### Timeline editing\n\n**Important:** Always validate timestamps before building a timeline:\n- `start` must be >= 0 (negative values are silently accepted but produce broken output)\n- `start` must be \u003C `end`\n- `end` must be \u003C= `video.length`\n\n```python\nfrom videodb.timeline import Timeline\nfrom videodb.asset import VideoAsset, TextAsset, TextStyle\n\ntimeline = Timeline(conn)\ntimeline.add_inline(VideoAsset(asset_id=video.id, start=10, end=30))\ntimeline.add_overlay(0, TextAsset(text=\"The End\", duration=3, style=TextStyle(fontsize=36)))\nstream_url = timeline.generate_stream()\n```\n\n### Transcode video (resolution \u002F quality change)\n\n```python\nfrom videodb import TranscodeMode, VideoConfig, AudioConfig\n\n# Change resolution, quality, or aspect ratio server-side\njob_id = conn.transcode(\n    source=\"https:\u002F\u002Fexample.com\u002Fvideo.mp4\",\n    callback_url=\"https:\u002F\u002Fexample.com\u002Fwebhook\",\n    mode=TranscodeMode.economy,\n    video_config=VideoConfig(resolution=720, quality=23, aspect_ratio=\"16:9\"),\n    audio_config=AudioConfig(mute=False),\n)\n```\n\n### Reframe aspect ratio (for social platforms)\n\n**Warning:** `reframe()` is a slow server-side operation. For long videos it can take\nseveral minutes and may time out. Best practices:\n- Always limit to a short segment using `start`\u002F`end` when possible\n- For full-length videos, use `callback_url` for async processing\n- Trim the video on a `Timeline` first, then reframe the shorter result\n\n```python\nfrom videodb import ReframeMode\n\n# Always prefer reframing a short segment:\nreframed = video.reframe(start=0, end=60, target=\"vertical\", mode=ReframeMode.smart)\n\n# Async reframe for full-length videos (returns None, result via webhook):\nvideo.reframe(target=\"vertical\", callback_url=\"https:\u002F\u002Fexample.com\u002Fwebhook\")\n\n# Presets: \"vertical\" (9:16), \"square\" (1:1), \"landscape\" (16:9)\nreframed = video.reframe(start=0, end=60, target=\"square\")\n\n# Custom dimensions\nreframed = video.reframe(start=0, end=60, target={\"width\": 1280, \"height\": 720})\n```\n\n### Generative media\n\n```python\nimage = coll.generate_image(\n    prompt=\"a sunset over mountains\",\n    aspect_ratio=\"16:9\",\n)\n```\n\n## Error handling\n\n```python\nfrom videodb.exceptions import AuthenticationError, InvalidRequestError\n\ntry:\n    conn = videodb.connect()\nexcept AuthenticationError:\n    print(\"Check your VIDEO_DB_API_KEY\")\n\ntry:\n    video = coll.upload(url=\"https:\u002F\u002Fexample.com\u002Fvideo.mp4\")\nexcept InvalidRequestError as e:\n    print(f\"Upload failed: {e}\")\n```\n\n### Common pitfalls\n\n| Scenario | Error message | Solution |\n|----------|--------------|----------|\n| Indexing an already-indexed video | `Spoken word index for video already exists` | Use `video.index_spoken_words(force=True)` to skip if already indexed |\n| Scene index already exists | `Scene index with id XXXX already exists` | Extract the existing `scene_index_id` from the error with `re.search(r\"id\\s+([a-f0-9]+)\", str(e))` |\n| Search finds no matches | `InvalidRequestError: No results found` | Catch the exception and treat as empty results (`shots = []`) |\n| Reframe times out | Blocks indefinitely on long videos | Use `start`\u002F`end` to limit segment, or pass `callback_url` for async |\n| Negative timestamps on Timeline | Silently produces broken stream | Always validate `start >= 0` before creating `VideoAsset` |\n| `generate_video()` \u002F `create_collection()` fails | `Operation not allowed` or `maximum limit` | Plan-gated features — inform the user about plan limits |\n\n## Examples\n\n### Canonical prompts\n- \"Start desktop capture and alert when a password field appears.\"\n- \"Record my session and produce an actionable summary when it ends.\"\n- \"Ingest this file and return a playable stream link.\"\n- \"Index this folder and find every scene with people, return timestamps.\"\n- \"Generate subtitles, burn them in, and add light background music.\"\n- \"Connect this RTSP URL and alert when a person enters the zone.\"\n\n### Screen Recording (Desktop Capture)\n\nUse `ws_listener.py` to capture WebSocket events during recording sessions. Desktop capture supports **macOS** only.\n\n#### Quick Start\n\n1. **Choose state dir**: `STATE_DIR=\"${VIDEODB_EVENTS_DIR:-$HOME\u002F.local\u002Fstate\u002Fvideodb}\"`\n2. **Start listener**: `VIDEODB_EVENTS_DIR=\"$STATE_DIR\" python scripts\u002Fws_listener.py --clear \"$STATE_DIR\" &`\n3. **Get WebSocket ID**: `cat \"$STATE_DIR\u002Fvideodb_ws_id\"`\n4. **Run capture code** (see reference\u002Fcapture.md for the full workflow)\n5. **Events written to**: `$STATE_DIR\u002Fvideodb_events.jsonl`\n\nUse `--clear` whenever you start a fresh capture run so stale transcript and visual events do not leak into the new session.\n\n#### Query Events\n\n```python\nimport json\nimport os\nimport time\nfrom pathlib import Path\n\nevents_dir = Path(os.environ.get(\"VIDEODB_EVENTS_DIR\", Path.home() \u002F \".local\" \u002F \"state\" \u002F \"videodb\"))\nevents_file = events_dir \u002F \"videodb_events.jsonl\"\nevents = []\n\nif events_file.exists():\n    with events_file.open(encoding=\"utf-8\") as handle:\n        for line in handle:\n            try:\n                events.append(json.loads(line))\n            except json.JSONDecodeError:\n                continue\n\ntranscripts = [e[\"data\"][\"text\"] for e in events if e.get(\"channel\") == \"transcript\"]\ncutoff = time.time() - 300\nrecent_visual = [\n    e for e in events\n    if e.get(\"channel\") == \"visual_index\" and e[\"unix_ts\"] > cutoff\n]\n```\n\n## Additional docs\n\nReference documentation is in the `reference\u002F` directory adjacent to this SKILL.md file. Use the Glob tool to locate it if needed.\n\n- [reference\u002Fapi-reference.md](reference\u002Fapi-reference.md) - Complete VideoDB Python SDK API reference\n- [reference\u002Fsearch.md](reference\u002Fsearch.md) - In-depth guide to video search (spoken word and scene-based)\n- [reference\u002Feditor.md](reference\u002Feditor.md) - Timeline editing, assets, and composition\n- [reference\u002Fstreaming.md](reference\u002Fstreaming.md) - HLS streaming and instant playback\n- [reference\u002Fgenerative.md](reference\u002Fgenerative.md) - AI-powered media generation (images, video, audio)\n- [reference\u002Frtstream.md](reference\u002Frtstream.md) - Live stream ingestion workflow (RTSP\u002FRTMP)\n- [reference\u002Frtstream-reference.md](reference\u002Frtstream-reference.md) - RTStream SDK methods and AI pipelines\n- [reference\u002Fcapture.md](reference\u002Fcapture.md) - Desktop capture workflow\n- [reference\u002Fcapture-reference.md](reference\u002Fcapture-reference.md) - Capture SDK and WebSocket events\n- [reference\u002Fuse-cases.md](reference\u002Fuse-cases.md) - Common video processing patterns and examples\n\n**Do not use ffmpeg, moviepy, or local encoding tools** when VideoDB supports the operation. The following are all handled server-side by VideoDB — trimming, combining clips, overlaying audio or music, adding subtitles, text\u002Fimage overlays, transcoding, resolution changes, aspect-ratio conversion, resizing for platform requirements, transcription, and media generation. Only fall back to local tools for operations listed under Limitations in reference\u002Feditor.md (transitions, speed changes, crop\u002Fzoom, colour grading, volume mixing).\n\n### When to use what\n\n| Problem | VideoDB solution |\n|---------|-----------------|\n| Platform rejects video aspect ratio or resolution | `video.reframe()` or `conn.transcode()` with `VideoConfig` |\n| Need to resize video for Twitter\u002FInstagram\u002FTikTok | `video.reframe(target=\"vertical\")` or `target=\"square\"` |\n| Need to change resolution (e.g. 1080p → 720p) | `conn.transcode()` with `VideoConfig(resolution=720)` |\n| Need to overlay audio\u002Fmusic on video | `AudioAsset` on a `Timeline` |\n| Need to add subtitles | `video.add_subtitle()` or `CaptionAsset` |\n| Need to combine\u002Ftrim clips | `VideoAsset` on a `Timeline` |\n| Need to generate voiceover, music, or SFX | `coll.generate_voice()`, `generate_music()`, `generate_sound_effect()` |\n\n## Provenance\n\nReference material for this skill is vendored locally under `skills\u002Fvideodb\u002Freference\u002F`.\nUse the local copies above instead of following external repository links at runtime.\n\n**Maintained By:** [VideoDB](https:\u002F\u002Fwww.videodb.io\u002F)\n",{"name":5,"origin":48,"description":7,"allowed-tools":49,"argument-hint":50},"ECC","Read Grep Glob Bash(python:*)","[task description]","main","a298c929b6cbd662e1fce54302ce520d5ceea1a5",".agents\u002Flibrary\u002Fskills\u002Fvideodb","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain","https:\u002F\u002Fgithub.com\u002FPrekzursil","2026-11-02 14:30:57",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add Prekzursil\u002Fagent-skills-toolchain --skill videodb",{"tool":63,"command":64},"bunx","bunx skills add Prekzursil\u002Fagent-skills-toolchain --skill videodb",{"tool":66,"command":67},"pnpm","pnpm dlx skills add Prekzursil\u002Fagent-skills-toolchain --skill videodb","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Flibrary\u002Fskills\u002Fvideodb\u002FSKILL.md",true,[71,77,81,85,89,93,97,101,105,109,113],{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"reference\u002Fapi-reference.md","REFERENCE","参考文档",20455,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Flibrary\u002Fskills\u002Fvideodb\u002Freference\u002Fapi-reference.md",{"path":78,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":79,"sourceHtmlUrl":80},"reference\u002Fcapture-reference.md",12190,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Flibrary\u002Fskills\u002Fvideodb\u002Freference\u002Fcapture-reference.md",{"path":82,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":83,"sourceHtmlUrl":84},"reference\u002Fcapture.md",4847,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Flibrary\u002Fskills\u002Fvideodb\u002Freference\u002Fcapture.md",{"path":86,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":87,"sourceHtmlUrl":88},"reference\u002Feditor.md",16558,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Flibrary\u002Fskills\u002Fvideodb\u002Freference\u002Feditor.md",{"path":90,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":91,"sourceHtmlUrl":92},"reference\u002Fgenerative.md",10263,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Flibrary\u002Fskills\u002Fvideodb\u002Freference\u002Fgenerative.md",{"path":94,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":95,"sourceHtmlUrl":96},"reference\u002Frtstream-reference.md",15288,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Flibrary\u002Fskills\u002Fvideodb\u002Freference\u002Frtstream-reference.md",{"path":98,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":99,"sourceHtmlUrl":100},"reference\u002Frtstream.md",1881,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Flibrary\u002Fskills\u002Fvideodb\u002Freference\u002Frtstream.md",{"path":102,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":103,"sourceHtmlUrl":104},"reference\u002Fsearch.md",7928,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Flibrary\u002Fskills\u002Fvideodb\u002Freference\u002Fsearch.md",{"path":106,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":107,"sourceHtmlUrl":108},"reference\u002Fstreaming.md",11867,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Flibrary\u002Fskills\u002Fvideodb\u002Freference\u002Fstreaming.md",{"path":110,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":111,"sourceHtmlUrl":112},"reference\u002Fuse-cases.md",4451,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Flibrary\u002Fskills\u002Fvideodb\u002Freference\u002Fuse-cases.md",{"path":114,"resourceType":115,"resourceTypeDesc":116,"sizeBytes":117,"sourceHtmlUrl":118},"scripts\u002Fws_listener.py","SCRIPT","脚本",8422,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Flibrary\u002Fskills\u002Fvideodb\u002Fscripts\u002Fws_listener.py",[120,142,170,197,211,227],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":43},"01M6DF7D7478R55P46REYH4QAC","clarify-requirements","Resolve genuine pre-execution ambiguity by scanning repo context, generating 1-6 grounded options, and asking 1-3 focused questions via AskUserQuestion. NOT for mid-task use (injection risk); NOT when the goal is already unambiguous; use to disambiguate vague prompts before any file edits.","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Fworkspace-hooks\u002Fskills\u002Fclarify-requirements\u002FSKILL.md",[],[127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],"clarify requirements","clarify","requirements","risk","options","task","prompts","goal","scanning","use","context","repo","injection","execution","file",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":151,"publishedAt":43},"01M6DF79CA4BHJS66J8EZDBPWJ","openmm-md","Run FREE, open-source, Windows-native GPU molecular dynamics via the openmm-md MCP (OpenMM + CUDA on the local NVIDIA GPU). Use for protein \u002F protein-ligand MD when you want a free stack or are on Windows without a Schrodinger license. Covers the full workflow (prepare, solvate, minimize, equilibrate, production, analyze, mmgbsa) AND an honest decision guide vs Schrodinger Desmond, including how to run Desmond legitimately on Linux or a cloud GPU with a real license. This is a deliberately LESSER free alternative and does NOT replace the schrodinger MCP tools. Do NOT use it to pick a free tool when a validated FEP+, WaterMap, IFD-MD, or Prime MM-GBSA result is actually required.","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Fmcp\u002Fopenmm-md-mcp\u002Fskill\u002Fopenmm-md\u002FSKILL.md",[148],{"categoryNo":149,"categoryName":150,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[152,153,154,155,156,157,158,159,160,161,162,163,164,165,136,166,167,28,168,169],"openmm md","how","decision","pick","linux","analyze","tool","stack","open","NVIDIA","gpu","license","workflow","windows","free","molecular dynamics","do","MCP",{"skillNo":171,"name":172,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":174,"categories":175,"keywords":182,"publishedAt":43},"01M6DF76C1MG85VEWP8VZCBNMN","visual-review","Take screenshots of web pages and UI using Playwright for visual review and iteration","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fvisual-review\u002FSKILL.md",[176,179],{"categoryNo":177,"categoryName":178,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":180,"categoryName":181,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",[183,184,185,186,187,188,189,190,191,192,153,193,194,195,196],"review","visual","visual review","pages","web","false","iteration","take","check","slides","ui","screenshot","playwright","screenshots",{"skillNo":198,"name":199,"nameZh":6,"description":200,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":201,"categories":202,"keywords":203,"publishedAt":43},"01M6DF73AQVCBZKEN0YXEX9FXP","status","Diagnostic status report — shows metaswarm installation state, project setup, and potential issues","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fstatus\u002FSKILL.md",[],[199,204,205,206,207,208,209,210],"setup","report","project","installation","project setup","issues","state",{"skillNo":212,"name":213,"nameZh":6,"description":214,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":215,"categories":216,"keywords":218,"publishedAt":43},"01M6DF6X6C2XB0P6GX76P7TTYV","start","Use when starting work on any task, when the user mentions metaswarm, or when the user wants to begin tracked development work","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fstart\u002FSKILL.md",[217],{"categoryNo":149,"categoryName":150,"taxonomyType":21,"taxonomyTypeDesc":22},[213,219,132,220,221,222,136,223,224,225,226],"start issue","issue","ready","work on issue","user","work","work on","development",{"skillNo":228,"name":204,"nameZh":6,"description":229,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":230,"categories":231,"keywords":232,"publishedAt":43},"01M6DF6QMJ9AJKFKHHKRT005PQ","Interactive project setup — detects your project, configures metaswarm, writes project-local files","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fsetup\u002FSKILL.md",[],[204,206,28,31,208,233],"interactive"]