Make viral video

From sonichi/sutando · View interactive version

Make viral video is an AI agent skill from the GitHub repository sonichi/sutando. Build a short news-explainer video tuned for shareability. One striking moment per video; real fetched assets; self-heal validation; pluggable TTS (Gemini-free default, OpenAI fallback).

How to use this skill

Skill file

make-viral-video

Build a short (~30-60s, 1280×720 landscape, h264+aac) news-explainer video around a single source URL or news event. Designed for shareability via the specificity-shape framing (Chi's pick 2026-05-09): one striking number, image, or quote — not a comprehensive overview.

Distinct from Lucy's recursive-meta-explorer v8-v12 lineage (which optimized for completeness). This skill optimizes for the one moment that makes someone share.

Usage

bash "$SKILL_DIR/scripts/build.sh" --topic "DoW UAP file release" --source "https://war.gov/UFO" --out results/

Produces:

Required tools

Architecture

Three-phase build with self-heal

Phase 1 — Source ingestion + script generation

Phase 2 — Asset validation (the self-heal loop)

For each asset URL:

  1. Fetch
  2. Hash check: refuse duplicates (catches the v12 PR46-404-dupe pattern)
  3. Content-type check: must be image/* or fall back
  4. 404 detector: known-404-page hash list + OCR keywords ("404", "page not found", "Not Found")
  5. Resolution check: ≥600×400 (sub-thumb assets are not viral-grade)
  6. Re-fetch on failure with up to 2 retries
  7. If validation still fails → script regen with that asset removed, NOT a silent skip

If 3+ assets fail validation, escalate to user (don't ship a video with placeholder content).

Phase 3 — Render + pre-publish gate

  1. Compose frames via PIL (templates: hook-card / asset-with-caption / closer-card)
  2. TTS narration via Gemini Flash (free) → fall back to OpenAI on rate-limit / error
  3. ffmpeg encode
  4. ffprobe gate: confirm h264 video stream + aac audio stream + 1280×720 dimensions + duration within ±5s of script estimate
  5. If gate fails → report what's missing + don't post

Visual constraints (specificity-shape)

Per Chi's "visual needs improvement too":

TTS provider + voice selection

Default: GEMINI (free tier, 1500 req/day quota) → OPENAI (sage voice, ~$0.02/min) fallback.

Voice flags (per render.py --help):

Series branding (Mini Wire)

The skill ships an end-card slate (last 2s) for series identity. Per Chi 2026-05-10:

MINI WIRE
by Echo Act IV · Sutando   (optional byline)
ep. 001 · 2026.05.10

Slate flags:

The slate is silent — narration runs over the prior frames; slate gets a apad=pad_dur=2 audio tail so AV streams stay synced through the silent end-card.

Multi-image visual support

render.py reads asset_manifest.json and maps each entry's purpose to its frame:

Manifest entries have shape:

{
  "url": "https://example.com/photo.jpg",
  "local_file": "photo.jpg",
  "alt": "...",
  "purpose": "hook|support|closer",
  "badge": "Optional upper-strip badge text",
  "is_video": false,
  "source_tag": {
    "event_id": "pursue-release-01-2026-05-08",
    "case_id": "apollo-17-vm6-1972",
    "source_agency": "NASA",
    "source_url": "https://www.war.gov/UFO/",
    "source_type": "primary",
    "attribution": "war.gov/UFO/ · NASA",
    "license": "public-domain",
    "footer_short": "Apollo 17 / 1972"
  },
  "provenance": "Free-text operator note."
}

source_tag is optional (v1.0, Mini↔Lucy 2026-05-10). When present, renderer:

Full schema reference: notes/sutando-wire/source-tag-schema-v1.md. v1.1 candidate adds optional primary: bool for multi-event Deep-slot pieces (gates which event_ids enter the auto-footer chain).

Per-frame durations are allocated proportional to that frame's narration word count (not fixed allocations). 18-word HOOK gets ~3× the screen time of a 6-word SUPPORT sliver — fixes the "scene changed before narration finished" failure mode.

Asset cache (cross-run reuse)

Shared cache at state/viral-cache/fetched_assets/ keyed by URL → local-file mapping. build.sh automatically:

Manual control via python3 skills/make-viral-video/scripts/asset_cache.py {preload|promote|list} <run_dir>. Cache index at state/viral-cache/index.json.

Smoke test

# Reproduce the UAP topic with this skill, compare against Lucy's v12 visually:
bash scripts/build.sh --topic "DoW UAP file release" --source "https://war.gov/UFO"

Validate the output passes:

Why this isn't `recursive-meta-explorer-prompt` v13

Lucy's lineage optimized for informational completeness + per-pass codex /goal iteration. This skill optimizes for one shareable moment + a deterministic validation gate. They serve different goals; both can coexist. Not deleting Lucy's work.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.