Skip to content

gooseworks-ai/goose-skills / skills/video/render-myth-vs-fact

render-myth-vs-fact

Verified

Assemble a myth-vs-fact kinetic-typography explainer video ad (≈29.5s, 9:16) from N myth/fact pairs + hook / turn / punch copy + palette + a brand end-card PNG + a VO track — a hook, 3 red-strike MYTH cards that flip to teal-check FACT cards (per-line strikethrough that crosses EVERY wrapped line), a "what actually works" turn, an optional proof reveal, a punch line, and a static end card. DETERMINISTIC assembly with ZERO AI-gen visuals — HTML hyperframes rendered frame-exact via Playwright (`window.renderAt(t)`, animation a pure function of beat-local time), Whisper beat-snap to VO word onsets, concat at a uniform fps, karaoke `.ass` captions burned last (suppressed on the proof + end-card beats), and a VO + optional music mix (music −20 dB, `amix normalize=0`, tail fade). FREE (Python + Playwright + ffmpeg); the recipe supplies the copy / palette / end-card / VO and gates the paid VO / music / Whisper calls to their own capabilities. Use for the myth-vs-fact format.

scripts/hyperframes/beat-hook.html

View on GitHub
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8" />
<title>beat · Hook</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="_shared.css">
<style>
  .eyebrow .quo { position: relative; display: inline-block; color: var(--headline-ink); }
  .hero-stack { position: absolute; top: 540px; left: var(--pad-x); right: var(--pad-x); }
  .word { display: inline-block; opacity: 0; transform: translateY(34px); white-space: pre; }
</style>
</head><body>
<div class="bg"></div>
<div class="stage">
  <div class="eyebrow" id="eyebrow"></div>
  <div class="hero-stack"><h1 class="h-hero" id="hero"></h1></div>
  <div class="wordmark" id="wm" style="opacity:0"></div>
</div>
<!-- In-browser preview fallback. render_beats.py injects window.BEAT to override. -->
<script id="beat-spec" type="application/json">
{ "duration": 3.97, "palette": {}, "eyebrow": "3 PLANT \"TIPS\"",
  "hook_line": "Habits that quietly kill your plants.",
  "emphasis": "quietly", "brand_name": "Fernhollow", "strike_word": "TIPS",
  "cues": { "strike": [2.89, 3.40], "wordmark": [3.45, 3.85] } }
</script>
<script src="_shared.js"></script>
<script>
  const BEAT = loadBeatSpec();
  applyPalette(BEAT.palette);

  const eyebrowEl = document.getElementById('eyebrow');
  const heroEl = document.getElementById('hero');
  const wm = document.getElementById('wm');
  wm.textContent = BEAT.brand_name || '';

  // Eyebrow: wrap the strike_word (if present) in a strikeable span.
  const sw = BEAT.strike_word;
  if (sw && BEAT.eyebrow && BEAT.eyebrow.includes(sw)) {
    eyebrowEl.innerHTML = BEAT.eyebrow.replace(sw, `<span class="quo" id="quo">${sw}</span>`);
  } else {
    eyebrowEl.textContent = BEAT.eyebrow || '';
  }
  const quo = document.getElementById('quo');

  // Hook line: split into words for a staggered reveal, italicizing the emphasis word.
  const emph = (BEAT.emphasis || '').toLowerCase();
  const toks = (BEAT.hook_line || '').split(/\s+/);
  heroEl.innerHTML = toks.map((w, i) => {
    const bare = w.replace(/[^a-z]/gi, '').toLowerCase();
    const inner = (emph && bare === emph) ? `<em>${w}</em>` : w;
    return `<span class="word" data-i="${i}">${inner}</span>`;
  }).join(' ');
  const words = Array.from(document.querySelectorAll('.word'));
  // Even stagger across the first ~65% of the beat.
  const dur = BEAT.duration || 3.97;
  const starts = words.map((_, i) => 0.30 + (i / Math.max(1, words.length)) * dur * 0.55);

  let bars = null;
  const strikeWin = (BEAT.cues && BEAT.cues.strike) || [dur * 0.72, dur * 0.86];
  const wmWin = (BEAT.cues && BEAT.cues.wordmark) || [dur - 0.5, dur - 0.1];

  initRenderer(dur, function (t) {
    if (quo && !bars) bars = buildLineStrikes(quo, quo, { thickness: 6, radius: 3 });
    eyebrowEl.style.opacity = tw(t, 0.00, 0.40);
    eyebrowEl.style.transform = `translateY(${(1 - tw(t, 0, 0.40)) * -16}px)`;
    revealWords(words, starts, t, 0.26, 34);
    if (bars) strikeLines(bars, t, strikeWin[0], strikeWin[1]);
    wm.style.opacity = tw(t, wmWin[0], wmWin[1]) * 0.9;
  });
</script>
</body></html>
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall