Skip to content

OpenSenseNova/SenseNova-Skills / skills/sn-motion-html

sn-motion-html

Verified

Build continuous-shot motion-driven HTML stories from a subject or narrative, including research, story structure, consistent AI stills, Seedance scene and connector clips, interface styling, media normalization, and browser QA. Use for immersive journeys, timelines, product stories, fictional worlds, or other scene-based visual narratives whose camera should flow from beginning to end; not for ordinary autoplay video pages or general web apps.

scripts/verify_media.py

View on GitHub
#!/usr/bin/env python3
"""Validate normalized dive and connector files declared by a project manifest."""

from __future__ import annotations

import argparse
import json
from pathlib import Path
import shutil
import subprocess


def main() -> int:
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("project_root", type=Path)
    parser.add_argument("--allow-missing", action="store_true")
    args = parser.parse_args()

    if shutil.which("ffprobe") is None:
        raise SystemExit("ffprobe is required")
    root = args.project_root.expanduser().resolve()
    manifest = json.loads((root / "prompts" / "video-manifest.json").read_text(encoding="utf-8"))
    records = [*manifest.get("dives", []), *manifest.get("connectors", [])]
    paths = [root / record["output"] for record in records]
    missing = [path for path in paths if not path.exists()]
    if missing:
        print("Missing media:")
        for path in missing:
            print(f"- {path.relative_to(root)}")
        return 0 if args.allow_missing else 2

    width = int(manifest.get("target_width", 1280))
    height = int(manifest.get("target_height", 720))
    fps = int(manifest.get("fps", 24))
    duration_target = float(manifest.get("duration", 4))
    failures = []
    for path in paths:
        command = [
            "ffprobe", "-v", "error", "-select_streams", "v:0",
            "-show_entries", "stream=codec_name,width,height,r_frame_rate,nb_frames:format=duration",
            "-of", "json", str(path),
        ]
        data = json.loads(subprocess.check_output(command, text=True))
        stream = data["streams"][0]
        duration = float(data["format"]["duration"])
        okay = (
            stream["codec_name"] == "h264"
            and stream["width"] == width
            and stream["height"] == height
            and stream["r_frame_rate"] == f"{fps}/1"
            and abs(duration - duration_target) < 0.05
        )
        print(f"{'OK' if okay else 'FAIL'} {path.relative_to(root)} {stream['width']}x{stream['height']} {duration:.3f}s")
        if not okay:
            failures.append(path)
    return 1 if failures else 0


if __name__ == "__main__":
    raise SystemExit(main())
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated 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