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/critique-scenes.ts

View on GitHub
#!/usr/bin/env -S node --experimental-strip-types --no-warnings=ExperimentalWarning
/**
 * [INPUT]: 生成项目的 `scene-constitution.json` 与 Remotion Composition `LaunchVideo`,
 *          依赖系统 `npx remotion still` 与 `claude -p --output-format json` 做视觉评审。
 * [OUTPUT]: 对外提供 critiqueScenes(projectDir, roundDir),渲染每一幕代表帧,调用
 *          vision LLM 返回严格 JSON critique,写入 `.iterate/round-N/critique.json`。
 * [POS]: scripts/ 内的"品味回路"第一环,为 regenerate-scene.ts 与 iterate.ts 提供评分与指令。
 * [PROTOCOL]: 变更时更新此头部,然后检查 AGENTS.md
 */
import { execFileSync, spawnSync } from "node:child_process";
import { mkdirSync, readFileSync, writeFileSync, existsSync } from "node:fs";
import { join, resolve } from "node:path";

// ================================================================
// 代表帧位置 — 每一幕各取一帧 (开场 + 中段) 看首印象和持续力
// ================================================================
const ACT_BEATS: Array<{
  id: "authority" | "reveal" | "showcase" | "proof" | "close";
  label: string;
  // offset into the act as a fraction
  samples: Array<{ name: string; at: number }>;
}> = [
  { id: "authority", label: "Act 1 · Authority", samples: [{ name: "open", at: 0.35 }] },
  { id: "reveal", label: "Act 2 · Reveal", samples: [{ name: "peak", at: 0.55 }] },
  { id: "showcase", label: "Act 3 · Showcase", samples: [{ name: "mid", at: 0.5 }] },
  { id: "proof", label: "Act 4 · Proof", samples: [{ name: "climax", at: 0.5 }] },
  { id: "close", label: "Act 5 · Close", samples: [{ name: "cta", at: 0.6 }] },
];

const DEFAULT_ACT_SECONDS: Record<string, number> = {
  authority: 5,
  reveal: 6,
  showcase: 14,
  proof: 8,
  close: 7,
};

// ================================================================
// 帧位置计算 — 把 act-local offset 换成 global frame (fps=30)
// ================================================================
function resolveFrames(projectDir: string) {
  const constitutionPath = join(projectDir, "scene-constitution.json");
  const constitution = JSON.parse(readFileSync(constitutionPath, "utf8")) as {
    pacingProfile?: { durationSeconds?: number; targetActs?: Record<string, number> };
    sceneList?: Array<{ id: string; purpose?: string; copyPayload?: string[] }>;
  };
  const targetActs = constitution.pacingProfile?.targetActs ?? DEFAULT_ACT_SECONDS;
  const fps = 30;

  let cursor = 0;
  const frames: Array<{ actId: string; label: string; sampleName: string; frame: number; purpose: string; copy: string[] }> = [];
  for (const beat of ACT_BEATS) {
    const actSeconds = targetActs[beat.id] ?? DEFAULT_ACT_SECONDS[beat.id] ?? 5;
    const actFrames = Math.round(actSeconds * fps);
    const scene = constitution.sceneList?.find((s) => s.id === beat.id);
    for (const sample of beat.samples) {
      const offsetFrames = Math.round(actFrames * sample.at);
      frames.push({
        actId: beat.id,
        label: beat.label,
        sampleName: sample.name,
        frame: cursor + offsetFrames,
        purpose: scene?.purpose ?? "",
        copy: scene?.copyPayload ?? [],
      });
    }
    cursor += actFrames;
  }
  return frames;
}

// ================================================================
// remotion still — 生成单帧 PNG,缺 remotion 或失败立即抛错
// ================================================================
function renderStill(projectDir: string, frame: number, outPath: string): void {
  const args = [
    "remotion",
    "still",
    "src/index.ts",
    "LaunchVideo",
    outPath,
    `--frame=${frame}`,
    "--image-format=png",
    "--log=error",
  ];
  const res = spawnSync("npx", args, {
    cwd: projectDir,
    stdio: ["ignore", "inherit", "inherit"],
  });
  if (res.status !== 0) {
    throw new Error(`remotion still failed for frame ${frame}`);
  }
}

// ================================================================
// critique schema — 强约束的 JSON,5 维评分 + 最弱场景 + 具体指令
// ================================================================
const CRITIQUE_SCHEMA = {
  type: "object",
  additionalProperties: false,
  required: ["scenes", "weakest", "overallScore", "summary"],
  properties: {
    overallScore: { type: "number", minimum: 0, maximum: 10 },
    summary: { type: "string" },
    weakest: {
      type: "object",
      additionalProperties: false,
      required: ["actId", "why", "directive"],
      properties: {
        actId: { type: "string", enum: ["authority", "reveal", "showcase", "proof", "close"] },
        why: { type: "string" },
        directive: { type: "string" },
      },
    },
    scenes: {
      type: "array",
      items: {
        type: "object",
        additionalProperties: false,
        required: ["actId", "scores", "issues", "wins"],
        properties: {
          actId: { type: "string", enum: ["authority", "reveal", "showcase", "proof", "close"] },
          scores: {
            type: "object",
            additionalProperties: false,
            required: ["hook", "clarity", "focus", "readability", "composition"],
            properties: {
              hook: { type: "number", minimum: 0, maximum: 10 },
              clarity: { type: "number", minimum: 0, maximum: 10 },
              focus: { type: "number", minimum: 0, maximum: 10 },
              readability: { type: "number", minimum: 0, maximum: 10 },
              composition: { type: "number", minimum: 0, maximum: 10 },
            },
          },
          issues: { type: "array", items: { type: "string" } },
          wins: { type: "array", items: { type: "string" } },
        },
      },
    },
  },
} as const;

// ================================================================
// vision 调用 — claude -p --output-format json --json-schema
// ================================================================
function invokeCritic(framesDir: string, frames: ReturnType<typeof resolveFrames>, brandName: string): unknown {
  const header = [
    `你是一个 $50k 代理商级别的 motion director,正在对一个 40s brand launch 首稿做 critique。`,
    `品牌: ${brandName}`,
    ``,
    `评分维度 (0-10):`,
    `- hook: 3 秒内是否建立悬念或权威`,
    `- clarity: 一眼能否看懂这幕在讲什么`,
    `- focus: 视觉焦点是否单一、是否有无关装饰干扰`,
    `- readability: 文字是否够大 (≥28px)、对比是否够、是否压字在复杂背景`,
    `- composition: 画面平衡、留白、安全区是否合格`,
    ``,
    `对每一幕,读取对应 PNG 文件 (路径见下),打分、列 issues/wins,`,
    `最后指出 weakest 场景和一条"可执行"指令。指令必须是单一的、可直接编辑的代码改动,`,
    `例如: "把 headline fontSize 从 72 提到 112"、"移除 subtitle 那行 rgba(255,255,255,0.5) 文字"、`,
    `"Act3 用 TerminalWindow 替换当前的文字 panel"。禁止写"优化一下布局"之类的空话。`,
    ``,
    `帧清单:`,
    ...frames.map((f, i) => `${i + 1}. ${f.label} (${f.sampleName}) — purpose: ${f.purpose} — copy: ${JSON.stringify(f.copy)} — file: ${join(framesDir, `${f.actId}-${f.sampleName}.png`)}`),
    ``,
    `严格输出 JSON,匹配提供的 schema。`,
  ].join("\n");

  const args = [
    "-p",
    "--model", "sonnet",
    "--output-format", "json",
    "--json-schema", JSON.stringify(CRITIQUE_SCHEMA),
    "--add-dir", framesDir,
    "--allowedTools", "Read",
    "--max-turns", "12",
    header,
  ];

  const res = spawnSync("claude", args, {
    stdio: ["ignore", "pipe", "inherit"],
    maxBuffer: 16 * 1024 * 1024,
    encoding: "utf8",
  });
  if (res.status !== 0) {
    throw new Error(`claude critique invocation failed (exit ${res.status})`);
  }
  // claude -p --output-format json wraps result under { result, ... }
  const parsed = JSON.parse(res.stdout) as { result?: string; subtype?: string };
  if (!parsed.result) {
    throw new Error("claude critique returned no result field");
  }
  // result may itself be a JSON string or a fenced block
  const inner = parsed.result.trim().replace(/^```json\s*/i, "").replace(/```$/g, "").trim();
  return JSON.parse(inner);
}

// ================================================================
// 主流程 — 渲帧、喂 critic、写 critique.json
// ================================================================
export async function critiqueScenes(projectDir: string, roundDir: string): Promise<void> {
  const absProject = resolve(projectDir);
  const absRound = resolve(roundDir);
  const framesDir = join(absRound, "frames");
  mkdirSync(framesDir, { recursive: true });

  const frames = resolveFrames(absProject);
  console.log(`[critique] rendering ${frames.length} representative frames...`);
  for (const f of frames) {
    const out = join(framesDir, `${f.actId}-${f.sampleName}.png`);
    if (!existsSync(out)) {
      renderStill(absProject, f.frame, out);
    }
    console.log(`  ✓ ${f.label} frame ${f.frame} → ${out}`);
  }

  const brandReport = JSON.parse(
    readFileSync(join(absProject, "brand-report.json"), "utf8"),
  ) as { brand?: { name?: string } };
  const brandName = brandReport.brand?.name ?? "Unknown";

  console.log(`[critique] invoking vision critic for ${brandName}...`);
  const critique = invokeCritic(framesDir, frames, brandName);
  const critiquePath = join(absRound, "critique.json");
  writeFileSync(critiquePath, JSON.stringify(critique, null, 2));
  console.log(`[critique] wrote ${critiquePath}`);
}

// ================================================================
// CLI — critique-scenes <project-dir> [--round N]
// ================================================================
if (import.meta.url === `file://${process.argv[1]}`) {
  const args = process.argv.slice(2);
  const projectDir = args.find((a) => !a.startsWith("--")) ?? process.cwd();
  const roundIdx = args.indexOf("--round");
  const round = roundIdx >= 0 ? Number(args[roundIdx + 1]) : 1;
  const roundDir = join(projectDir, ".iterate", `round-${round}`);
  critiqueScenes(projectDir, roundDir).catch((err) => {
    console.error(err);
    process.exit(1);
  });
}

// silence unused import warning in strip-types mode
void execFileSync;
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