$npx -y skills add linzzzzzz/openclip --skill video-clip-extractorProcesses videos to identify engaging moments, generate transcripts, and create highlight clips with artistic titles and custom cover images. Use when user needs to: extract highlights from long videos or livestreams, clip or cut best moments from videos, cut video highlights, pr
| 1 | # Video Clip Extractor Skill |
| 2 | |
| 3 | Run the video orchestrator to process videos and extract engaging highlights. |
| 4 | |
| 5 | ## When Triggered |
| 6 | |
| 7 | 1. **Get the source** — if the user didn't provide a video URL or file path, ask for it. |
| 8 | 2. **Clarify intent** (optional) — if the user wants clips focused on a specific topic, capture it for `--user-intent`. If unclear, ask: "Any specific topic or moments to focus on? (e.g. 'funny moments', 'key arguments')" |
| 9 | 3. **Check environment** — does `video_orchestrator.py` exist in the current directory? If yes, run directly. Otherwise use the global install at `~/.local/share/openclip`. |
| 10 | 4. **Verify prerequisites** — check ffmpeg is installed and at least one API key is set. Warn if missing before running. |
| 11 | 5. **Run the command** and stream output to user. |
| 12 | 6. **Report results** — after completion, list the generated clips with timestamps and titles. |
| 13 | |
| 14 | ## Setup (first use only) |
| 15 | |
| 16 | Before running, determine the execution context: |
| 17 | |
| 18 | 1. **Inside openclip repo** — if `video_orchestrator.py` exists in the current directory, skip setup and run directly. |
| 19 | 2. **Global install** — if `~/.local/share/openclip` does not exist, run these steps: |
| 20 | |
| 21 | **Prerequisites:** `git` and `uv` must be installed. |
| 22 | - Install uv if missing: macOS: `brew install uv` · Linux/Windows: `pip install uv` |
| 23 | |
| 24 | ```bash |
| 25 | git clone https://github.com/linzzzzzz/openclip.git ~/.local/share/openclip |
| 26 | cd ~/.local/share/openclip && uv sync |
| 27 | ``` |
| 28 | |
| 29 | To update openclip later: |
| 30 | ```bash |
| 31 | git -C ~/.local/share/openclip pull && cd ~/.local/share/openclip && uv sync |
| 32 | ``` |
| 33 | |
| 34 | ## Execution |
| 35 | |
| 36 | **If inside the openclip repo** (current directory contains `video_orchestrator.py`): |
| 37 | ```bash |
| 38 | uv run python video_orchestrator.py [options] <source> |
| 39 | ``` |
| 40 | |
| 41 | **If running globally** (from any other directory): |
| 42 | ```bash |
| 43 | cd ~/.local/share/openclip && uv run python video_orchestrator.py -o "$OLDPWD/processed_videos" [options] <source> |
| 44 | ``` |
| 45 | |
| 46 | `$OLDPWD` captures the user's original directory so clips are saved there, not inside the openclip install. |
| 47 | |
| 48 | Where `<source>` is a video URL (Bilibili/YouTube) or local file path (MP4, WebM, AVI, MOV, MKV). |
| 49 | |
| 50 | For local files with existing subtitles, place the `.srt` file in the same directory with the same filename (e.g. `video.mp4` → `video.srt`). |
| 51 | |
| 52 | ## Preflight Checklist |
| 53 | |
| 54 | - **Inside openclip repo**: run from the repo root so relative paths (e.g. `references/`, `prompts/`) resolve correctly |
| 55 | - **`ffmpeg` must be installed** (required for all clip generation): |
| 56 | - macOS: `brew install ffmpeg` |
| 57 | - Ubuntu: `sudo apt install ffmpeg` |
| 58 | - Windows: download from [ffmpeg.org](https://ffmpeg.org) |
| 59 | - If using `--burn-subtitles`: needs ffmpeg with `libass` (see README for details) |
| 60 | - Set one API key: |
| 61 | - `QWEN_API_KEY` (default provider: qwen), or |
| 62 | - `OPENROUTER_API_KEY` (if `--llm-provider openrouter`), or |
| 63 | - `GLM_API_KEY` (if `--llm-provider glm`), or |
| 64 | - `MINIMAX_API_KEY` (if `--llm-provider minimax`) |
| 65 | - If using `--speaker-references`: run `uv sync --extra speakers` and set `HUGGINGFACE_TOKEN` |
| 66 | |
| 67 | ## CLI Reference |
| 68 | |
| 69 | ### Required |
| 70 | |
| 71 | | Argument | Description | |
| 72 | |---|---| |
| 73 | | `source` | Video URL or local file path | |
| 74 | |
| 75 | ### Optional |
| 76 | |
| 77 | | Flag | Default | Description | |
| 78 | |---|---|---| |
| 79 | | `-o`, `--output <dir>` | `processed_videos` | Output directory | |
| 80 | | `--max-clips <n>` | `5` | Maximum number of highlight clips | |
| 81 | | `--browser <browser>` | `firefox` | Browser for cookies: `chrome`, `firefox`, `edge`, `safari` | |
| 82 | | `--title-style <style>` | `fire_flame` | Title style: `gradient_3d`, `neon_glow`, `metallic_gold`, `rainbow_3d`, `crystal_ice`, `fire_flame`, `metallic_silver`, `glowing_plasma`, `stone_carved`, `glass_transparent` | |
| 83 | | `--title-font-size <size>` | `medium` | Font size preset for artistic titles. Options: small(30px), medium(40px), large(50px), xlarge(60px) | |
| 84 | | `--cover-text-location <loc>` | `center` | Cover text position: `top`, `upper_middle`, `bottom`, `center` | |
| 85 | | `--cover-fill-color <color>` | `yellow` | Cover text fill color: `yellow`, `red`, `white`, `cyan`, `green`, `orange`, `pink`, `purple`, `gold`, `silver` | |
| 86 | | `--cover-outline-color <color>` | `black` | Cover text outline color: ` |