CtrlK
BlogDocsLog inGet started
Tessl Logo

gamussa/reels-producer-skill

Write talking-head scripts and produce Instagram reels and YouTube shorts

94

2.36x
Quality

97%

Does it follow best practices?

Impact

85%

2.36x

Average score across 3 eval scenarios

SecuritybySnyk

Low

Low-risk findings worth noting

Overview
Quality
Evals
Security
Files

sync_card_sources.pyskills/reel-builder/scripts/

#!/usr/bin/env python3
"""Regenerate card_sources.py from the real .tsx components.

The registry's packager ships .ts but drops .tsx, so Card.tsx and Root.tsx
never reached a consumer install and `npx remotion render Card` had no Card
composition to render. A .py file ships, so the components travel inside one.

The .tsx files stay canonical — edit those, then run this. A test asserts the
two never drift.

Usage:
  sync_card_sources.py            # rewrite card_sources.py
  sync_card_sources.py --check    # exit 1 if it is stale
"""
import argparse, sys
from pathlib import Path

SRC = Path(__file__).resolve().parent.parent / "assets/remotion-cards/src"
OUT = Path(__file__).resolve().parent / "card_sources.py"
CARRIED = ("Card.tsx", "Root.tsx")

HEADER = '''#!/usr/bin/env python3
"""Remotion component sources, carried as data so they survive packaging.

GENERATED by sync_card_sources.py — do not edit. The canonical files are
assets/remotion-cards/src/*.tsx; edit those and re-run the sync.

The registry's packager ships .ts and drops .tsx, so these two components never
reached a consumer install and make_cards.py could not render anything. A .py
file ships, so they ride in one and make_cards.py writes them back out when the
originals are absent.
"""

FILES = {
'''


def render():
    body = HEADER
    for name in CARRIED:
        text = (SRC / name).read_text()
        body += f'    "{name}": r"""{text}""",\n\n'
    body += "}\n"
    return body


def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("--check", action="store_true",
                    help="exit 1 if card_sources.py is stale")
    a = ap.parse_args()

    missing = [n for n in CARRIED if not (SRC / n).exists()]
    if missing:
        sys.exit(f"Canonical source missing: {', '.join(missing)}. This runs in "
                 f"the plugin repo, not in an installed copy.")

    want = render()
    if a.check:
        have = OUT.read_text() if OUT.exists() else ""
        if have != want:
            sys.exit(f"{OUT.name} is stale — run sync_card_sources.py")
        print(f"{OUT.name} is in sync")
        return
    OUT.write_text(want)
    print(f"{OUT.name} <- {', '.join(CARRIED)}")


if __name__ == "__main__":
    main()

.mcp.json

tile.json