Skip to content

gooseworks-ai/goose-skills / skills/video/render-podcast-skit

render-podcast-skit

Verified

Render a two-host podcast ad from a brand config and dialogue script. Includes the working planner, full-frame and split-screen assembly, captions from measured character timings, brand end card, approved paid-step adapters, and 65 quality-check falsification cases. Use for short conversational ads with two stable hosts in one room.

scripts/config_io.py

View on GitHub
#!/usr/bin/env python3
"""One config file, named variants inside it.

WHY THIS EXISTS
This recipe briefly carried three config files: `config.example.json`,
`config.bases-only.json` and `config.plain.json`. They differed in 23 of 143
keys, and the differences were not one concern but four tangled together: the
brand block existed in only one, the lipsync engine was 480p in one and 720p in
the others, the caption and lockup styling had been tuned in only the newest,
and the dynamic layer was switched off in only the newest. Nothing recorded
which file was authoritative for which key. Every fix landed in one file and
silently did not land in the other two, which is how a 480p run and a stale
voice list both survived longer than they should have.

So: ONE file. Anything that genuinely varies is a named preset inside it, under
`presets`, as a sparse overlay that is deep-merged over the base. A preset may
only override keys that already exist in the base, so a typo in a preset is an
error rather than a new setting nobody reads.

    cfg = config_io.load("config.example.json", ["plain"])

A preset's `_note` says what it is for. Presets compose left to right.
"""
from __future__ import annotations

import json
import pathlib


def _merge(base: dict, over: dict, path: str, errors: list[str]) -> dict:
    out = dict(base)
    for k, v in over.items():
        if k.startswith("_"):
            continue
        here = f"{path}.{k}" if path else k
        if k not in base:
            errors.append(here)
            continue
        if isinstance(v, dict) and isinstance(base[k], dict):
            out[k] = _merge(base[k], v, here, errors)
        else:
            out[k] = v
    return out


def load(path, presets=None) -> dict:
    """Read the config and apply named presets over it, in order."""
    cfg = json.loads(pathlib.Path(path).read_text(encoding="utf-8"))
    names = [p for p in (presets or []) if p]
    if not names:
        cfg.pop("presets", None)
        return cfg

    available = {k: v for k, v in (cfg.get("presets") or {}).items()
                 if not k.startswith("_")}
    errors: list[str] = []
    for name in names:
        if name not in available:
            raise SystemExit(
                f"[config] no preset {name!r} in {path}. "
                f"Available: {', '.join(sorted(available)) or 'none'}")
        cfg = _merge(cfg, available[name], "", errors)
    if errors:
        raise SystemExit(
            "[config] preset(s) {} set key(s) that do not exist in the base "
            "config: {}. A preset overrides, it does not introduce; a key only "
            "a preset knows about is a typo nobody would ever read."
            .format(", ".join(names), ", ".join(sorted(set(errors)))))
    cfg.pop("presets", None)
    return cfg


def add_arg(ap) -> None:
    """Register --preset on an argparse parser. Repeatable."""
    ap.add_argument("--preset", action="append", default=[],
                    help="named preset from the config's `presets` block. "
                         "Repeatable; applied in order.")
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall