Skip to content

gooseworks-ai/goose-skills / skills/video/render-brand-identity-reveal

render-brand-identity-reveal

Verified

Render a 'brand identity reveal' video from a config — a single poster frame in a real, softly-lit space (real wall, soft-focus plant in the corner, dappled leaf shadow, illuminated poster) whose artwork HARD-CUTS through ~10 on-brand poster mockups (hero product, IG post, hanging banners, sticker sheet, logo lockup, poster, two lifestyle stills, packaging, big icon) then holds on a brand end card. The environment plate is one create-image-fal generation; the mockups are real-DOM HTML frame-stepped via Playwright, perspective-composited into the detected frame quad with the plate's real leaf-shadow multiplied back onto each poster (reads as behind glass), sequenced by FFmpeg. Deterministic assembly, FREE (the plate comes from create-image-fal, the bed from create-music-elevenlabs), music bed only and approved brand copy only. Use for the brand-identity-reveal format.

FileKindSize
SKILL.mdskill md5.3 KB
scripts/PIPELINE.mdmarkdown3.5 KB
scripts/build_video.shexecutablescript1.2 KB
scripts/composite.pyscript3.0 KB
scripts/config.example.jsonconfig3.9 KB
scripts/measure_frame.pyscript1.7 KB
scripts/recrop.pyscript2.2 KB
scripts/render_art.pyscript1.3 KB
scripts/scene.htmlother20.4 KB
skill.meta.jsonconfig223 B
tests/smoke-test.mdmarkdown1.1 KB

scripts/recrop.py

View on GitHub
#!/usr/bin/env python3
"""Re-crop the high-res plate tighter (closer camera) so the frame is bigger.
Detects the poster interior in the original, then crops a 9:16 window that puts the
interior at a target width fraction, keeping wall above and the plant in the corner."""
import glob, os, sys, numpy as np
from PIL import Image
from scipy import ndimage

FRAC = float(sys.argv[1]) if len(sys.argv) > 1 else 0.72   # interior width / output width
TOP_FRAC = float(sys.argv[2]) if len(sys.argv) > 2 else 0.13  # interior top as frac of output H
# Source plate: optional 3rd arg, else the first bg/plate_*.png (gen_plate.py writes
# bg/plate_1.png; older runs named it after the wall, e.g. bg/plate_sage_1.png).
if len(sys.argv) > 3:
    SRC = sys.argv[3]
else:
    cands = sorted(p for p in glob.glob("bg/plate_*.png") if os.path.basename(p) != "plate_final.png")
    if not cands:
        sys.exit("recrop.py: no bg/plate_*.png found — generate the plate first or pass its path as arg 3")
    SRC = cands[0]
print("source plate:", SRC)

im = Image.open(SRC).convert("RGB")
W0, H0 = im.size
a = np.asarray(im).astype(np.int32)
R, G, B = a[..., 0], a[..., 1], a[..., 2]
mx = a.max(2); mn = a.min(2)
val = mx; sat = np.where(mx > 0, (mx - mn) / np.maximum(mx, 1), 0)
mask = (val > 150) & (sat < 0.16) & (np.abs(R - G) < 26) & (np.abs(G - B) < 26)
lbl, n = ndimage.label(mask)
sizes = ndimage.sum(np.ones_like(lbl), lbl, range(1, n + 1))
mask = lbl == (int(np.argmax(sizes)) + 1)
ys, xs = np.where(mask)
ix0, iy0, ix1, iy1 = xs.min(), ys.min(), xs.max(), ys.max()
iw, ih = ix1 - ix0, iy1 - iy0
icx = (ix0 + ix1) / 2
print("interior in original:", ix0, iy0, ix1, iy1, "w,h", iw, ih)

# crop width so interior spans FRAC of output width
CW = iw / FRAC
CH = CW * 1920 / 1080
scale = 1080 / CW
# horizontal: center on interior center
cx0 = icx - CW / 2
# vertical: interior top at TOP_FRAC of output
cy0 = iy0 - (TOP_FRAC * 1920) / scale
# clamp inside original
cx0 = max(0, min(cx0, W0 - CW))
cy0 = max(0, min(cy0, H0 - CH))
box = (int(round(cx0)), int(round(cy0)), int(round(cx0 + CW)), int(round(cy0 + CH)))
print("crop box:", box, "-> scale", round(scale, 3))
crop = im.crop(box).resize((1080, 1920), Image.LANCZOS)
crop.save("bg/plate_final.png")
print("saved bg/plate_final.png")
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 323kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 323kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 323kUpdated 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