Skip to content

norahe0304-art/30x-video / cli/skill

30x-web-to-video

Flagged

Use when a user gives a brand URL and wants a premium launch, demo, or marketing video. Zero-manual workflow — Claude runs the V2 orchestrator itself (scrapes brand evidence, auto-installs missing tools, generates the first-cut Remotion project). User only sees the URL and the Studio preview.

FileKindSize
.gitignoreother103 B
AGENTS.mdmarkdown2.5 KB
FUSION-REPORT.mdmarkdown12.3 KB
README.mdmarkdown3.6 KB
SKILL.mdskill md30.7 KB
benchmarks/AGENTS.mdmarkdown773 B
benchmarks/README.mdmarkdown2.8 KB
benchmarks/manifest.jsonconfig5.9 KB
examples/INDEX.mdmarkdown1.8 KB
examples/caylent/MainVideo.tsxother6.0 KB
examples/caylent/scenes-v2/Act1V2.tsxother1.9 KB
examples/caylent/scenes-v2/Act2V2.tsxother2.5 KB
examples/caylent/scenes-v2/Act3V2.tsxother11.3 KB
examples/caylent/scenes-v2/Act4V2.tsxother8.6 KB
examples/caylent/scenes-v2/Act5V2.tsxother1.0 KB
examples/caylent/scenes/Act1.tsxother6.0 KB
examples/caylent/scenes/Act2.tsxother2.5 KB
examples/caylent/scenes/Act3.tsxother7.4 KB
examples/caylent/scenes/Act4.tsxother7.1 KB
examples/caylent/scenes/Act5.tsxother2.2 KB
examples/caylent/theme.tsscript1.2 KB
examples/cofounder/MainVideo.tsxother5.5 KB
examples/cofounder/scenes/AGENTS.mdmarkdown1.4 KB
examples/cofounder/scenes/Act1.tsxother2.3 KB
examples/cofounder/scenes/Act2.tsxother2.4 KB
examples/cofounder/scenes/Act3a.tsxother6.7 KB
examples/cofounder/scenes/Act3b.tsxother8.5 KB
examples/cofounder/scenes/Act3c.tsxother6.8 KB
examples/cofounder/scenes/Act4.tsxother4.4 KB
examples/cofounder/scenes/Act5.tsxother3.3 KB
examples/cofounder/scenes/World.tsxother4.0 KB
examples/cofounder/theme.tsscript1.5 KB
examples/happy-model/MainVideo.tsxother6.8 KB
examples/happy-model/scenes/AGENTS.mdmarkdown1.7 KB
examples/happy-model/scenes/Act1.tsxother7.9 KB
examples/happy-model/scenes/Act2.tsxother10.2 KB
examples/happy-model/scenes/Act3.tsxother15.6 KB
examples/happy-model/scenes/Act4.tsxother16.9 KB
examples/happy-model/scenes/Act5.tsxother9.0 KB
examples/happy-model/scenes/copy.tsscript588 B
examples/happy-model/theme.tsscript1.2 KB
examples/mana/MainVideo.tsxother4.9 KB
examples/mana/scenes/AGENTS.mdmarkdown926 B
examples/mana/scenes/Act1Open.tsxother2.8 KB
examples/mana/scenes/Act2Hero.tsxother3.3 KB
examples/mana/scenes/Act3Flavors.tsxother9.0 KB
examples/mana/scenes/Act4Label.tsxother7.3 KB
examples/mana/scenes/Act5Close.tsxother4.7 KB
examples/mana/scenes/World.tsxother7.2 KB
examples/mana/theme.tsscript2.6 KB
examples/parker/MainVideo.tsxother6.2 KB
examples/parker/scenes/AGENTS.mdmarkdown1.1 KB
examples/parker/scenes/Act1Hook.tsxother3.2 KB
examples/parker/scenes/Act2Meet.tsxother2.3 KB
examples/parker/scenes/Act2Problem.tsxother3.6 KB
examples/parker/scenes/Act3Steps.tsxother4.7 KB
examples/parker/scenes/Act4Proof.tsxother3.2 KB
examples/parker/scenes/Act5Close.tsxother2.6 KB
examples/parker/scenes/PaperWorld.tsxother6.8 KB
examples/parker/theme.tsscript1.6 KB
examples/perplexity-pc/MainVideo.tsxother4.5 KB
examples/perplexity-pc/scenes/Act1.tsxother2.1 KB
examples/perplexity-pc/scenes/Act2.tsxother2.7 KB
examples/perplexity-pc/scenes/Act3.tsxother3.1 KB
examples/perplexity-pc/scenes/Act4.tsxother1.6 KB
examples/perplexity-pc/scenes/Act5.tsxother2.0 KB
examples/perplexity-pc/theme.tsscript2.5 KB
references/AGENTS.mdmarkdown767 B
references/animations.mdmarkdown15.1 KB
references/audio.mdmarkdown8.6 KB
references/components.mdmarkdown9.5 KB
references/lottie.mdmarkdown5.1 KB
references/visual-effects.mdmarkdown5.0 KB
rules/AGENTS.mdmarkdown3.0 KB
rules/archetypes.mdmarkdown6.0 KB
rules/artifact-catalog.mdmarkdown10.8 KB
rules/beat-sync.mdmarkdown5.7 KB
rules/cards.mdmarkdown2.5 KB
rules/cinematic.mdmarkdown6.7 KB
rules/color.mdmarkdown2.2 KB
rules/composition.mdmarkdown13.2 KB
rules/creative-moves.mdmarkdown3.8 KB
rules/data-viz.mdmarkdown1.9 KB
rules/finish-gate.mdmarkdown5.2 KB
rules/layout.mdmarkdown6.6 KB
rules/media-resolve.mdmarkdown7.1 KB
rules/motion.mdmarkdown9.5 KB
rules/narration-sync.mdmarkdown5.5 KB
rules/narrative-templates.mdmarkdown10.4 KB
rules/narrative.mdmarkdown7.3 KB
rules/qc-gates.mdmarkdown11.3 KB
rules/taste.mdmarkdown12.6 KB
rules/transitions.mdmarkdown2.7 KB
rules/typography.mdmarkdown4.1 KB
rules/ui-mockups.mdmarkdown5.6 KB
rules/workflow.mdmarkdown53.2 KB
scaffold/.prettierrcother66 B
scaffold/AGENTS.mdmarkdown1.1 KB
scaffold/eslint.config.mjsscript79 B
scaffold/package-lock.jsonmanifest186.3 KB
scaffold/package.jsonmanifest1.5 KB
scaffold/remotion.config.tsscript219 B
scaffold/src/AGENTS.mdmarkdown831 B
scaffold/src/MainVideo.tsxother41.7 KB
scaffold/src/Root.tsxother2.3 KB
scaffold/src/components/AGENTS.mdmarkdown1.5 KB
scaffold/src/components/Animations.tsxother6.8 KB
scaffold/src/components/Atmosphere.tsxother8.1 KB
scaffold/src/components/Background.tsxother4.5 KB
scaffold/src/components/Captions.tsxother6.4 KB
scaffold/src/components/LogoEntrance.tsxother15.2 KB
scaffold/src/components/MockupTemplates.tsxother19.0 KB
scaffold/src/components/PhoneFrame.tsxother3.6 KB
scaffold/src/components/ShaderFX.tsxother5.3 KB
scaffold/src/components/Transitions.tsxother8.4 KB
scaffold/src/components/UI.tsxother3.0 KB
scaffold/src/components/VisualEffects.tsxother10.7 KB
scaffold/src/generated/AGENTS.mdmarkdown508 B
scaffold/src/generated/beat-map.tsscript1.1 KB
scaffold/src/generated/project-data.tsscript5.2 KB
scaffold/src/index.cssother576 B
scaffold/src/index.tsscript400 B
scaffold/src/lib/AGENTS.mdmarkdown411 B
scaffold/src/lib/fonts.tsscript867 B
scaffold/src/lib/modes.tsscript2.2 KB
scaffold/src/lib/utils.tsscript352 B
scaffold/src/theme.tsscript2.5 KB
scaffold/tsconfig.jsonconfig333 B
scripts/AGENTS.mdmarkdown2.4 KB
scripts/analyze-audiomap.pyscript13.3 KB
scripts/beat-sync.tsscript12.1 KB
scripts/benchmark-suite.tsscript17.8 KB
scripts/critique-scenes.tsscript10.1 KB
scripts/evidence-model.tsscript9.4 KB
scripts/generate-bgm.pyscript10.5 KB
scripts/iterate.tsscript4.0 KB
scripts/project-blueprint.tsscript12.1 KB
scripts/regenerate-scene.tsscript7.4 KB
scripts/render-qa.tsscript9.0 KB
scripts/scene-constitution.tsscript13.4 KB
scripts/timing-audit.tsscript9.5 KB
scripts/url-to-video.tsscript68.6 KB
scripts/visual-audit.tsscript26.5 KB

scripts/render-qa.ts

View on GitHub
#!/usr/bin/env -S node --experimental-strip-types --no-warnings=ExperimentalWarning
/**
 * [INPUT]: 渲染完成的 MP4 (Step 8 输出),依赖系统 ffprobe/ffmpeg(orchestrator preflight 已保证存在)
 * [OUTPUT]: 对外提供 renderQa(videoPath, options) 与 CLI;输出 stream/尺寸/时长/黑帧/静帧/静音/削波 检查报告
 *          (pass/warn/fail),可选 --json 落盘,exit 1 on fail。
 * [POS]: scripts/ 的渲染后机器质检器 — Step 8 render 之后、Gate 4 披露之前的最后一道机器门。
 *        概念移植自 maxazure/video-editing-skill 的 render_qa.py,按本 skill 的产物特性重调阈值。
 * [PROTOCOL]: 变更时更新此头部,然后检查 AGENTS.md
 */
import { spawnSync } from "node:child_process";
import { writeFileSync, existsSync } from "node:fs";

// ================================================================
// 类型 — 检查项与区段
// ================================================================
type Status = "pass" | "warn" | "fail";

interface Segment {
  start: number;
  end: number;
  duration: number;
}

interface Check {
  name: string;
  status: Status;
  message: string;
  segments?: Segment[];
}

interface QaOptions {
  width: number;
  height: number;
  expectDuration?: number; // seconds; ±1s tolerance
  maxBlackSeconds: number;
  maxFreezeSeconds: number;
  maxSilenceSeconds: number;
}

const DEFAULTS: QaOptions = {
  width: 1920,
  height: 1080,
  maxBlackSeconds: 0.5, // 开场淡入允许的黑帧预算
  maxFreezeSeconds: 8, // hold-then-snap 是本 skill 的语言 — 静帧只在总量失控时 fail
  maxSilenceSeconds: 3, // BGM 是强制项; 结尾 fade 尾巴给 3s 余量
};

// ================================================================
// ffmpeg/ffprobe 执行
// ================================================================
function run(cmd: string, args: string[]): { stdout: string; stderr: string } {
  const r = spawnSync(cmd, args, { encoding: "utf8", maxBuffer: 64 * 1024 * 1024 });
  return { stdout: r.stdout ?? "", stderr: r.stderr ?? "" };
}

function probe(path: string): any {
  const { stdout } = run("ffprobe", [
    "-v", "error", "-print_format", "json", "-show_format", "-show_streams", path,
  ]);
  return JSON.parse(stdout || "{}");
}

function runFilter(path: string, filter: string, audio: boolean): string {
  const args = ["-hide_banner", "-nostats", "-i", path];
  args.push(...(audio ? ["-af", filter, "-vn"] : ["-vf", filter, "-an"]));
  args.push("-f", "null", "-");
  return run("ffmpeg", args).stderr;
}

// ================================================================
// stderr 区段解析 — black/freeze/silence 共用一套 start/end 抽取
// 注意: freeze_end 在冻结持续到片尾时不会输出 — 未闭合的 start 用 closeAt (视频时长) 收尾
// ================================================================
function parseSegments(log: string, startKey: string, endKey: string, closeAt: number): Segment[] {
  const segments: Segment[] = [];
  const starts: number[] = [];
  for (const line of log.split("\n")) {
    const s = line.match(new RegExp(`${startKey}:\\s*([0-9.]+)`));
    if (s) starts.push(Number(s[1]));
    const e = line.match(new RegExp(`${endKey}:\\s*([0-9.]+)`));
    if (e) {
      const end = Number(e[1]);
      const start = starts.shift() ?? end;
      segments.push({ start: round3(start), end: round3(end), duration: round3(end - start) });
    }
  }
  for (const start of starts) {
    segments.push({ start: round3(start), end: round3(closeAt), duration: round3(closeAt - start) });
  }
  return segments;
}

const round3 = (n: number) => Math.round(n * 1000) / 1000;

function budgetCheck(name: string, segments: Segment[], limit: number): Check {
  const total = round3(segments.reduce((a, s) => a + s.duration, 0));
  if (total > limit) {
    return { name, status: "fail", message: `${name}: ${total}s total, over ${limit}s budget`, segments };
  }
  if (segments.length > 0) {
    return { name, status: "warn", message: `${name}: ${total}s within budget — review the listed windows`, segments };
  }
  return { name, status: "pass", message: `no ${name} detected` };
}

// ================================================================
// 主检查流程
// ================================================================
export function renderQa(path: string, opts: QaOptions): { status: Status; checks: Check[] } {
  const checks: Check[] = [];
  const meta = probe(path);
  const video = (meta.streams ?? []).find((s: any) => s.codec_type === "video");
  const audio = (meta.streams ?? []).find((s: any) => s.codec_type === "audio");
  const duration = Number(meta.format?.duration ?? 0);

  // ── 流与元数据 ──
  if (!video) {
    checks.push({ name: "video_stream", status: "fail", message: "no video stream" });
  } else {
    const w = Number(video.width), h = Number(video.height);
    checks.push({
      name: "video_stream",
      status: w === opts.width && h === opts.height ? "pass" : "fail",
      message: `${w}x${h} (expected ${opts.width}x${opts.height}), codec ${video.codec_name}, pix_fmt ${video.pix_fmt}`,
    });
    checks.push({
      name: "pixel_format",
      status: video.pix_fmt === "yuv420p" ? "pass" : "warn",
      message: `pix_fmt ${video.pix_fmt} — yuv420p is the compatibility baseline`,
    });
  }

  // BGM 在本 skill 是 MANDATORY — 无音轨即 fail
  checks.push(
    audio
      ? { name: "audio_stream", status: "pass", message: `audio present (${audio.codec_name})` }
      : { name: "audio_stream", status: "fail", message: "no audio stream — BGM is mandatory in this skill" },
  );

  if (opts.expectDuration != null) {
    const drift = Math.abs(duration - opts.expectDuration);
    checks.push({
      name: "duration",
      status: drift <= 1 ? "pass" : "fail",
      message: `duration ${duration.toFixed(2)}s vs expected ${opts.expectDuration}s (drift ${drift.toFixed(2)}s)`,
    });
  } else {
    checks.push({ name: "duration", status: duration > 1 ? "pass" : "fail", message: `duration ${duration.toFixed(2)}s` });
  }

  // ── 信号检测 — 黑帧 / 静帧 / 静音 / 削波 ──
  const black = parseSegments(runFilter(path, "blackdetect=d=0.25:pix_th=0.10", false), "black_start", "black_end", duration);
  checks.push(budgetCheck("black_frames", black, opts.maxBlackSeconds));

  // 静帧检测阈值 3s: 本 skill 的 hold/breathing (≥1.5s) 是设计语言, 只揪真正的死帧
  const freeze = parseSegments(runFilter(path, "freezedetect=n=-60dB:d=3.0", false), "freeze_start", "freeze_end", duration);
  checks.push(budgetCheck("frozen_video", freeze, opts.maxFreezeSeconds));

  if (audio) {
    const silence = parseSegments(runFilter(path, "silencedetect=n=-45dB:d=1.5", true), "silence_start", "silence_end", duration);
    checks.push(budgetCheck("silence", silence, opts.maxSilenceSeconds));

    const volLog = runFilter(path, "volumedetect", true);
    const maxVol = volLog.match(/max_volume:\s*(-?[0-9.]+) dB/);
    if (maxVol) {
      const v = Number(maxVol[1]);
      checks.push({
        name: "clipping",
        status: v > -0.5 ? "warn" : "pass",
        message: `max_volume ${v} dB${v > -0.5 ? " — near/at 0 dB, audio may clip" : ""}`,
      });
    }
  }

  const status: Status = checks.some((c) => c.status === "fail")
    ? "fail"
    : checks.some((c) => c.status === "warn")
      ? "warn"
      : "pass";
  return { status, checks };
}

// ================================================================
// CLI — render-qa.ts <video.mp4> [--expect-duration S] [--width W] [--height H] [--json out.json]
// ================================================================
if (import.meta.url === `file://${process.argv[1]}`) {
  const args = process.argv.slice(2);
  const path = args.find((a) => !a.startsWith("--"));
  const flag = (name: string): string | undefined => {
    const i = args.indexOf(`--${name}`);
    return i >= 0 ? args[i + 1] : undefined;
  };

  if (!path || !existsSync(path)) {
    console.error("usage: render-qa.ts <video.mp4> [--expect-duration S] [--width W] [--height H] [--json report.json]");
    process.exit(1);
  }

  const opts: QaOptions = {
    ...DEFAULTS,
    width: Number(flag("width") ?? DEFAULTS.width),
    height: Number(flag("height") ?? DEFAULTS.height),
    expectDuration: flag("expect-duration") ? Number(flag("expect-duration")) : undefined,
  };

  const report = renderQa(path, opts);
  console.log(`\n${report.status.toUpperCase()} ${path}`);
  for (const c of report.checks) {
    console.log(`  [${c.status.toUpperCase()}] ${c.name}: ${c.message}`);
    for (const s of c.segments ?? []) {
      console.log(`         ${s.start}s – ${s.end}s (${s.duration}s)`);
    }
  }
  console.log(
    "\nWARN windows are timestamps to LOOK AT, not to explain away — extract a frame" +
      "\n(ffmpeg -ss <t> -i video.mp4 -frames:v 1 check.png), Read it, judge: intentional hold or dead frame.",
  );

  const jsonOut = flag("json");
  if (jsonOut) writeFileSync(jsonOut, JSON.stringify(report, null, 2));
  process.exit(report.status === "fail" ? 1 : 0);
}
planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies.Stars: 108kUpdated Claude CodeCodexVerifiedInstall
meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要".Stars: 108kUpdated Claude CodeCodexVerifiedInstall