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

assets/motion-kit/qiaocut-motion.js

View on GitHub
/*
 * QiaoCut Motion Kit — pure-time helpers for code-drawn video scenes.
 *
 * Contract: every visual value is a pure function of time t (seconds).
 * No CSS transitions, timers, requestAnimationFrame state, Math.random or
 * values carried between frames. The renderer may seek to any t in any order.
 *
 * Works in the browser (window.QiaoCutMotion) and in Node (module.exports)
 * so the same math can be unit-tested.
 *
 * Copyright (c) 向阳乔木 — MIT
 */
(function (root, factory) {
  const api = factory();
  if (typeof module === 'object' && module.exports) module.exports = api;
  if (root) root.QiaoCutMotion = api;
}(typeof window !== 'undefined' ? window : null, function () {
  'use strict';

  const clamp = (value, min = 0, max = 1) => Math.min(max, Math.max(min, value));
  const lerp = (a, b, p) => a + (b - a) * p;
  const progress = (t, start, end) => (end <= start ? (t >= end ? 1 : 0) : clamp((t - start) / (end - start)));
  const mix = (a, b, p) => (Array.isArray(a) ? a.map((value, index) => lerp(value, b[index], p)) : lerp(a, b, p));

  // Deliberately no bounce/elastic easing: overshoot comes only from springs.
  const ease = {
    linear: (p) => p,
    outCubic: (p) => 1 - Math.pow(1 - p, 3),
    inOutCubic: (p) => (p < 0.5 ? 4 * p * p * p : 1 - Math.pow(-2 * p + 2, 3) / 2),
    outQuart: (p) => 1 - Math.pow(1 - p, 4),
    inOutQuart: (p) => (p < 0.5 ? 8 * p * p * p * p : 1 - Math.pow(-2 * p + 2, 4) / 2),
    outExpo: (p) => (p >= 1 ? 1 : 1 - Math.pow(2, -10 * p)),
    inOutExpo: (p) => (p <= 0 ? 0 : p >= 1 ? 1 : p < 0.5 ? Math.pow(2, 20 * p - 10) / 2 : (2 - Math.pow(2, -20 * p + 10)) / 2),
    inExpo: (p) => (p <= 0 ? 0 : Math.pow(2, 10 * p - 10))
  };

  function tween(t, start, end, from, to, easing = ease.inOutCubic) {
    return mix(from, to, easing(progress(t, start, end)));
  }

  /*
   * Closed-form damped spring. `response` is the undamped period in seconds
   * (Apple-style), `damping` is the damping ratio (1 = critical, <1 overshoot).
   * Returns position/velocity for an arbitrary start state at elapsed time dt.
   */
  function springState(dt, from, to, velocity = 0, options = {}) {
    const response = Math.max(0.01, options.response == null ? 0.45 : options.response);
    const zeta = Math.max(0.05, options.damping == null ? 0.86 : options.damping);
    if (dt <= 0) return { value: from, velocity };
    const w0 = (2 * Math.PI) / response;
    const x0 = from - to;
    const v0 = velocity;
    let x;
    let v;
    if (Math.abs(zeta - 1) < 1e-6) {
      const e = Math.exp(-w0 * dt);
      const b = v0 + w0 * x0;
      x = (x0 + b * dt) * e;
      v = (b - w0 * (x0 + b * dt)) * e;
    } else if (zeta < 1) {
      const wd = w0 * Math.sqrt(1 - zeta * zeta);
      const e = Math.exp(-zeta * w0 * dt);
      const a = x0;
      const b = (v0 + zeta * w0 * x0) / wd;
      const cos = Math.cos(wd * dt);
      const sin = Math.sin(wd * dt);
      x = e * (a * cos + b * sin);
      v = e * ((b * wd - zeta * w0 * a) * cos - (a * wd + zeta * w0 * b) * sin);
    } else {
      const s = w0 * Math.sqrt(zeta * zeta - 1);
      const r1 = -zeta * w0 + s;
      const r2 = -zeta * w0 - s;
      const c2 = (v0 - r1 * x0) / (r2 - r1);
      const c1 = x0 - c2;
      x = c1 * Math.exp(r1 * dt) + c2 * Math.exp(r2 * dt);
      v = c1 * r1 * Math.exp(r1 * dt) + c2 * r2 * Math.exp(r2 * dt);
    }
    return { value: to + x, velocity: v };
  }

  // Unit step response 0 → 1.
  function spring(dt, options) {
    return springState(dt, 0, 1, 0, options).value;
  }

  /*
   * A value whose target changes many times. keys = [{ t, value }] sorted by t.
   * The result is the sum of one spring per change (superposition of a linear
   * system), so it stays an exact pure function of time.
   */
  function springTrack(t, keys, options) {
    if (!keys || !keys.length) return 0;
    let value = keys[0].value;
    for (let index = 1; index < keys.length; index += 1) {
      const key = keys[index];
      if (t <= key.t) break;
      value += (key.value - keys[index - 1].value) * spring(t - key.t, key.spring || options);
    }
    return value;
  }

  // Settling time until |error| < tolerance of the jump (useful for timing budgets).
  function settleTime(options, tolerance = 0.01) {
    for (let dt = 0; dt < 10; dt += 1 / 240) {
      let settled = true;
      for (let probe = dt; probe < dt + 0.25; probe += 1 / 240) {
        if (Math.abs(1 - spring(probe, options)) > tolerance) { settled = false; break; }
      }
      if (settled) return dt;
    }
    return 10;
  }

  /*
   * Direct manipulation: while held, value follows the pointer function; after
   * release it springs back from the exact position and velocity it had.
   */
  function dragRelease(t, holdStart, releaseAt, pointer, restValue, options) {
    if (t < holdStart) return restValue;
    if (t <= releaseAt) return pointer(t);
    const h = 1 / 240;
    const from = pointer(releaseAt);
    const velocity = (pointer(releaseAt) - pointer(releaseAt - h)) / h;
    return springState(t - releaseAt, from, restValue, velocity, options).value;
  }

  // Stateless deterministic noise: same (index, seed) always gives the same value.
  function random(index, seed = 1) {
    let x = (Math.imul(index | 0, 0x9e3779b1) ^ Math.imul(seed | 0, 0x85ebca77)) >>> 0;
    x = Math.imul(x ^ (x >>> 16), 0x7feb352d) >>> 0;
    x = Math.imul(x ^ (x >>> 15), 0x846ca68b) >>> 0;
    return ((x ^ (x >>> 16)) >>> 0) / 4294967296;
  }

  function stagger(t, start, each, count, duration, easing = ease.outCubic) {
    const values = [];
    for (let index = 0; index < count; index += 1) values.push(easing(progress(t, start + index * each, start + index * each + duration)));
    return values;
  }

  // Beat grid helpers. grid = { bpm, firstBeat, beats: [seconds...] } from qcut audio beats.
  function beatGrid(bpm, firstBeat = 0) {
    const period = 60 / bpm;
    return {
      bpm,
      period,
      firstBeat,
      beat: (n) => firstBeat + n * period,
      bar: (n, beatsPerBar = 4) => firstBeat + n * beatsPerBar * period,
      index: (t) => Math.floor((t - firstBeat) / period + 1e-9),
      phase: (t) => {
        const raw = (t - firstBeat) / period;
        return raw - Math.floor(raw);
      }
    };
  }

  // Short swap blur for content changing inside a morphing container.
  function swap(t, at, duration = 0.18) {
    const p = progress(t, at - duration / 2, at + duration / 2);
    return {
      outgoing: 1 - ease.outCubic(clamp(p * 2)),
      incoming: ease.outCubic(clamp(p * 2 - 1)),
      blur: Math.sin(Math.PI * p) * 8
    };
  }

  /*
   * Register the scene. seek(t) may return a Promise (e.g. awaiting image decodes).
   * In capture, QiaoCut calls window.__QIAOCUT_SET_TIME__(ms). In a normal browser
   * tab the scene plays in real time for preview (add ?t=2.5 to freeze a frame).
   */
  function register(seek, options = {}) {
    if (typeof window === 'undefined') return seek;
    const duration = options.duration || 10;
    window.__QIAOCUT_SET_TIME__ = (ms) => seek(ms / 1000);
    window.__QIAOCUT_DURATION__ = duration;
    const params = new URLSearchParams(window.location.search);
    const captured = navigator.webdriver === true;
    if (captured) return seek;
    if (params.has('t')) {
      seek(Number(params.get('t')) || 0);
      return seek;
    }
    const startedAt = performance.now();
    const loop = () => {
      const elapsed = ((performance.now() - startedAt) / 1000) % duration;
      Promise.resolve(seek(elapsed)).then(() => requestAnimationFrame(loop));
    };
    requestAnimationFrame(loop);
    return seek;
  }

  // Real footage as a JPEG sequence (ffmpeg -vf fps=30 clip/%04d.jpg). at(t) awaits decode.
  function imageSequence(img, pattern, count, fps = 30) {
    let current = null;
    return {
      at(t) {
        const index = clamp(Math.floor(t * fps), 0, count - 1) + 1;
        const src = pattern.replace(/%0?(\d*)d/, (_, width) => String(index).padStart(Number(width) || 0, '0'));
        if (src === current) return Promise.resolve();
        current = src;
        img.src = src;
        return img.decode().catch(() => {});
      }
    };
  }

  return {
    clamp, lerp, mix, progress, ease, tween,
    spring, springState, springTrack, settleTime, dragRelease,
    random, stagger, beatGrid, swap, register, imageSequence
  };
}));
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: 323kUpdated 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