gooseworks-ai/goose-skills / skills/video/render-logo-equation-card
render-logo-equation-card
VerifiedRender the logo-equation card ad (7s, 9:16) — partner icon + brand icon joined by a plus sign as an equation, a two-line "= outcome" headline, four numbered steps, and a CTA that hard-cuts in at 2s, on a static black card over timelapse b-roll, no voice. render_card.py draws the two card plates with measured geometry and hard guardrails (the user must confirm the integration is real, no partnership/endorsement/ranking words, no comment-bait CTA, no dashes); compose.py lays the card over the b-roll sped up to read as a timelapse, with an optional bed; measure_motion.py gates the b-roll (a real-time shot reads as a photo). Free, local.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.1 KB |
| scripts/_fonts.py | script | 1.8 KB |
| scripts/compose.py | script | 3.6 KB |
| scripts/measure_motion.py | script | 3.2 KB |
| scripts/render_card.py | script | 11.3 KB |
| skill.meta.json | config | 210 B |
| tests/smoke-test.md | markdown | 522 B |
scripts/measure_motion.py
View on GitHub#!/usr/bin/env python3
"""Measure b-roll liveliness, and verify the CTA reveal, on a FINISHED file.
Both checks read the rendered video, never the inputs. That is deliberate: the
reference build shipped a dead b-roll twice because the clip "looked like the
reference" in a contact sheet while measuring 18x less motion than the source.
Motion is the mean absolute frame-to-frame difference inside the b-roll window,
on a 160x160 greyscale downscale.
mean overall liveliness
p90 typical busy moments <- the useful one
max biggest single jump (a subject entering or leaving frame)
Usage:
python measure_motion.py final.mp4 --reference source.mp4
python measure_motion.py final.mp4 --cta-at 2.0
"""
import argparse, subprocess, sys
import numpy as np
BROLL_CROP = "1080:1073:0:672" # the b-roll window inside a 1080x1920 frame
CTA_CROP = "760:40:160:632" # the CTA line's strip on the card
MIN_MEAN = 1.5 # below this the b-roll reads as a still photo
def motion(path, crop=BROLL_CROP, size=160):
cmd = ["ffmpeg", "-v", "error", "-i", str(path),
"-vf", f"crop={crop},scale={size}:{size},format=gray", "-f", "rawvideo", "-"]
raw = subprocess.run(cmd, capture_output=True).stdout
px = size * size
n = len(raw) // px
if n < 2:
sys.exit(f"ERROR: could not read frames from {path}")
a = np.frombuffer(raw[:n * px], dtype=np.uint8).reshape(n, size, size).astype(int)
d = np.abs(np.diff(a, axis=0)).mean(axis=(1, 2))
return d.mean(), np.percentile(d, 90), d.max()
def strip_brightness(path, t, crop=CTA_CROP):
cmd = ["ffmpeg", "-v", "error", "-ss", str(t), "-i", str(path), "-frames:v", "1",
"-vf", f"crop={crop},format=gray", "-f", "rawvideo", "-"]
raw = subprocess.run(cmd, capture_output=True).stdout
return sum(raw) / len(raw) if raw else 0.0
def main():
ap = argparse.ArgumentParser(description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
ap.add_argument("video")
ap.add_argument("--reference", help="source ad to compare motion against")
ap.add_argument("--cta-at", type=float, help="expected CTA reveal time in seconds")
args = ap.parse_args()
m, p90, mx = motion(args.video)
print(f"b-roll motion mean={m:.2f} p90={p90:.2f} max={mx:.2f}")
failed = False
if m < MIN_MEAN:
print(f" FAIL: mean {m:.2f} < {MIN_MEAN} -- this b-roll reads as a still photograph.")
failed = True
if args.reference:
rm, rp, rx = motion(args.reference)
print(f"reference mean={rm:.2f} p90={rp:.2f} max={rx:.2f}")
print(f" ratio mean={rm/m:.2f}x p90={rp/p90:.2f}x")
if not 0.6 <= m / rm <= 1.8:
print(" FAIL: motion is outside 0.6x-1.8x of the reference.")
failed = True
if args.cta_at is not None:
before = strip_brightness(args.video, args.cta_at - 0.1)
after = strip_brightness(args.video, args.cta_at)
print(f"CTA strip t-0.1s={before:.2f} t={args.cta_at}s={after:.2f}")
if not (before < 1.0 and after > 5.0):
print(f" FAIL: CTA does not hard-cut in at {args.cta_at}s.")
failed = True
sys.exit(1 if failed else 0)
if __name__ == "__main__":
main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |