Skip to content

gooseworks-ai/goose-skills / skills/video/render-hand-swipe-flavor-listicle

render-hand-swipe-flavor-listicle

Verified

Render a 'hand-swipe flavor listicle' video from a config — the brand's REAL product cutouts each float on a flat flavor-matched color field under a persistent title and slide RIGHT-TO-LEFT one to the next like a phone-feed scroll, while a green-screen hand clip (back of hand toward camera, index finger up) is trimmed to its clean finger-up window, looped once per flavor, keyed with a green-dominance alpha key, scaled down and anchored at the bottom, with an optional end card and an optional instrumental music bed — deterministic PIL plus FFmpeg assembly, FREE (the hand clip comes from create-video-fal and the bed from create-music-elevenlabs), so labels stay pixel-crisp. Use for the hand-swipe-flavor-listicle format.

FileKindSize
SKILL.mdskill md11.4 KB
scripts/build_hand_swipe_listicle.pyscript19.5 KB
scripts/config.example.jsonconfig1.5 KB
skill.meta.jsonconfig243 B
tests/make_smoke_inputs.pyscript3.8 KB
tests/smoke-test.mdmarkdown3.6 KB

tests/smoke-test.md

View on GitHub
# Smoke test — render-hand-swipe-flavor-listicle

Free, $0 check that the renderer runs end to end and writes a valid vertical master. No
paid calls, no keys. `tests/make_smoke_inputs.py` makes synthetic stand-ins for every input:
a muddy, uneven green-screen "hand" clip (with a band of realistic green spill on the skin:
greener than the skin but still red-dominant, so it must stay opaque), 5 transparent can
cutouts, an end card, a sine music bed, and a wired `config.json`.

## Setup

```bash
DIR=skills/video/render-hand-swipe-flavor-listicle   # or /tmp/gooseworks-scripts/render-hand-swipe-flavor-listicle
python3 $DIR/tests/make_smoke_inputs.py /tmp/hs-smoke
```

## 1. Card stills (fastest)

```bash
python3 $DIR/scripts/build_hand_swipe_listicle.py /tmp/hs-smoke/config.json --stills /tmp/hs-smoke/stills
```

**Pass:** writes `card0..card4.png` + `endcard.png`. Each card is a flat color + title + a
centered can with a soft shadow.

## 2. Full master

```bash
python3 $DIR/scripts/build_hand_swipe_listicle.py /tmp/hs-smoke/config.json
ffprobe -v error -show_entries format=duration:stream=codec_name,width,height -of compact /tmp/hs-smoke/smoke-out.mp4
```

**Pass:** prints `WROTE …/smoke-out.mp4  (7.40s, target 7.5s, 5 flavors, music)`; ffprobe
shows h264 1080×1920 + aac, duration 7.4s.

## 3. Look check

```bash
ffmpeg -y -loglevel error -i /tmp/hs-smoke/smoke-out.mp4 -vf "select='not(mod(n\,18))',scale=270:480,tile=7x2" -frames:v 1 /tmp/hs-smoke/sheet.png
```

**Pass:** no green anywhere around the hand (the uneven green is fully keyed), the hand is
opaque and bottom-anchored with the finger pointing at the can base, the cards change by
sliding right-to-left, and the end card slides in clean (no hand) at the end.

## 4. Hand opacity (spill band)

The spill band crosses the hand at y≈1734 in frame 0, over the green first card. If the key
eats it, the card's green shows through the hand.

```bash
ffmpeg -y -loglevel error -i /tmp/hs-smoke/smoke-out.mp4 -vf "select=eq(n\,0)" -frames:v 1 /tmp/hs-smoke/f0.png
python3 -c "
from PIL import Image
im = Image.open('/tmp/hs-smoke/f0.png').convert('RGB')
px = [im.getpixel((x, 1734)) for x in range(600, 721, 10)]
print('OPAQUE' if all(r > g for r, g, b in px) else 'HOLE', px)"
```

**Pass:** prints `OPAQUE` (skin-coloured pixels, red > green). `HOLE` means the key made the
skin see-through (the card's `#2FA84F` shows): raise `green_margin` or fix the key.

## 5. Guardrails

Each edit below goes in a copy of `config.json`; re-run and check the result.

| Edit | Pass |
|---|---|
| `hand_clip` = `"<input:hand_clip>"` | exit 1, `ERROR: config 'hand_clip' is missing or still a placeholder` |
| `music` = `{"trim_intro_sec": 2.5, "volume": 1.0}` (no `path`) | exit 1, `ERROR: config 'music' is an object but music.path is empty…` |
| `music` = `null` | exit 0, output line ends `silent` |
| `music.trim_intro_sec` = `2.5` (8s bed, 7.4s cut) | `WARNING: … Trimming 0.60s instead`; music audible to the end (about -33 dB in the last fade at 7.0s, never -91 dB) |
| `music.volume` = `0.1` | about 20 dB quieter than `1.0` |
| `hand.trim_start` = `5`, `hand.trim_end` = `6` | exit 1, `ERROR: hand.trim_start (5.0s) is at or past the end of hand_clip (2.00s)` |
| `title` = `"5 Flavors of Grimwater Glacier Spring Water"`, then `--stills` | `WARNING: … shrunk to 62 to fit the frame`; the title and underline sit inside the frame |
| a can saved as an opaque `.jpg` | `WARNING: … has no transparent pixels` |

Measure the music level at a time `T` with:
`ffmpeg -ss T -t 0.3 -i out.mp4 -af volumedetect -f null - 2>&1 | grep mean_volume`.

## Cleanup

```bash
rm -rf /tmp/hs-smoke
```
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall