Short vertical cut-paper explainer reels, made by your coding agent. Nine Agent Skills plus a Remotion library. Works with Claude Code, OpenCode, Codex, Gemini CLI, Cursor, Copilot and more.
TypeScript agent-skillsagents-mdclaude-codeclaude-code-skillscodexexplainer-videosgemini-cliopencodepapercutremotiontext-to-speechvideo-generation
Library fixes: surface audio-step failures, lint-clean scaffold, root Chrome, portable backdrop script
sanat5a342bf85516
diff --git a/README.md b/README.mdindex eea6601..3dce0d2 100644--- a/README.md+++ b/README.md@@ -213,7 +213,7 @@ Projects keep a snapshot of the kit in `src/lib/`, so an old episode renders the|---|---|| OS | macOS (tested) or Linux (scripts are bash; not run end to end). Windows: use WSL. || Node, npm | Node 20+ |-| ffmpeg | on `PATH` |+| ffmpeg | 4.4+ on `PATH` || rubberband | only if you set a voice `tempo` other than 1.0 (`brew install rubberband`) || rsync | on `PATH` (kit sync) || Python | 3.9+ for the tools; 3.10–3.12 for the voice venv (the installer uses `uv` if you have it, else `python3.12`/`3.11`/`3.10`) |diff --git a/library/audio/render.mjs b/library/audio/render.mjsindex 2a680b3..2c3ad03 100644--- a/library/audio/render.mjs+++ b/library/audio/render.mjs@@ -32,7 +32,7 @@ if (!chromePath) { console.error('No Chrome/Chromium found: set CHROME_PATH to tconst tryReq = (base) => { try { return createRequire(base)('puppeteer-core'); } catch { return null; } };const puppeteer = tryReq(path.resolve('package.json')) || tryReq(path.join(LIB, '..', 'papercut', 'template', 'package.json'));if (!puppeteer) { console.error('puppeteer-core not found: npm i -D puppeteer-core@24 in the project'); process.exit(1); }-const browser = await puppeteer.launch({executablePath: chromePath, headless: true});+const browser = await puppeteer.launch({executablePath: chromePath, headless: true, args: process.getuid?.() === 0 ? ['--no-sandbox'] : []});const page = await browser.newPage();page.on('console', (m) => { if (m.type() === 'warn' || m.type() === 'error') console.error('[page]', m.text()); });await page.setContent(`<!doctype html><meta charset="utf-8"><script>${js}</script>`);diff --git a/library/papercut/backdrops-src/render_backdrops.sh b/library/papercut/backdrops-src/render_backdrops.shindex f80cd0f..06e77fc 100755--- a/library/papercut/backdrops-src/render_backdrops.sh+++ b/library/papercut/backdrops-src/render_backdrops.sh@@ -1,6 +1,6 @@#!/usr/bin/env bash# Render code-drawn library backdrops to out/backdrops/<name>.jpg (1080x1920, q92). usage: ./render_backdrops.sh [name ...]set -e-cd ${0:A:h}+cd "$(cd "$(dirname "$0")" && pwd)"if (( $# )); then IDS=($@); else IDS=(courtroom bank-vault warehouse mission-control airport-gate subway-platform diner bedroom-day); fifor id in $IDS; do npx remotion still src/backdrops/index.ts $id out/backdrops/$id.jpg --frame=0 --jpeg-quality=92 --log=error; donediff --git a/library/papercut/template/eslint.config.mjs b/library/papercut/template/eslint.config.mjsindex 13b44a0..a8eec07 100644--- a/library/papercut/template/eslint.config.mjs+++ b/library/papercut/template/eslint.config.mjs@@ -1,3 +1,4 @@import { config } from "@remotion/eslint-config-flat";-export default config;+// src/lib is the synced kit (generated copy, never edited in a project), so it is not linted here+export default [{ignores: ['src/lib/**']}, ...config];diff --git a/library/tools/capture.mjs b/library/tools/capture.mjsindex 1df5c28..ed15398 100644--- a/library/tools/capture.mjs+++ b/library/tools/capture.mjs@@ -33,7 +33,7 @@ const chromePath = [process.env.CHROME_PATH, '/Applications/Google Chrome.app/Co'/Applications/Chromium.app/Contents/MacOS/Chromium', '/usr/bin/google-chrome', '/usr/bin/google-chrome-stable','/usr/bin/chromium', '/usr/bin/chromium-browser'].find((p) => p && existsSync(p));if (!chromePath) { console.error('No Chrome/Chromium found: set CHROME_PATH to the browser binary'); process.exit(1); }-const browser = await puppeteer.launch({executablePath: chromePath, headless: true, args: ['--hide-scrollbars']});+const browser = await puppeteer.launch({executablePath: chromePath, headless: true, args: process.getuid?.() === 0 ? ['--hide-scrollbars', '--no-sandbox'] : ['--hide-scrollbars']});try {const page = await browser.newPage();await page.setViewport({width: W, height: H, deviceScaleFactor: scale});diff --git a/library/tools/harvest.py b/library/tools/harvest.pyindex a6536be..b9aeead 100644--- a/library/tools/harvest.py+++ b/library/tools/harvest.py@@ -5,6 +5,8 @@# Read-only: it prints a report and changes nothing.import filecmp, glob, json, os, re, sysLIB = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))+if len(sys.argv) < 2 or sys.argv[1] in ('-h', '--help'):+ sys.exit('usage: python3 harvest.py <papercut project dir>')P = os.path.abspath(sys.argv[1]); src = f"{P}/src"kit = f"{LIB}/papercut/kit"base = f"{src}/lib" if os.path.isdir(f"{src}/lib") else src # the synced kit lives in src/libdiff --git a/library/tools/render.py b/library/tools/render.pyindex e70a641..0830e4c 100644--- a/library/tools/render.py+++ b/library/tools/render.py@@ -134,10 +134,19 @@ def main():os.makedirs('out/chunks', exist_ok=True)# audio in the background: mix.py, then limiter + loudnorm (as before)+ # clear old results first, so a failed audio step can never mux the previous run's audio+ for old in ('out/chunks/mix_raw.wav', 'out/chunks/audio.wav'):+ if os.path.exists(old):+ os.remove(old)+ audio_err = []+def audio():- run([PY_AUDIO, f'{LIB}/mix.py']) # mix.py reads/writes relative to the project dir (cwd)- run(['ffmpeg', '-v', 'error', '-y', '-i', 'out/chunks/mix_raw.wav', '-af',- 'alimiter=limit=0.89:level=false,loudnorm=I=-14:TP=-1.0:LRA=11', '-ar', '48000', 'out/chunks/audio.wav'])+ try:+ run([PY_AUDIO, f'{LIB}/mix.py']) # mix.py reads/writes relative to the project dir (cwd)+ run(['ffmpeg', '-v', 'error', '-y', '-i', 'out/chunks/mix_raw.wav', '-af',+ 'alimiter=limit=0.89:level=false,loudnorm=I=-14:TP=-1.0:LRA=11', '-ar', '48000', 'out/chunks/audio.wav'])+ except SystemExit as e: # sys.exit inside a thread is silent; hand the message to the main thread+ audio_err.append(str(e.code))at = threading.Thread(target=audio)at.start()@@ -209,6 +218,8 @@ def main():print(' ', msg, flush=True)print(f'video segments {time.time() - tv:.0f}s')at.join()+ if audio_err:+ sys.exit('audio step failed:\n' + audio_err[0])with open(f'{CACHE}/concat.txt', 'w') as f:f.writelines(f"file '{os.path.abspath(p)}'\n" for p in files)