--- name: clips description: Turns one long video or podcast (a local file or a YouTube link) into the best 3-5 short vertical clips, each cut and styled in the user's profile style. Transcribes once, splits the talk into candidate clips at sentence boundaries inside the chosen length, scores every candidate in code (speech rate, loudness, laughter, numbers and names said), shows the shortlist on one page with a preview of each, then trims, cuts and style-edits each pick as its own edit. Use when the user says "clip this video", "make shorts from my podcast", "find the best clips", "cut this into TikToks", "turn this YouTube video into reels", "repurpose this long video", or drops a long video (over about 3 minutes) or a YouTube link and wants short clips. Not for editing one short take (that is start or cut), and not for measuring someone else's style (that is creator-teardown). license: MIT compatibility: Python 3.9+, ffmpeg, and the venv (its yt-dlp fetches links), Node and renderer the setup skill installs. Runs from the full ai-editor plugin folder (uses its lib/ and the cut and style-edit skills). --- # Clips Paths: `${CLAUDE_SKILL_DIR}` means the folder containing this SKILL.md, and `${CLAUDE_PLUGIN_ROOT}` the plugin folder two levels above it. Read `${CLAUDE_PLUGIN_ROOT}/PRINCIPLES.md` first: the rules every video in this plugin follows (asking, looking real, motion, story and framing, privacy, cost). Every question to the user goes in the question box: call the AskUserQuestion tool (2-4 options, the recommended one first). Only in an agent without that tool, ask numbered questions in text. One long video in. The best few short clips out, each a finished vertical edit in the user's style. ``` clips// source.mp4 the long video (a symlink for a local file; never modify the original) source.mp3, cover.jpg instead, for an audio-only podcast: its audio and the show's artwork words.raw.json one transcript of the whole thing (never read it) candidates.json every candidate with its features (never read it) shortlist.md the top 8 that do not overlap, about 1,500 tokens: the only file you read shortlist.json the same, for the page picks.html the page the user picks from edits/-clip/ one edit per chosen clip: source.mp4, words.raw.json (re-timed), clip.json ``` Run the scripts with `python3` on Mac and Linux, `py` on Windows. `PY="${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/run.py"`; `python3 "$PY"` below runs the editor's venv Python (`py "$PY"` on Windows). If it is missing, run the `setup` skill first. `K="${CLAUDE_SKILL_DIR}/scripts/clips.py"`, `C="${CLAUDE_PLUGIN_ROOT}/skills/cut/scripts"`, `S="${CLAUDE_PLUGIN_ROOT}/skills/style-edit/scripts"`. ## 0. Ask, once Read the profile and taste first (`python3 "${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/profile.py" show`, `python3 "${CLAUDE_PLUGIN_ROOT}/skills/taste/scripts/taste.py" show`). No profile yet: run the `start` skill's style intake first, so the clips come out in the user's look. Then one question box call, the recommended option first: | question | options | |---|---| | How many clips? | 3 (Recommended) / 5 / 1 | | How long should each be? | 20-40 s (Recommended) / 40-60 s / 60-90 s | | How many people talk in it? | one (Recommended) / two (a podcast or interview) | Skip any the user already answered. These replace the cut skill's "cut first or everything at once" question: clips run straight through, and the user approves the picks and the stills sheets. ## 1. The video A local file (a hard link on the same drive, else a symlink, a copy only as the last resort): ```bash python3 "${CLAUDE_PLUGIN_ROOT}/skills/clips/scripts/clips.py" link "" clips/ ``` A link: ```bash python3 "${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/links.py" fetch "" clips/ --max-height 1080 ``` It uses the venv's yt-dlp (setup installs it there, not on the PATH), caps the download at 1080p (a 1080x1920 clip needs no 4K; a 20-minute talk at 4K is several GB) and prints the file path: `clips//source.mp4`. Exit 3: the site wants a login (YouTube's "confirm you're not a bot"). Ask in the question box before re-running with `--cookies-from-browser chrome` (or their browser). A podcast (RSS feed or Apple Podcasts show link): `route` lists its newest episodes as `ask` options; ask which one in the question box (newest first), then `fetch "