Skip to content

joeseesun/qiaomu-cut-skill

qiaomu-cut

Verified

把一句话需求转成可复现、可验收视频工程的乔木智能剪辑导演。Use when the user asks to create, plan, edit, remix, explain, narrate, subtitle, animate, composite, or render a video—including one-line requests such as “制作一个科普视频:介绍 LLM 中的 RL”. Builds English-learning movie mixes, person profiles, explainers, code-drawn motion graphics (UI morph loops, showreels, kinetic-type promos, line-art/pixel/Three.js animation, lyric MVs), product launch videos, cinematic shorts, social clips, course/PPT videos, AI image/video/TTS/music-assisted stories, stock-footage stories, or multi-source montage. Routes across 33台词, ClipSeek/open media, local files, ListenHub, image generation, HTML/SVG/Canvas motion graphics with beat-grid storyboards and determinism probes, Manim, ffmpeg-full, captions, sound design, frame-0 video covers with YouTube thumbnails, and release checks.

FileKindSize
SKILL.mdskill md54.0 KB
agents/interface.yamlconfig17.2 KB
agents/openai.yamlconfig323 B
assets/explainer-social/base.cssother24.9 KB
assets/explainer-social/component-runtime.jsscript41.1 KB
assets/explainer-social/scene-shell.htmlother829 B
assets/motion-kit/qiaocut-motion.jsscript8.2 KB
assets/qiaomu-profile/qiaomu_avatar.jpegbinary5.6 MB
assets/qiaomu-profile/qiaomu_reward_qr.pngbinary515.9 KB
assets/qiaomu-profile/qiaomu_wechat_public_account_qr.jpgbinary8.3 KB
references/ad-concept-library.mdmarkdown6.5 KB
references/aesthetic-preferences.mdmarkdown3.0 KB
references/brand-card-templates.mdmarkdown1.6 KB
references/chinese-font-themes.mdmarkdown804 B
references/cinematic-techniques.mdmarkdown2.8 KB
references/code-motion-direction.mdmarkdown11.1 KB
references/cover-thumbnail-method.mdmarkdown6.4 KB
references/english-mix-fast-path.mdmarkdown6.0 KB
references/explainer-autopilot.mdmarkdown11.1 KB
references/feedback-evolution.mdmarkdown37.6 KB
references/ffmpeg-full.mdmarkdown1.7 KB
references/incremental-production.mdmarkdown4.4 KB
references/licensing.mdmarkdown1.9 KB
references/listenhub-provider.mdmarkdown12.6 KB
references/motion-prompt-patterns.mdmarkdown9.3 KB
references/movie-montage-fast-path.mdmarkdown4.4 KB
references/qiaocut-ir.mdmarkdown4.2 KB
references/renderer-engines.mdmarkdown3.3 KB
references/schemas/qiaocut.timeline.v1.schema.jsonconfig7.2 KB
references/social-safe-zones.mdmarkdown3.3 KB
references/source-adapters.mdmarkdown5.7 KB
references/source-selection-gate.mdmarkdown2.5 KB
references/styles/cinematic.mdmarkdown475 B
references/styles/explainer.mdmarkdown1.5 KB
references/styles/social-short.mdmarkdown383 B
references/timeline-schema.mdmarkdown12.2 KB
references/trust-boundary.mdmarkdown3.0 KB
references/workflows.mdmarkdown7.5 KB
scripts/adapters/33tc.jsscript2.1 KB
scripts/adapters/33tc_cli.jsscript4.8 KB
scripts/adapters/clipseek.jsexecutablescript5.4 KB
scripts/adapters/listenhub.jsscript35.7 KB
scripts/adapters/listenhub_cli.jsexecutablescript2.1 KB
scripts/adapters/local.jsscript2.4 KB
scripts/audio_beats.jsscript17.5 KB
scripts/bilingual_typography_smoke.jsscript1.4 KB
scripts/bootstrap_listenhub.shexecutablescript5.4 KB
scripts/bootstrap_macos.shexecutablescript2.5 KB
scripts/brand_templates.jsscript2.4 KB
scripts/brand_templates_smoke.jsscript869 B
scripts/complete_sentence.jsscript3.9 KB
scripts/component_motion_smoke.jsscript21.2 KB
scripts/concept_smoke.jsscript5.6 KB
scripts/cover.jsscript9.1 KB
scripts/cover_smoke.jsscript5.1 KB
scripts/english_mix.jsscript24.1 KB
scripts/english_mix_smoke.jsscript5.7 KB
scripts/explainer_beats.jsscript6.7 KB
scripts/explainer_beats_smoke.jsscript4.8 KB
scripts/explainer_cognitive_timing_smoke.jsscript5.8 KB
scripts/explainer_e2e_smoke.jsscript7.4 KB
scripts/explainer_pipeline.jsscript49.3 KB
scripts/explainer_pipeline_smoke.jsscript12.7 KB
scripts/explainer_spec.jsscript51.4 KB
scripts/explainer_timing.jsscript8.6 KB
scripts/fetch_generated.jsexecutablescript17.4 KB
scripts/ffmpeg_retry_shim_smoke.jsscript2.3 KB
scripts/file_narration_smoke.jsexecutablescript6.6 KB
scripts/ingest_asset.jsexecutablescript15.0 KB
scripts/kinetic_caption_smoke.jsscript1.4 KB
scripts/license_report.jsexecutablescript2.3 KB
scripts/listenhub_narration.jsexecutablescript11.0 KB
scripts/listenhub_smoke.jsexecutablescript26.7 KB
scripts/local_preferences.jsscript1.8 KB
scripts/motion_studio.jsscript55.9 KB
scripts/motion_studio_smoke.jsscript11.0 KB
scripts/movie_montage.jsscript24.7 KB
scripts/movie_montage_smoke.jsscript4.0 KB
scripts/qcut.jsexecutablescript40.8 KB
scripts/release_check.jsscript7.0 KB
scripts/render_project.jsscript85.1 KB
scripts/render_scene.jsscript26.4 KB
scripts/renderers/ass.jsexecutablescript2.7 KB
scripts/renderers/bilingual_ass.jsscript12.6 KB
scripts/renderers/html_scene.jsexecutablescript3.9 KB
scripts/renderers/procedural_music.jsscript7.6 KB
scripts/scene_content_cache.jsscript3.2 KB
scripts/scene_renderer_smoke.jsscript2.8 KB
scripts/security_smoke.jsscript10.2 KB
scripts/sentence_boundary_smoke.jsscript1.6 KB
scripts/setup_deps.jsscript8.4 KB
scripts/shims/ffmpegexecutablescript3.0 KB
scripts/source_review.jsexecutablescript5.1 KB
scripts/timeline_features_smoke.jsscript3.7 KB
scripts/trigger_eval.pyexecutablescript2.5 KB
scripts/validate_skill.pyexecutablescript3.1 KB
scripts/verify_marswave_vendor.jsexecutablescript3.5 KB
scripts/verify_video.jsexecutablescript3.4 KB

scripts/explainer_pipeline_smoke.js

View on GitHub
#!/usr/bin/env node
'use strict';

const assert = require('assert');
const fs = require('fs');
const os = require('os');
const path = require('path');
const {
  checkProject,
  duplicateCaptionFindings,
  initProject,
  lintAesthetics,
  materializeProductionSpec
} = require('./explainer_pipeline');
const { checkProductionSpec, defaultProductionSpec } = require('./explainer_spec');

const root = fs.mkdtempSync(path.join(os.tmpdir(), 'qiaocut-explainer-autopilot-'));
const realWorldRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'qiaocut-real-world-visual-'));
try {
  const genericThirtySecondSpec = defaultProductionSpec('先进先出', 30);
  assert.equal(genericThirtySecondSpec.output.targetDuration, 30);
  assert.equal(genericThirtySecondSpec.output.duration, 28.5);
  assert.equal(genericThirtySecondSpec.cover.eyebrow, '概念科普');
  assert.equal(genericThirtySecondSpec.contractVersion, 5);
  assert.equal(genericThirtySecondSpec.visualEvidence.topicKind, 'abstract');
  const realWorldSpec = defaultProductionSpec('北京大学', 60);
  assert.equal(realWorldSpec.visualEvidence.topicKind, 'real-world');
  assert.equal(realWorldSpec.visualEvidence.imageSearchRequired, true);
  assert.equal(realWorldSpec.visualEvidence.minimumSourceImages, 3);
  assert.equal(realWorldSpec.scenes[0].component, 'evidence-photo');
  assert.equal(realWorldSpec.scenes[0].photoMotion, 'reveal-left');
  assert.equal(realWorldSpec.scenes[1].component, 'timeline-story');
  assert.equal(realWorldSpec.scenes[2].component, 'relationship-map');
  realWorldSpec.contentLocked = true;
  fs.writeFileSync(path.join(realWorldRoot, 'production-spec.json'), `${JSON.stringify(realWorldSpec, null, 2)}\n`);
  const missingRealWorldEvidence = checkProductionSpec(realWorldRoot, { noCache: true });
  assert.equal(missingRealWorldEvidence.ok, false);
  assert(missingRealWorldEvidence.repairPlan.some((item) => item.rule === 'image-search-queries'));
  assert(missingRealWorldEvidence.repairPlan.some((item) => item.rule === 'source-image-coverage'));
  assert(missingRealWorldEvidence.repairPlan.some((item) => item.rule === 'scene-image-asset'));
  realWorldSpec.scenes.filter((scene) => scene.component === 'evidence-photo').forEach((scene) => { scene.photoMotion = 'push-in'; });
  fs.writeFileSync(path.join(realWorldRoot, 'production-spec.json'), `${JSON.stringify(realWorldSpec, null, 2)}\n`);
  const monotonousPhotoMotion = checkProductionSpec(realWorldRoot, { noCache: true });
  assert.equal(monotonousPhotoMotion.ok, false);
  assert(monotonousPhotoMotion.repairPlan.some((item) => item.rule === 'photo-motion-diversity'));
  assert(monotonousPhotoMotion.repairPlan.some((item) => item.rule === 'photo-scale-forbidden'));
  const result = initProject(root, { topic: 'LLM 中的 RL', duration: 75 });
  assert.equal(result.ok, true);
  assert.equal(result.workflow, 'explainer-social');
  assert.equal(result.voiceName, '向阳乔木 v1.1');
  assert.equal(checkProject(root, 'init').ok, true);

  const plan = JSON.parse(fs.readFileSync(path.join(root, 'explainer-plan.json'), 'utf8'));
  assert.equal(plan.aesthetics.forbidLeftAccentBars, true);
  assert.equal(plan.aesthetics.forbidSimultaneousSceneCaptionEcho, true);
  assert.equal(plan.execution.renderHtmlViaImage2Pipe, true);
  assert.equal(plan.execution.reuseOneBrowserPerBatch, true);
  assert.equal(plan.execution.sharedContentAddressedSceneCache, true);
  assert.deepEqual(plan.execution.parallelAfterSpecLock, ['listenhub-narration', 'component-materialization', 'optional-image-assets']);
  assert.equal(plan.narration.format, 'mp3');
  const ir = JSON.parse(fs.readFileSync(path.join(root, 'qiaocut-ir.json'), 'utf8'));
  assert.equal(ir.workflow.id, 'explainer-social');
  assert.equal(ir.output.durationSeconds, 75);
  assert.equal(ir.generation.narration.preferredVoiceName, '向阳乔木 v1.1');
  assert(ir.style.visualBible.negativePrompt.some((item) => item.includes('vertical accent stripe')));
  fs.writeFileSync(path.join(root, 'narration.txt'), '作者内容不得被 init 覆盖');
  initProject(root, { topic: '另一个标题也不应覆盖已有工程' });
  assert.equal(fs.readFileSync(path.join(root, 'narration.txt'), 'utf8'), '作者内容不得被 init 覆盖');

  const productionSpecFile = path.join(root, 'production-spec.json');
  const productionSpec = JSON.parse(fs.readFileSync(productionSpecFile, 'utf8'));
  productionSpec.contentLocked = true;
  productionSpec.claims = [
    { text: '强化学习通过奖励信号优化策略。', sourceUrl: 'https://example.test/primary-source-1' },
    { text: '语言模型训练中的奖励来自可观测反馈。', sourceUrl: 'https://example.test/primary-source-2' }
  ];
  productionSpec.narrationSegments.forEach((segment, index) => {
    segment.text = `第${index + 1}段解释强化学习如何从环境反馈中调整策略,并说明它在语言模型中的作用边界。`;
  });
  productionSpec.scenes.forEach((scene, index) => {
    scene.cognitiveTask = `让观众理解第${index + 1}个概念在整体机制中的作用`;
    scene.title = `场景 ${index + 1}`;
    scene.keyword = `概念 ${index + 1}`;
    scene.body = '用图形关系解释机制。';
    scene.onScreenText = [`概念 ${index + 1}`];
    scene.captionText = `这一段补充第${index + 1}个机制的条件和原因`;
    scene.items = ['输入', '反馈', '更新'];
    scene.visibleChange = scene.purpose === 'mechanism'
      ? { kind: 'process', from: '输入与反馈彼此分离', to: '反馈驱动策略更新' }
      : { kind: 'none', from: '', to: '' };
    scene.visualMechanism = {
      kind: scene.visualMechanism.kind,
      input: `第${index + 1}段输入状态`,
      process: `第${index + 1}段因果过程`,
      output: `第${index + 1}段可见结果`
    };
  });
  const outroNarration = productionSpec.narrationSegments.find((segment) => segment.purpose === 'outro')
    || productionSpec.narrationSegments[productionSpec.narrationSegments.length - 1];
  const outroScene = productionSpec.scenes.find((scene) => scene.purpose === 'outro')
    || productionSpec.scenes[productionSpec.scenes.length - 1];
  // Intentional incomplete brand CTA for negative gate tests below.
  const mechanism = productionSpec.scenes.find((scene) => scene.purpose === 'mechanism');
  mechanism.visibleChange = { kind: 'none', from: '', to: '' };
  fs.writeFileSync(productionSpecFile, `${JSON.stringify(productionSpec, null, 2)}\n`);
  const missingChange = checkProject(root, 'spec');
  assert.equal(missingChange.ok, false);
  assert(missingChange.repairPlan.some((item) => item.rule === 'mechanism-without-change'));
  mechanism.visibleChange = { kind: 'process', from: '输入与反馈彼此分离', to: '反馈驱动策略更新' };
  fs.writeFileSync(productionSpecFile, `${JSON.stringify(productionSpec, null, 2)}\n`);
  const missingSpokenBrand = checkProject(root, 'spec');
  assert.equal(missingSpokenBrand.ok, false);
  assert(missingSpokenBrand.repairPlan.some((item) => item.rule === 'outro-spoken-brand-cta'));
  assert(missingSpokenBrand.repairPlan.some((item) => item.rule === 'outro-visual-brand-cta'));
  outroNarration.text = '所以看懂反馈循环,就看懂了大半对齐新闻。关注向阳乔木,继续拆解大模型关键词。';
  outroScene.keyword = '向阳乔木';
  outroScene.body = '@vista8 · 关注我,继续拆解大模型关键词';
  outroScene.onScreenText = ['向阳乔木', '@vista8 · 关注我,继续拆解大模型关键词'];
  outroScene.captionText = '看懂反馈循环,就看懂了对齐新闻的一半';
  fs.writeFileSync(productionSpecFile, `${JSON.stringify(productionSpec, null, 2)}\n`);
  const firstSpecCheck = checkProject(root, 'spec');
  assert.equal(firstSpecCheck.ok, true);
  assert.equal(firstSpecCheck.productionSpec.cacheHit, false);
  const secondSpecCheck = checkProject(root, 'spec');
  assert.equal(secondSpecCheck.productionSpec.cacheHit, true);
  const originalComponents = productionSpec.scenes.map((scene) => ({ component: scene.component, primaryFocus: scene.primaryFocus }));
  productionSpec.scenes.filter((scene) => scene.purpose !== 'outro').forEach((scene) => {
    scene.component = 'definition';
    scene.primaryFocus = 'focus-stage';
  });
  fs.writeFileSync(productionSpecFile, `${JSON.stringify(productionSpec, null, 2)}\n`);
  const monotonousSpec = checkProject(root, 'spec');
  assert.equal(monotonousSpec.ok, false);
  assert(monotonousSpec.repairPlan.some((item) => item.rule === 'component-diversity'));
  assert(monotonousSpec.repairPlan.some((item) => item.rule === 'explanatory-component-coverage'));
  assert(monotonousSpec.repairPlan.some((item) => item.rule === 'generic-card-overuse'));
  productionSpec.scenes.forEach((scene, index) => Object.assign(scene, originalComponents[index]));
  fs.writeFileSync(productionSpecFile, `${JSON.stringify(productionSpec, null, 2)}\n`);
  const materialized = materializeProductionSpec(root);
  assert.equal(materialized.generatedScenes, 7);
  assert(materialized.changed.includes('timeline.json'));
  assert.equal(materialized.cover && materialized.cover.id, 's00_cover');
  const coverScenePlan = JSON.parse(fs.readFileSync(path.join(root, 'scene-plan.json'), 'utf8'));
  assert.equal(coverScenePlan.scenes[0].id, 's00_cover');
  assert.equal(coverScenePlan.scenes[0].duration, 1.5);
  assert.equal(coverScenePlan.scenes.length, 8);
  assert.equal(coverScenePlan.scenes[3].cognitiveTask, '让观众理解第3个概念在整体机制中的作用');
  assert.equal(coverScenePlan.scenes[3].visibleChange.kind, 'process');
  const coverTimeline = JSON.parse(fs.readFileSync(path.join(root, 'timeline.json'), 'utf8'));
  assert.equal(coverTimeline.shots[0].id, 's00_cover');
  assert.equal(coverTimeline.narration.start, 1.5);
  assert.equal(coverTimeline.output.duration, 75);
  const coverCaptions = JSON.parse(fs.readFileSync(path.join(root, 'captions', 'captions.json'), 'utf8'));
  assert.equal(coverCaptions.events[0].start, 1.5);
  assert(fs.existsSync(path.join(root, 'scenes', 's00_cover.html')));
  const reusedMaterialization = materializeProductionSpec(root);
  assert.equal(reusedMaterialization.changed.length, 0);
  assert.equal(reusedMaterialization.reused, true);
  const scenePlan = JSON.parse(fs.readFileSync(path.join(root, 'scene-plan.json'), 'utf8'));
  assert.equal(checkProject(root, 'author').ok, true);

  const firstScene = path.join(root, scenePlan.scenes[0].source);
  fs.appendFileSync(firstScene, '<style>.callout{border-left:6px solid red}</style>');
  const aesthetics = lintAesthetics(root);
  assert(aesthetics.some((finding) => finding.rule === 'left-border-accent'));
  assert.equal(checkProject(root, 'author').ok, false);

  fs.writeFileSync(firstScene, '<!doctype html><meta charset="utf-8"><main class="card"><span>答案叫:</span><strong>知识蒸馏</strong></main>\n');
  fs.writeFileSync(path.join(root, 'captions', 'captions.json'), JSON.stringify({
    events: [{ start: 0, end: 2, style: 'Chinese', text: '答案叫:知识蒸馏' }]
  }));
  let duplicates = duplicateCaptionFindings(root);
  assert.equal(duplicates.length, 1);
  assert.equal(duplicates[0].matchMode, 'visible-dom');
  const duplicateGate = checkProject(root, 'author');
  assert.equal(duplicateGate.ok, false);
  assert(duplicateGate.repairPlan.some((item) => item.rule === 'simultaneous-caption-echo'));

  fs.writeFileSync(firstScene, '<!doctype html><meta charset="utf-8"><main id="answer"></main><script>answer.innerHTML = `<span>答案叫:</span><strong>知识蒸馏</strong>`;</script>\n');
  duplicates = duplicateCaptionFindings(root);
  assert.equal(duplicates.length, 1);
  assert.equal(duplicates[0].matchMode, 'dynamic-source');

  fs.writeFileSync(path.join(root, 'captions', 'captions.json'), JSON.stringify({
    events: [{ start: 70, end: 72, style: 'Chinese', text: '答案叫:知识蒸馏' }]
  }));
  assert.equal(duplicateCaptionFindings(root).length, 0);

  fs.writeFileSync(path.join(root, 'captions', 'captions.json'), JSON.stringify({
    events: [{ start: 0, end: 2, style: 'Chinese', text: '答案叫:知识蒸馏,它把能力迁移给学生模型' }]
  }));
  assert.equal(duplicateCaptionFindings(root).length, 0);

  process.stdout.write(`${JSON.stringify({
    ok: true,
    checks: ['target-duration-includes-cover', 'generic-topic-label', 'one-shot-init', 'production-spec-gate-cache', 'cognitive-contract-gate', 'visual-mechanism-contract', 'component-diversity-gate', 'generic-card-overuse-gate', 'real-world-image-discovery-gate', 'chart-semantics-contract', 'photo-motion-diversity-gate', 'deterministic-materialization', 'default-cover-shot', 'parallel-lanes-contract', 'left-accent-ban', 'short-split-copy-block', 'dynamic-copy-block', 'time-aware-copy-check', 'structured-repair-plan']
  }, null, 2)}\n`);
} finally {
  fs.rmSync(root, { recursive: true, force: true });
  fs.rmSync(realWorldRoot, { recursive: true, force: true });
}
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall