majiayu000/spellbook / skills/build-product-demo
build-product-demo
VerifiedPlan, produce, or diagnose evidence-backed product demo videos and screen-recorded promotional walkthroughs. Use when the user asks to make a product demo, launch video, feature showcase, app walkthrough, demo reel, or polished recording; wants every important capability shown without a slow feature tour; asks to remove dead time or fix narration-to-action pacing; or needs a repeatable script, capture plan, and verified final media. Do not use for fictional commercials with no real product proof, general-purpose video editing, or documentation-only tutorials that do not need a promotional narrative.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.0 KB |
| agents/openai.yaml | config | 239 B |
| evals/evals.json | config | 5.0 KB |
| references/artifact-contract.md | markdown | 6.8 KB |
| references/directing.md | markdown | 6.6 KB |
| references/production.md | markdown | 6.0 KB |
| scripts/analyze_demo_pacing.pyexecutable | script | 15.5 KB |
| scripts/probe_demo_media.pyexecutable | script | 6.8 KB |
| scripts/validate_demo_plan.pyexecutable | script | 16.3 KB |
scripts/probe_demo_media.py
View on GitHub#!/usr/bin/env python3
"""Probe a demo video with ffprobe and assert delivery constraints."""
from __future__ import annotations
import argparse
import json
import shutil
import subprocess
import sys
from fractions import Fraction
from pathlib import Path
def parse_cli_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("media", type=Path)
parser.add_argument("--expect-width", type=int)
parser.add_argument("--expect-height", type=int)
parser.add_argument("--expect-fps", type=float)
parser.add_argument("--fps-tolerance", type=float, default=0.1)
parser.add_argument("--expect-duration", type=float)
parser.add_argument("--duration-tolerance", type=float, default=0.25)
parser.add_argument("--min-duration", type=float)
parser.add_argument("--max-duration", type=float)
parser.add_argument("--expect-container")
parser.add_argument("--expect-video-codec")
parser.add_argument("--expect-audio-codec")
parser.add_argument("--require-audio", action="store_true")
parser.add_argument("--json-out", type=Path)
return parser.parse_args()
def frame_rate(value: object) -> float | None:
if not isinstance(value, str) or not value or value == "0/0":
return None
try:
return float(Fraction(value))
except (ValueError, ZeroDivisionError):
return None
def paths_alias(first: Path, second: Path) -> bool:
return first.resolve() == second.resolve() or (
first.exists() and first.samefile(second)
)
def media_argv(path: Path) -> list[str]:
"""Return ffprobe trailing input args that cannot be parsed as options."""
return ["--", str(path.resolve())]
def main() -> int:
args = parse_cli_args()
if not args.media.is_file():
print(f"error: media not found: {args.media}", file=sys.stderr)
return 2
if args.json_out is not None:
try:
if paths_alias(args.json_out, args.media):
print("error: json output must not overwrite media input", file=sys.stderr)
return 2
except OSError as exc:
print(f"error: cannot compare media and json output: {exc}", file=sys.stderr)
return 2
if shutil.which("ffprobe") is None:
print("error: ffprobe is not available on PATH", file=sys.stderr)
return 2
command = [
"ffprobe",
"-v",
"error",
"-show_entries",
"format=duration,format_name:stream=index,codec_type,codec_name,width,height,avg_frame_rate,sample_rate,channels",
"-of",
"json",
*media_argv(args.media),
]
try:
result = subprocess.run(command, check=True, capture_output=True, text=True)
payload = json.loads(result.stdout)
except subprocess.CalledProcessError as exc:
detail = exc.stderr.strip() or f"ffprobe exited {exc.returncode}"
print(f"error: {detail}", file=sys.stderr)
return 2
except json.JSONDecodeError as exc:
print(f"error: invalid ffprobe JSON: {exc}", file=sys.stderr)
return 2
streams = payload.get("streams", [])
video_stream = next((stream for stream in streams if stream.get("codec_type") == "video"), None)
audio_stream = next((stream for stream in streams if stream.get("codec_type") == "audio"), None)
format_data = payload.get("format", {})
format_name = format_data.get("format_name")
try:
duration = float(format_data.get("duration"))
except (TypeError, ValueError):
duration = None
errors: list[str] = []
if video_stream is None:
errors.append("no video stream")
if args.require_audio and audio_stream is None:
errors.append("no audio stream")
actual_containers = format_name.split(",") if isinstance(format_name, str) else []
if args.expect_container and args.expect_container not in actual_containers:
errors.append(f"container is {format_name}, expected {args.expect_container}")
fps = frame_rate(video_stream.get("avg_frame_rate")) if video_stream else None
if video_stream:
if args.expect_width is not None and video_stream.get("width") != args.expect_width:
errors.append(f"width is {video_stream.get('width')}, expected {args.expect_width}")
if args.expect_height is not None and video_stream.get("height") != args.expect_height:
errors.append(f"height is {video_stream.get('height')}, expected {args.expect_height}")
if args.expect_video_codec and video_stream.get("codec_name") != args.expect_video_codec:
errors.append(f"video codec is {video_stream.get('codec_name')}, expected {args.expect_video_codec}")
if args.expect_fps is not None:
if fps is None or abs(fps - args.expect_fps) > args.fps_tolerance:
errors.append(f"frame rate is {fps}, expected {args.expect_fps} +/- {args.fps_tolerance}")
if args.expect_audio_codec:
actual_audio_codec = audio_stream.get("codec_name") if audio_stream else None
if actual_audio_codec != args.expect_audio_codec:
errors.append(f"audio codec is {actual_audio_codec}, expected {args.expect_audio_codec}")
if duration is None:
errors.append("duration is unavailable")
else:
if (
args.expect_duration is not None
and abs(duration - args.expect_duration) > args.duration_tolerance
):
errors.append(
f"duration is {duration:.3f}s, expected {args.expect_duration:.3f}s "
f"+/- {args.duration_tolerance:.3f}s"
)
if args.min_duration is not None and duration < args.min_duration:
errors.append(f"duration is {duration:.3f}s, below minimum {args.min_duration:.3f}s")
if args.max_duration is not None and duration > args.max_duration:
errors.append(f"duration is {duration:.3f}s, above maximum {args.max_duration:.3f}s")
report = {
"valid": not errors,
"media": args.media.name,
"size_bytes": args.media.stat().st_size,
"format": format_name,
"duration_seconds": duration,
"video": None if video_stream is None else {
"codec": video_stream.get("codec_name"),
"width": video_stream.get("width"),
"height": video_stream.get("height"),
"fps": fps,
},
"audio": None if audio_stream is None else {
"codec": audio_stream.get("codec_name"),
"sample_rate": audio_stream.get("sample_rate"),
"channels": audio_stream.get("channels"),
},
"errors": errors,
}
rendered = json.dumps(report, indent=2)
print(rendered)
if args.json_out:
args.json_out.parent.mkdir(parents=True, exist_ok=True)
args.json_out.write_text(f"{rendered}\n", encoding="utf-8")
return 0 if not errors else 1
if __name__ == "__main__":
raise SystemExit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file). | Stars: 198k | Updated | Claude CodeCodex | Unverified | Install |
| doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |