Communitygithub.com

reel

Make a narrated, animated explainer reel (1080x1920, 25–45 s) entirely in code for Instagram Reels, TikTok or YouTube Shorts. A spoken hook in the first second, one idea per beat, word-synced captions, procedural score and foley, and every word kept inside the app's safe frame (a gate fails the build if text would sit under the like rail, username or caption). Narration from ElevenLabs, OpenAI, Gemini, or a free offline voice. Use when the user wants a reel, short, TikTok, explainer video, "turn this topic / post / thread into a video", or an animated version of a fact, study or idea. Not for editing footage the user already shot (use a video editor) or for still carousels (use the carousel skill).

What is reel?

reel is a Codex agent skill that make a narrated, animated explainer reel (1080x1920, 25–45 s) entirely in code for Instagram Reels, TikTok or YouTube Shorts. A spoken hook in the first second, one idea per beat, word-synced captions, procedural score and foley, and every word kept inside the app's safe frame (a gate fails the build if text would sit under the like rail, username or caption). Narration from ElevenLabs, OpenAI, Gemini, or a free offline voice. Use when the user wants a reel, short, TikTok, explainer video, "turn this topic / post / thread into a video", or an animated version of a fact, study or idea. Not for editing footage the user already shot (use a video editor) or for still carousels (use the carousel skill).

Works with~Claude Code✓Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/xnarik/scrollstop/tree/HEAD/plugin/skills/reel

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

scrollstop · reel

One reel = one idea told in 6–8 short beats (70–100 spoken words, 25–45 s). Every frame is drawn by code as a pure function of time, so picture, captions, music and sound effects all lock to the narration's word timings. Nothing is generated by a video model and nothing is stock: you write the script, the page that draws it, and the sound cues.

What the user gets (in <project>/out/):

<slug>.mp4                  1080×1920 · 30 fps · H.264 High · AAC 256k · -14 LUFS · supersampled 2×
<slug>-cover.png            the cover frame (upload it as the custom cover)
<slug>-first-second.png     frames at 0.0 / 0.5 / 1.0 / 1.5 s, for the stranger test
<slug>-caption.txt          the caption + alt text

The rules that override everything

  1. Every word sits inside the safe frame. Each app covers parts of the video with its own controls (template/platforms.json). render.mjs refuses to render while any text box (captions, badges, labels drawn in the art) leaves it. Never pass --no-safe to ship.
  2. The first 3 seconds hold two things: the spoken hook (as captions) and one moving picture. No badge, label, number or logo before chromeAt (3.0 s). The gate checks this too. The video starts in motion; the cover is never the first frame.
  3. The hook speaks to the viewer ("you", their body, money, day, or an instruction: "Try to…") and opens a gap the reel closes. Never a topic label or a title. Score it with node hookscore.mjs; ship only 8/10 or more.
  4. Something changes every 2–3 s; the picture never freezes, even in pauses (qa.mjs fails a still run over 0.6 s).
  5. Text holds still while it's read. Words appear, then stay put. Nothing scrolls under the eye.
  6. One send moment ("Send this to the friend who…") and a loop line that leads back into the hook.
  7. Claims never exceed the evidence. Check every fact against a primary source before writing. "In mice" stays "in mice". A number you can't source doesn't go on screen; an illustration is labelled as one.

Workflow

0. One round of questions (only what you can't decide)

Ask once, together: the topic or source (if not given), the platform (Instagram / TikTok / Shorts / all; default Instagram), the voice (an engine key they have, or the free offline voice), and their brand (wordmark, @handle, colours) unless a brand.json already exists in their folder. Don't ask about style or length: decide them.

1. Set up the project

cp -R "<this skill's folder>/template" "<slug>" && cd "<slug>"
npm install && npx playwright install chromium     # first time only
ffmpeg -version                                    # must exist (brew install ffmpeg / apt install ffmpeg)

Copy the user's brand.json over the template's if they have one. The template ships with a finished demo reel (the tickle explainer): node tts.mjs && node render.mjs renders it, which is the quickest way to prove the toolchain works.

2. Topic and facts

Score the topic 0–2 each: Universal (nearly everyone has felt it), Counterintuitive (it flips a belief), Sendable (someone would forward it to one person), Fresh. Drop it if Universal or Sendable is 0, or the total is under 6, and say why. Then verify every claim on the web against primary sources; note the honest caveats (they go in the caption) and the exact numbers you are allowed to show.

3. Hooks

Write 5–8 hook lines and run node hookscore.mjs hooks.txt. Show the user the top 3 with scores; take the top one if nobody answers, and say so. Formulas and failures: references/retention.md.

4. Script (script.json)

6–8 scenes: hook (no badge) → stakes → 2–3 mechanism / evidence beats → turn by ~65 % ("pause": 0.42 before it) → payoff → send → loop. Each scene has an id, text, and (after the hook) a badge ["icon", "Label ≤ 18 chars"]. Mark 1–2 *keywords* per scene: they're highlighted in the captions and they're where the animation hits. Write extremely simply: one idea per beat, sentences ≤ 12 words, grade ≤ 6, say who did what ("Researchers asked 19,000 adults…"), never an answer-only fragment ("The result? Huge."). Then:

node clarity.mjs        # fix every note before voicing

Fill in caption, alt, cover (3 short lines, last in accent), endLine, endTag. Caption rules: references/retention.md.

5. Voice

node tts.mjs            # → build/voice.wav + build/timing.json; only new or changed sentences are requested

Engines, keys, voices, pace: references/voice.md. Keys go in a .env file (never in chat, never printed). Read the words/s line: 2.3–3.0 reads clearly. Ask the user to listen to build/voice.wav before the full render: you can't hear it.

6. The page (the picture)

The page is styles/<style>/style.html + style.js, set in script.json "page". The built-in style is paper (flat cut-paper explainer: styles/paper/kit.js has heads, hands, people rows, brains, meters, arrows, dials, bursts, labels and stamps). For a new topic, rewrite the beats in style.js and keep its contract. For a different look, write a new style folder following references/style-contract.md (canvas 2D, SVG, three.js all work). Pick the look from the content: a crowd → a people row; a mechanism → a cutaway or diagram; change over time → a dial, bar or route.

Every beat waits on a spoken word (T.wd('scan', '1998'), T.kw('turn', 0)). After any script edit, update the anchors: render.mjs stops with "missing word" rather than letting a beat fire at the wrong time.

7. Review (look before you render)

node render.mjs --safe                                                # the safe-frame + first-seconds gate
rm -rf build/stills && node render.mjs --dsf 1 --ig --stills auto && node sheet.mjs

Open build/sheet.png (one still per beat with the app's controls drawn on top) and read it like a viewer on a phone: is anything under the rail, the username, the top bar or the cropped edges? Is anything clipped or overlapping? Does each beat show its idea without the captions? Fix and repeat. Show the sheet to the user.

8. Render and QA

node render.mjs          # gate first, then ~2–4 min (run it in the background)
node qa.mjs              # length, format, loudness, hush before the turn, dead air, frozen picture, effects

Fix every FAIL. Sound-only changes: node audio.mjs && node remux.mjs (no re-render). Timing changes (script edit, re-voice) need a full render. Stranger test on out/<slug>-first-second.png: in one second, sound off, would you know this is about you and want the answer?

9. Deliver

Send the MP4, cover, first-second sheet and caption. Say plainly: the hook and its score, what each beat shows, the voice, the gate and QA results, the facts checked and the caveats, and what you could not check (you can't listen: ask them to play it once with sound). Posting advice: references/retention.md § Posting.

Files

template/
  script.json         the reel: scenes, keywords, badges, caption, platform, voice, page
  brand.json          wordmark, handle, watermark on/off, colours (shared with the carousel skill)
  platforms.json      safe frames for instagram / tiktok / shorts / all (measured vs estimated is noted)
  chrome.js / .css    captions, badge, watermark, end card, cover, review overlay; SAFE, trackText, timeline()
  tts.mjs             narration: elevenlabs | openai | gemini | local; caching, trim, level, pauses, word times
  render.mjs          frames → MP4 (+ cover, first-second sheet, caption); --safe, --stills, --ig
  safezone.mjs        the gate                    mix.mjs     the mix + encode
  audio.mjs           procedural score + foley    remux.mjs   sound-only re-mix
  qa.mjs  clarity.mjs  hookscore.mjs  sheet.mjs
  styles/paper/       the built-in style (kit.js) and the demo reel (style.js)
references/
  retention.md        hooks, beat plan, writing for the ear, captions, posting
  voice.md            engines, keys, choosing a voice, pace, pitfalls
  style-contract.md   how to write a new style page (and port one from another library)
  sound.md            sound event types, the score sections, mix rules
  pitfalls.md         failures that each happened once, and the fix

Individual skills in this repo

This repo contains 1 individual skill — each has its own dedicated page.

Related Skills