Communitygithub.com

siweimidu/code-video-infinite

用代码做视频的唯一入口:一句需求 → 成片 MP4 + 可编辑源码。内置五个引擎(onetake / video-shotcraft / claude-motion / mg-motion / wise-motion)与 880 条可检索素材(124 张 Remotion 镜头配方卡、462 条通用动效条目、47 套动画源码案例、20 个源码组件、30 个物件模型、14 个场景起点、15 种 MG 风格签名技法、35 个纯时间动效函数、6 套起始 look),共用一套节奏语法、声音规范与三道质检闸。Use when 用户要做动效 / MG / motion design / 产品宣传片 / 发布片 / teaser / 功能演示 / 网页或截图变视频 / 转场与文字动效 / 复刻某个动效 / 用 Remotion 或逐帧渲染做片,或抱怨成片「像 PPT、没节奏、一个一个展示」。NOT for 实拍剪辑与长视频、只想要内容摘要、只出图不出片、品牌 logo 设计。

code-video-infinite 是什么?

code-video-infinite is a Claude Code agent skill that 用代码做视频的唯一入口:一句需求 → 成片 MP4 + 可编辑源码。内置五个引擎(onetake / video-shotcraft / claude-motion / mg-motion / wise-motion)与 880 条可检索素材(124 张 Remotion 镜头配方卡、462 条通用动效条目、47 套动画源码案例、20 个源码组件、30 个物件模型、14 个场景起点、15 种 MG 风格签名技法、35 个纯时间动效函数、6 套起始 look),共用一套节奏语法、声音规范与三道质检闸。Use when 用户要做动效 / MG / motion design / 产品宣传片 / 发布片 / teaser / 功能演示 / 网页或截图变视频 / 转场与文字动效 / 复刻某个动效 / 用 Remotion 或逐帧渲染做片,或抱怨成片「像 PPT、没节奏、一个一个展示」。NOT for 实拍剪辑与长视频、只想要内容摘要、只出图不出片、品牌 logo 设计。.

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add siweimidu/Code-Video-Infinite

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

code-video-infinite 是做什么的?

Frames aren't "generated" — they are "written". There is no image/video generation model here: a video is either an HTML page or a Remotion project. Give it a time t, it draws that frame; headless browser or Remotion renders frame by frame, ffmpeg composites audio. Sound can also be code-synthesized. Therefore every video can be arbitrarily seeked, re-rendered at will, and a new version never drifts from the previous one.

This skill is the merger of five engines: one entry point, one pipeline, three gates — each engine retains its full depth documentation and assets.

0 · Run these two first (30 seconds, don't skip)

node scripts/doctor.mjs          # Environment: Node / ffmpeg / ffprobe / Python / Chrome / all five engines present
node scripts/find.mjs --stats    # Directory: 880 assets counted by source and collection

If doctor shows FAIL, fix the environment before creating. Install Chrome or npx playwright install chromium if Chrome is missing; on Windows, if npm is blocked by execution policy, use npm.cmd.

1 · Pick the engine first, then discuss style

The user's requirements decide the engine, not the richness of the catalog. A video uses only one main engine by default; the second engine is only used to fetch assets.

What the requirement looks likeEngineIts strengthWhat you pay out of the box
15–30s product/launch/skill motion reel, needs rhythm, camera movement, "not PPT-like"onetakeSingle HTML composition, real shutter motion blur, synthesized sound effects, rhythm and transition oraclePython + Chrome; 4K60 rendering is slow (estimate time first)
Product promo, cinematic feel, real web page footage, multi-shot narrative, needs to edit in CapCut later, for social platformsshotcraft124 shot cards + Ink Press template + real page capture + Freesound audio selection + workbenchNode + Remotion (npm install); Remotion has its own license
Specific shapes, materials, 3D objects, characters & animals, hand-drawn papercraft, runnable scenesclaude-motion47 source code cases + 20 source components + 30 object models + 14 scene starters, fidelity source code not style tagsNode ≥ 22 + Playwright Chromium + ffmpeg; large asset volume
MG style (flat/line-art/isometric/3D-rendered/frame-by-frame/collage/liquid/morph/Bauhaus/Synthwave/glass/flower-letter/sticker/pixel/cyber-HUD)mg-motion15 verifiable signature techniques + 103 sound fx toolkit + 10 machine gates + 2 rounds of reviewRequires Chrome (MG_CHROME) + ffmpeg + self-bootstrapped fonts
Only need a single motion, transition, or text animation's real source code for use in another projectwise-motion462 motion entries, previews, real source code entry points, and export scriptsOnly hands over assets; does not design the full video for you

Routing details, disproven combinations, and clear boundaries for each engine are in references/engine-selection.md.

Search any asset with the same command (across all five engines):

node scripts/find.mjs "HUD radar"
node scripts/find.mjs "coffee hand-drawn" --limit 5
node scripts/find.mjs fade --source wise-motion
node scripts/find.mjs "title entrance" --collection shot-card --json

2 · Six-stage pipeline (order fixed; stages can be removed but gates cannot be skipped)

StageWhat to doDeep reference
0 RequirementsAsk for delivery specs (duration / aspect ratio / fps / voiceover / language), asset sources, audience & placement; ask everything once, don't follow up one by onereferences/pipeline.md §0
1 ReferenceIf a reference video exists, analyze it: energy graph, cut points, static ratio, t80 & motion blur (onetake analyze_ref.py); if no reference, write the next set of verifiable numeric targetsreferences/motion-grammar.md
2 ConceptThree distinct central ideas, user picks one; simultaneously select a look/style by name, never silently defaultonetake §2 / mg-motion §2
3 Rhythm & TransitionStoryboard designed with both rhythm and transition legs: no equal-length shots, no beat replacing the previous beatreferences/motion-grammar.md
4 Assets & ShotsReal page capture / screenshot UI restoration / object models / shot cards / motion entries; first grab the smallest runnable snippetEach engine's ENGINE.md
5 ImplementationEvery frame is a pure function of time; actions picked from library, curves set by t80; freeze first, then full videoEach engine's ENGINE.md
6 Render & Delivery1080p30 draft → approval → 4K60/final; pass three gates; report per delivery contractreferences/delivery.md

3 · Iron rules (deduplicated across five engines; each is a lesson learned)

  1. Every frame depends only on t. Forbidden: Date.now(), rAF cumulative state, CSS animations triggered by state; use fixed-seed pseudo-random.
  2. Don't mistake the template's story for the user's story. Pick one of three concepts; a new video using a template's beat will read as a template.
  3. Don't carry the look of the previous video into the next one. Look/style must be chosen by name; silent defaults are not allowed.
  4. Don't cut equally by metronome. Equal-length shots — no matter how good individually — read as a slideshow.
  5. Don't replace a beat; transition into it. At every segment boundary, something must survive and visibly move/scale into the next segment; mutually exclusive scenes (display:none page switch) are PPT even with perfect rhythm. Hard cuts (explosive beats & end cards) excepted.
  6. White space is where the punchline lands. Reference videos are roughly 1/3 static; a non-stop video has no climax.
  7. Small elements, big ground. These videos often have 70% white / background; full-frame content is the exception, not the default.
  8. Cause must be visible. Hand drawing a path, ball landing, point splitting — if the page animates on its own it reads as a screensaver.
  9. Fast motion must have shutter. Above ~80 px/frame without motion blur causes strobing; use the renderer's shutter, not CSS blur.
  10. Camera must follow the subject. Static camera gets reviewed as "lacking lively tracking"; declare inFrame, let the camera lag, tilt, settle.
  11. Draft at 1080p30. Unapproved cuts are never rendered at 4K60.
  12. No particles/confetti/glitter as decoration. It reads as template; if you want flair, let the letters land themselves.
  13. Sound: one room, one material set. One synth per event = audio slideshow.
  14. No faking: unreferenced examples are not reproduction; silent videos are not talking videos; technical pass is not aesthetic pass.

4 · Three gates, all mandatory

GateWho judgesWhat is judgedIf failed
Machine gatenode scripts/qc.mjs gate <video>Duration / aspect ratio / fps / audio track presence / LUFS / true peak / black frames / static ratioRe-render the video; don't lower the standard
Keyframe gateYou yourself read_imageCan 6–10 keyframes serve as posters: composition / depth / white space / typographyRearrange the frames
Review gateIndependent subagent with clean context7-dimension scoring + frame-numbered fix list; re-review after fixesFix by impact order

The machine gate only measures what machines can measure; aesthetics are always left to independent review, as the creator's self-check suffers from confirmation bias. Each engine's own gates (mg-qc.mjs, verify_promo.py, final-review.md, jury.md) usage and criteria are documented in references/quality-gates.md.

5 · Sound

  • Goal: one room, one material set; event count less than beat count; music defaults to commercially licensed tracks only, with royalty tracking.
  • Common targets: −14 LUFS (social/web), −16 LUFS (long-form/podcast-style), true peak ≤ −1 dBTP (AAC encoding raises it); for more headroom target −3.5 dBTP.
  • Ready tools from three engines: onetake sfx_palette.py / score.py (synthesis + recording mixdown), mg-motion audio.py + 103 samples, shotcraft sound-design.md + sfx-source.py (Freesound, CC0 by default).
  • Details and licensing red lines in references/sound.md.

6 · Delivery contract

Every video must include these seven items (missing one means incomplete): two-sentence concept / timecoded beat sheet / signature techniques mapped one by one / which styles were used and how they transition / technical approach / measured numbers (duration aspect ratio fps LUFS true peak black frames static ratio) / honest top-3 weaknesses.

Engine-specific deliverables: onetake multi-language same-source (?lang= no fork), claude-motion ADAPTATION.md (retained/rewritten/licensed/unresolved issues), shotcraft motion workbench & CapCut project, mg-motion version directories v1/ v2/. See references/delivery.md.

7 · Directory map

Code-Video-Infinite.skill/
├── SKILL.md                  # This file: routing + iron rules + gates + delivery
├── README.md                 # For humans: what the five engines are, how to install, license table
├── LICENSES.md               # Per-engine licenses and third-party declarations
├── references/               # Merged shared knowledge (newly written at this level, only cross-engine decisions)
│   ├── engine-selection.md   # Decision matrix and boundaries
│   ├── pipeline.md           # Depth of each of the six pipeline stages
│   ├── motion-grammar.md     # Unified vocabulary for rhythm/curves/transitions/camera
│   ├── sound.md              # Sound and licensing red lines
│   ├── quality-gates.md      # Criteria for the three gates
│   ├── delivery.md           # Delivery contract
│   ├── assets-and-licenses.md# Where assets are, can they be redistributed
│   └── provenance.md         # Five sources, versions, what merging did
├── catalog/
│   ├── INDEX.md              # 880 asset list (generated)
│   ├── index.json            # Machine-readable version of same data
│   └── assets-index.json     # 537 heavy asset list
├── scripts/
│   ├── doctor.mjs            # Environment self-check
│   ├── find.mjs              # Cross-engine search
│   ├── qc.mjs                # Unified machine gate (measure / gate / delegate)
│   ├── build-catalog.mjs     # Rebuild index
│   └── check-links.mjs       # Documentation cross-link health check
└── engines/                  # Five engines preserved as-is (each with its own docs/assets/license)
    ├── onetake/       ENGINE.md + lib/motion.js + scripts/ + looks/ + cases/
    ├── shotcraft/     ENGINE.md + references/shots(124) + template/ + demos/ + assets/
    ├── claude-motion/ ENGINE.md + references/*.json + assets/{cases,extensions,models,scenes}
    ├── mg-motion/     ENGINE.md + mg-styles-15/{harness,assets} + references/ + scripts/
    └── wise-motion/   ENGINE.md + catalog/registry.json + references/effects(462) + scripts/

8 · What to read when

WhenRead
Don't know which engine to usereferences/engine-selection.md
Ready to start, need specific actions & commands per stagereferences/pipeline.md
Rhythm is off, looks like PPT, motion too soft/too hardreferences/motion-grammar.md
Voiceover / sound effects / background music / loudnessreferences/sound.md
Video finished, worried about failing gatesreferences/quality-gates.md
Need to deliver, write a report, or re-editreferences/delivery.md
Unsure if an engine's assets are commercially usablereferences/assets-and-licenses.md
Want to upgrade an engine or query its originreferences/provenance.md
Engine depth (single source of truth)engines/<engine>/ENGINE.md and its references/

9 · License & asset boundaries (one-liner)

The five engines have different licenses; merging the repository does not change each one's license: onetake is PolyForm Noncommercial (free for non-commercial use), wise-motion is Apache-2.0, claude-motion and the upstream mg-styles-15 are MIT (third-party assets retain their own licenses), shotcraft has its own license and Remotion has a separate license (commercial company use must be verified independently). Fonts, models, sound effects, BGM authorization is recorded per entry in references/assets-and-licenses.md and each engine's LICENSE / ATTRIBUTION / NOTICE files. Brand names are always fictional; don't use real trademarks.

Individual skills in this repo

This repo contains 1 individual skill — each has its own dedicated page.

相关技能