Skip to content

Claude Code skill that makes launch videos, ads and music videos from one line: idea, script, visuals, voice, music, edit and review, then a review room where your notes make the next take

Text check: two texts printed on top of each other

Tal Siach55dab94a4e76
diff --git a/SKILL.md b/SKILL.md
index 64eff6a..56444c4 100644
--- a/SKILL.md
+++ b/SKILL.md
@@ -190,7 +190,7 @@ Set up a project folder from the style's engine (the style file says how; a bran
- For films over about a minute or with many chapters, and for shorter ones when the person chose the split at the pitch, split into chapter files and brief parallel subagents with a shared guide (the P(doom) video did this: one guide, one storyboard, one chapter per agent, shared files read-only).
- For epic pieces (music videos, 1-3 min films) where the user can let it run for hours with tools and a budget, use the overnight-run method in `references/overnight-run.md`: a rich voice-style brief, a proven base repo, an image model for designs, a video model for reference motion that gets redrawn in code (rotoscoping), sound design, and explicit self-review loops. Agree the budget first.
- Timing rules, all styles, from `references/timing.md`. Read it before building. The short version: list the reads per shot, one read at a time, fast actions but held meanings, lead the eye, let the reads set the length, hold the final payoff long enough to land. All motion runs on springs (`springs.js`, presets in timing.md); linear motion never. Moves that read as designed (log-space zooms, beat punches, shared elements across handoffs, flood circles): `references/motion-kit.md`.
-- **Stills gate before the first full export. This is the storyboard drawn.** Render one frame per storyboard beat (`node frames.mjs 0 <beat times>`), read every one at full size and on the 360 px sheet, and fix what's wrong in the stills. Composition, type size, contrast and on-brand colour are all visible in a still, and a still costs seconds where an export costs minutes. No full export until every beat's still is right. Run `node <skill>/scripts/text-audit.mjs` from the film folder (it measures every word the film draws: too small for a phone, up too briefly to read, parked in a corner, held too long) and fix every FAIL. Then walk `references/before-the-first-cut.md` on those stills (phone width, the first second, people on screen, states that agree, payoffs that hold, nothing on what matters): it is the list of things fresh reviewers kept finding after the export.
+- **Stills gate before the first full export. This is the storyboard drawn.** Render one frame per storyboard beat (`node frames.mjs 0 <beat times>`), read every one at full size and on the 360 px sheet, and fix what's wrong in the stills. Composition, type size, contrast and on-brand colour are all visible in a still, and a still costs seconds where an export costs minutes. No full export until every beat's still is right. Run `node <skill>/scripts/text-audit.mjs` from the film folder (it measures every word the film draws: too small for a phone, up too briefly to read, parked in a corner, held too long, printed over another text) and fix every FAIL. Then walk `references/before-the-first-cut.md` on those stills (phone width, the first second, people on screen, states that agree, payoffs that hold, nothing on what matters): it is the list of things fresh reviewers kept finding after the export.
### 5. Review: your own pass, then fresh eyes
The review is of an exported file with its sound, so render and mix first (step 6), then come back here. For a real brand or product, run the brand pass first (`references/brand-pass.md`): their typeface, colors, logo SVGs, headline and CTA pulled from the live site. Render contact sheets and full frames and actually look at them (`scripts/frames.mjs`, see `references/pipeline.md`). Then walk `references/quality-checklist.md`. If the film has a main character, run the face audit (`scripts/audit-faces.mjs`) in every aspect ratio and fix every overlap before anyone sees it. Then score the critique rubric in `references/quality-checklist.md`: hook in the first 2 s, readability at 360 px, motion quality, variety (something new every 2-4 s), composition, data accuracy and sound sync, each 1-10; name the 3 worst problems with timestamps, fix them, and loop until every axis is 8+. Read a 12-frame strip around each fast move (whips, handoffs, floods): that is where text blurs and floods read as flashes. Then the bar check: put your frames next to the reference's, score it 1-10, and close the three biggest gaps (or price them for the user). Fix and re-render until it passes; re-render only the shots you changed (`references/pipeline.md`). The first render is never the one to show.
@@ -225,7 +225,7 @@ Put the MP4 somewhere obvious (Desktop or Downloads), named plainly (`<name>.mp4
- `references/quality-checklist.md` : the bar before showing anything
- `references/before-the-first-cut.md` : the checks to walk on the stills, before any export
- `references/page-or-picture.md` : the storyboard check that catches a slideshow before it is built
-- `scripts/text-audit.mjs` : measures the words a film draws (size at phone width, time on screen, corners, edges, faces)
+- `scripts/text-audit.mjs` : measures the words a film draws (size at phone width, time on screen, corners, edges, faces, text printed over text)
- `references/video-models.md` : read a video model's limits live; dated notes on the models we have used
- `references/pipeline.md` : render tools, flags, gotchas
- `references/audio.md` : Suno prompts, cutting music to beats, SFX
diff --git a/references/pipeline.md b/references/pipeline.md
index 4e84384..f95cde8 100644
--- a/references/pipeline.md
+++ b/references/pipeline.md
@@ -60,6 +60,7 @@ Run it at the stills gate and again before the reviewer. It draws the film frame
- **FLASH**: a caption or card that is not up long enough to read (0.4 s plus 0.2 s a word). A line typed letter by letter in one place (a prompt) counts as one piece from its first letter. A fast roll (a count whose name changes every beat, read at one fixed spot) flags on every name: it is not a caption, so pass the names to `--ignore` and tell the reviewer it is a roll. When the film replays itself inside a small player (a rewind, a film in the film), set `window.TEXT_AUDIT_SKIP = true` while that inner picture is drawn and back to `false` after: its words are picture, not captions.
- **EDGE**, **PINNED**, **LONG**: text partly out of the frame, small text parked in a corner for six seconds in all, one big line held past six seconds.
- **FACE**: text on a face, when the film defines `window.FACES = (t) => [[x, y, w, h], ...]` in canvas pixels.
+- **OVERLAP**: two different texts printed on top of each other and sitting still for 0.3 s or more (FAIL): a label over a label, a caption over a number. One moving across the other, or a huge word across small text, is a WARN to look at. The same text drawn twice (an outline, a glow, a counter changing its value) and single letters (a rolling digit) are left alone. It does not know about masks, so text hidden under a clip can still be reported; skip it with `--ignore`.
A FAIL is fixed. A WARN is a lead: look, then fix it or say why it stays. On one product ad the first cut had 15 fails, all things a fresh reviewer later named (status chips, tags, a note that flashed for 0.4 s); the delivered cut had 4. It sees only text the page draws itself, not words inside pictures, and it reads size, not contrast, so the 360 px sheet still gets read by eye.
diff --git a/scripts/text-audit.mjs b/scripts/text-audit.mjs
index 04dc62f..fded8d0 100644
--- a/scripts/text-audit.mjs
+++ b/scripts/text-audit.mjs
@@ -20,10 +20,17 @@
// PINNED small text parked in a corner zone for 6 s or more in total: a label, a counter, a name. A film is not a page.
// LONG one big line (5 % of the height or more) held more than 6 s: the frame may have become a slide.
// FACE text over a face, when the film exposes window.FACES = (t) => [[x, y, w, h], ...] in canvas pixels.
+// OVERLAP two different texts printed on top of each other for 0.3 s or more (a label over a label, a caption over a
+// number). It counts when the overlap covers a fifth of the smaller text's width and a quarter of its height, so
+// a descender touching the next line or two words crossing in a transition pass. The same text drawn twice (an
+// outline, a glow, a counter changing its value) and two single letters (a rolling digit) are left alone. A FAIL
+// needs the two to sit still on each other; one moving across the other, or a huge word across small text (it is
+// sometimes the design), is a WARN.
//
// Exit 1 when there is a FAIL. WARN lines are leads: look at each one and either fix it or say why it stays.
// Limits: it sees text drawn with fillText/strokeText only (not words inside pictures or SVGs), it does not know about clip
-// regions or about something painted over the text later, and it reads size, not contrast. Text meant as texture can be
+// regions or about something painted over the text later (so text hidden by a mask can still show up as an OVERLAP), it
+// does not see text over drawings, and it reads size, not contrast. Text meant as texture can be
// skipped with --ignore.
import fs from 'node:fs';
import http from 'node:http';
@@ -125,12 +132,35 @@ for (const r of done) { const held = r.t1 - r.t0 + STEP, w = words(r.s); if (!w)
if (r.maxPx / H < 0.05 && r.corner > 0) pinned.set(r.s, (pinned.get(r.s) || 0) + r.corner);
if (held > 6 && w >= 2 && r.minPx / H >= 0.05) add('WARN', 'LONG', r, `held ${f(held)} s: the same frame for too long?`);
}
+// OVERLAP: within each sample, every pair of different visible texts; a pair that keeps overlapping for 0.3 s is reported once
+const key = (s) => s.replace(/\d+/g, '#').replace(/[.\u2026\s]+$/, ''), pairs = new Map(), crossed = [];
+for (const smp of samples) {
+ const vis = smp.txt.filter((d) => d.a >= 0.5 && d.px >= 1 && !(ign && ign.test(d.s)) && d.x1 > 0 && d.x0 < W && d.y1 > 0 && d.y0 < H);
+ for (let i = 0; i < vis.length; i++) for (let j = i + 1; j < vis.length; j++) {
+ const u = vis[i], v = vis[j], ku = key(u.s), kv = key(v.s);
+ if (ku === kv) continue; // the same text twice: an outline, a glow, a counter
+ if (u.s.trim().length < 2 && v.s.trim().length < 2) continue; // two single letters: a rolling digit, a letter flying in
+ const sm = (u.x1 - u.x0) * (u.y1 - u.y0) <= (v.x1 - v.x0) * (v.y1 - v.y0) ? u : v, lg = sm === u ? v : u;
+ const ow = Math.min(u.x1, v.x1) - Math.max(u.x0, v.x0), oh = Math.min(u.y1, v.y1) - Math.max(u.y0, v.y0);
+ if (ow < 0.2 * (sm.x1 - sm.x0) || oh < 0.25 * (sm.y1 - sm.y0)) continue;
+ const big = lg.y1 - lg.y0 >= 3 * (sm.y1 - sm.y0); // a huge word across small text
+ const rx = (sm.x0 + sm.x1 - lg.x0 - lg.x1) / 2, ry = (sm.y0 + sm.y1 - lg.y0 - lg.y1) / 2; // where one sits on the other
+ const k = [ku, kv].sort().join('\n'); let r = pairs.get(k);
+ if (r && smp.t - r.t1 > STEP * 2.5) { crossed.push(r); r = null; }
+ if (!r) { r = { s: lg.s, over: sm.s, t0: smp.t, t1: smp.t, big, still: STEP, rx, ry }; pairs.set(k, r); }
+ else if (Math.abs(rx - r.rx) < 4 && Math.abs(ry - r.ry) < 4) r.still += STEP; // still in the same place on each other
+ r.t1 = smp.t; r.big = r.big && big; r.rx = rx; r.ry = ry;
+ }
+}
+// a FAIL needs the two to sit still on each other for 0.3 s; one passing across the other (a coin flying over a line) is a WARN
+for (const r of [...crossed, ...pairs.values()]) { const held = r.t1 - r.t0 + STEP, moving = r.still < 0.3 - 1e-6;
+ if (held >= 0.3) add(r.big || moving ? 'WARN' : 'FAIL', 'OVERLAP', r, `overlaps ${q(r.over)} for ${f(held)} s${r.big ? ' (a huge word across small text: on purpose?)' : moving ? ' (one moves across the other)' : ''}`); }
for (const [s, sec] of pinned) if (sec >= 6) finds.push({ sev: 'WARN', rule: 'PINNED', t0: 0, t1: D, text: s, why: `small text in a corner for ${f(sec)} s in all` });
finds.sort((a, b) => (a.sev === b.sev ? a.t0 - b.t0 : a.sev === 'FAIL' ? -1 : 1));
const fails = finds.filter((x) => x.sev === 'FAIL').length, warns = finds.length - fails;
console.log(`TEXT AUDIT ${path.basename(film)} ${W}x${H}, ${f(D)} s, a sample every ${STEP} s, ${done.length} pieces of text${info.faces ? '' : ' (no window.FACES: the face check did not run)'}`);
if (errs.length) console.log(' page errors while drawing: ' + errs.slice(0, 3).join(' | '));
-for (const x of finds) console.log(` ${x.sev} ${x.rule.padEnd(6)} ${(f(x.t0) + '-' + f(x.t1) + ' s').padEnd(15)} ${q(x.text).padEnd(52)} ${x.why}`);
+for (const x of finds) console.log(` ${x.sev} ${x.rule.padEnd(7)} ${(f(x.t0) + '-' + f(x.t1) + ' s').padEnd(15)} ${q(x.text).padEnd(52)} ${x.why}`);
console.log(fails ? `TEXT AUDIT: FAIL ${fails} to fix, ${warns} to look at` : warns ? `TEXT AUDIT: PASS with ${warns} to look at` : 'TEXT AUDIT: PASS');
if (JSON_OUT) fs.writeFileSync(JSON_OUT, JSON.stringify({ film: path.basename(film), W, H, D, step: STEP, finds, texts: done.map((r) => ({ text: r.s, t0: r.t0, t1: r.t1, minPx: r.minPx, maxPx: r.maxPx })) }, null, 1));
process.exit(fails ? 1 : 0);