Communitygithub.com

Manish-D12/prompt-to-motion

Learn a creator's or channel's video style from reference YouTube links and save it as a new project skill (story structure, narration voice, visual language, Remotion recipes). Use when the user says "learn creator X from these", "study these videos", "make a skill in the style of …", or pastes reference video links to imitate.

Qu'est-ce que prompt-to-motion ?

prompt-to-motion is a Claude Code agent skill that learn a creator's or channel's video style from reference YouTube links and save it as a new project skill (story structure, narration voice, visual language, Remotion recipes). Use when the user says "learn creator X from these", "study these videos", "make a skill in the style of …", or pastes reference video links to imitate.

Compatible avec✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Manish-D12/prompt-to-motion/tree/HEAD/.claude/skills/study-reference

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Study reference videos → creator-style skill

Turns 3–5 reference videos into .claude/skills/<creator>/SKILL.md, in the same shape as the existing fireship and johnny-harris skills (read one first as the template).

0. Check the input

  • Verify the links match the creator. Read the uploader from metadata before analysing. If the videos belong to someone else, stop and ask — the name is the user's label, but the content defines the style.
  • 3 videos is the minimum; mix formats (short/long, topics) so the skill captures what's constant, not one video's quirks.
  • Tools: yt-dlp (pip install yt-dlp if missing) and ffmpeg. Work in the scratchpad, one fresh directory per creator; never in the repo.

1. Metadata + transcripts (STORY, VOICE)

mkdir -p "$SCRATCH/dl/<creator>" && cd "$SCRATCH/dl/<creator>"
yt-dlp --skip-download --write-subs --write-auto-subs --sub-langs "en.*,en" --sub-format vtt \
  --write-info-json -o "%(id)s.%(ext)s" <url1> <url2> <url3>
  • YouTube rate-limits subtitle languages (HTTP 429). As long as one English track per video arrived, ignore the errors; re-run --write-info-json alone for any video missing metadata.
  • Prefer creator-uploaded tracks (<id>.en-<hash>.vtt or <id>.en.vtt when no en-orig auto track exists); fall back to auto captions.
  • Print title, channel, duration, upload date and chapters from each .info.json (node -e + require) — chapter names are a strong signal of story structure.
  • Convert captions to readable timestamped text:
node .claude/skills/study-reference/scripts/vtt2txt.mjs <id>.en.vtt "$SCRATCH/analysis/<id>.txt" 10   # 5 for <3 min videos, 20 for long ones

Read every transcript in full. Extract: cold-open pattern, beat order and proportions, recurring phrases and verbal tics, how jokes/asides land, how claims are sourced, how it ends. Compute words-per-minute (words ÷ duration).

2. Video + contact sheets (VISUAL)

mkdir -p "$SCRATCH/video/<creator>" && cd "$SCRATCH/video/<creator>"
yt-dlp -f "bv*[height<=720]+ba/b[height<=720]" --merge-output-format mp4 --sleep-requests 1 --retries 10 \
  -o "%(id)s.%(ext)s" <url1> <url2> <url3>

Timestamped sheets (drawtext works without a fontfile on the Windows ffmpeg builds; ignore the fontconfig warning):

TS="drawtext=text='%{pts\:hms}':x=6:y=6:fontsize=20:fontcolor=yellow:box=1:[email protected]"
# Short videos: every 2s, 6×4 tiles (48s per sheet)
ffmpeg -v error -i <id>.mp4 -vf "fps=1/2,scale=400:-2,$TS,tile=6x4:padding=4:color=white" "$SCRATCH/sheets/<id>-%02d.jpg"
# Long videos: overview every 15s, 8×5 tiles …
ffmpeg -v error -i <id>.mp4 -vf "fps=1/15,scale=320:-2,$TS,tile=8x5:padding=3:color=white" "$SCRATCH/sheets/<id>-ov-%02d.jpg"
# … plus dense 2s sheets of 48s windows chosen from the transcript (cold open, a mechanism explainer, a chart, a history segment)
ffmpeg -v error -ss <sec> -t 48 -i <id>.mp4 -vf "fps=1/2,scale=400:-2,$TS,tile=6x4:padding=4:color=white" -frames:v 1 "$SCRATCH/sheets/<id>-dense-<name>.jpg"

Pacing — cuts and average shot length:

ffmpeg -hide_banner -i <id>.mp4 -vf "scale=320:-2,select='gt(scene,0.3)',showinfo" -an -f null - 2>&1 | grep -c pts_time

Note that a low cut count can hide a fast pace (elements popping onto a static canvas) — say which it is.

Look at the sheets and record: backgrounds and palette (hex estimates), type (find the closest fonts that exist in node_modules/@remotion/google-fonts/dist/esm/<Name>.mjs), framing, recurring graphic devices, how data and sources are shown, transitions and motion feel.

3. Clean up

Delete the downloaded videos once the sheets and cut counts exist (rm the mp4s and the video/ dir). Transcripts and sheets may stay in the scratchpad; never copy frames or video into the repo.

4. Write the skill

.claude/skills/<creator-kebab>/SKILL.md:

---
name: <creator-kebab>
description: <what the style is, in one sentence> Use when the user asks for "<creator> style", <format keywords>…
---
# <Creator> — <format>
Learned from: <titles (year, runtime)>.  Load remotion-best-practices as well when building.
## The one-line essence
## STORY — structure        (beat table with time/share, rules, devices)
## VOICE — narration        (wpm, tics, rhetorical moves, quoted micro-examples ≤ 1 line each, script template)
## VISUAL — what the frames look like   (measured pacing first, then stage/type/palette/devices/motion)
## Remotion recipes         (theme.ts tokens with verified google-fonts imports, one-line specs per building block, timing rules)
## Do / Don't

Rules:

  • Paraphrase; quote only short phrases that define the voice. No long transcript excerpts.
  • Every claim in VISUAL should trace to a sheet you looked at; every number (wpm, shot length, runtime) to a measurement.
  • Building blocks must fit this repo's idiom: frame-driven interpolate/spring, tokens in a theme.ts, no CSS animations.
  • Report back with the measured numbers and anything that didn't work (rate limits, missing captions).

Individual skills in this repo

This repo contains 2 individual skills — each has its own dedicated page.

Skills associés