Communitygithub.com

opus-video-craft

Distilled Opus 5.5 code-video directing, visual craft, and anti-slop engineering skill. Use whenever creating, refactoring, or reviewing programmatic videos, motion graphics, MVs, PVs, anime OPs, product launch films, or explainers in HTML5 Canvas, Three.js, WebGL2, GSAP/HyperFrames, or Remotion. Eliminates gratuitous camera shake/beat-pumping, AI-slop '//' labels and HUD clutter, neon-void FX crutches, and crossfade slideshows.

What is opus-video-craft?

opus-video-craft is a Claude Code agent skill that distilled Opus 5.5 code-video directing, visual craft, and anti-slop engineering skill. Use whenever creating, refactoring, or reviewing programmatic videos, motion graphics, MVs, PVs, anime OPs, product launch films, or explainers in HTML5 Canvas, Three.js, WebGL2, GSAP/HyperFrames, or Remotion. Eliminates gratuitous camera shake/beat-pumping, AI-slop '//' labels and HUD clutter, neon-void FX crutches, and crossfade slideshows.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/turboegg1145/opus-video-craft-skill/tree/HEAD/skills/opus-video-craft

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Opus Video Craft — Code-Driven Film Directing & Anti-Slop Skill

Code syntax is never why an AI-made code video looks cheap. Directing restraint, physical materiality, continuity, and pixel-verified QA are what separate viral Opus 5.5 code films from generic AI motion slop.


0. Six Zero-Tolerance Anti-Slop Laws (Non-Negotiable)

Violating any of these is an immediate build failure. Fix before rendering.

Law 1 — ZERO Gratuitous Shake, Wobble, or Beat-Pumping

  • BANNED:
    • Perpetual sine-wave camera drift / "gimbal float" (Math.sin(t * 0.4) * 4, rotateY(Math.sin(sec * 0.36) * 0.4)).
    • Binding beatPulse / kick / bass / snare to camera zoom, layer scale, RGB split, or glow intensity on every beat (scale(1 + beatPulse * 0.03)).
    • Perpetual idle bobbing (breatheY = Math.sin(t * 2.5) * 9) on characters, cards, or props that should rest cleanly.
    • Default beatShake / cameraShake props enabled on a stage wrapper.
  • THE ONLY PERMITTED SHAKE:
    • A sparse, event-gated, exponentially-decaying physical impulse (amp * Math.exp(-dt / decay), dt ∈ [0, 0.35s]) triggered ONLY by a literal physical collision, breach, or heavy impact — totaling < 3% of film runtime.
  • WHAT TO DO INSTEAD:
    • One clean, monotonic camera move per shot (camPath with log-space zoom, slow push, pan, or completely locked-off tripod stage). Never reverse direction mid-shot.
    • Put life into purposeful subject animation (anticipation → action → follow-through, UI typing/reordering, lighting shifts, cloth/particle physics) — NOT shaking the camera.
    • For cel/hand-drawn/pixel aesthetics, step subject animation on twos (12 fps) while keeping camera and lighting smooth every frame.

Law 2 — ZERO AI-Slop Chrome, // Prefixes, or Subheading Stacks

  • BANNED (unless the user explicitly asks for a retro terminal / tactical HUD / kinetic showreel aesthetic):
    • Any //, ///, ::, or | decorative label prefixes (ACT // 01, SCENE // 02, SYS // ONLINE, FRAGMENT // 01).
    • Corner viewfinder brackets (<Corner />), fake telemetry (SCENE 01 / 180F, 1920×1080 · 60 FPS, 128 BPM, ~22K TRIS, REC ●).
    • Stacked text towers (eyebrow + H1 + H2 subtitle + body + 3 pill chips + corner tag on the same screen).
    • Wide-tracked uppercase filler subheadings (letterSpacing: 0.25em..0.6em) added "just to fill space".
  • WHAT TO DO INSTEAD:
    • Show, don't label. Visual transformation and pacing carry chapter order — not 01 / INTRO badges.
    • Max 1–2 text slots per frame (e.g., one monumental title, OR one lyric line, OR headline + one concrete UI/product card).
    • Headlines fit on 1 line (≤ 8 words), tight tracking (-0.03em to -0.04em) on heavy display type, with at most ONE accent word or accent period.
    • Give text enough reading time: English words / 3 + 1.2s; Chinese chars / 4.5 + 1.5s.

Law 3 — Physical Medium First; ZERO Neon-Void FX Crutches

  • BANNED:
    • Plain #000/#05050a void + radial glow + CSS drop-shadow neon halos + ChromaticImage RGB splitting + floating bokeh orbs + anamorphic flares + heavy vignette stacked on every scene.
    • Runtime SVG <feTurbulence> or multi-layer CSS filter: drop-shadow(...) per frame.
  • WHAT TO DO INSTEAD:
    • Lock the physical medium BEFORE animating a single frame (see references/material-palettes.md): procedural cream paper + ink brush, drafting sheet, sunlit desk under window gobo shadows, paper-cut cardstock with real elevation shadows, risograph halftone, clay 3D with coded flowlines, or night silhouette lit by real physical sources (fireworks/lamps).
    • Strict 3–4 color palette (Base Surface, Ink/Foreground, Muted Secondary, ONE Signal Accent rationed exclusively to the active focal subject).
    • Add subtle film grain in FFmpeg post-pass (mux.sh) or as a pre-baked static tile — never heavy per-frame DOM filters.

Law 4 — Continuity Carrier & Zero Crossfade Slideshows

  • BANNED:
    • smoothstep opacity crossfades (muddy double exposures) and lazy dips-to-black between scenes.
    • Repeating the exact same layout (e.g., centered subject + symmetric text, or headline-left / card-right) more than 2 times in a row.
  • WHAT TO DO INSTEAD:
    • Pick ONE Continuity Carrier (a red scarf, a price line, a projectile arc, a brand dot/period, a physical prop) that opens the film, transforms across every act, and returns transformed at the end (Bookend).
    • Every transition grows out of the medium or previous object: area-eased colour flood / iris, shared-element handoff (FLIP / morph box), directional whip-pan at peak optical motion blur, camera push-through, or match-cut on motion direction.

Law 5 — Motion Continuity & Pacing Contrast

  • Never cut on dead-still frames (except for the ONE deliberate dramatic freeze/pause).
    • Outgoing shot accelerates into the cut (depart), hard cut lands 2 frames before the beat at peak blur (cutBlur), incoming shot enters already moving on hard expo ease-out (arrive) along the same motion axis (no left→right→left ping-pong).
  • A film at one constant speed fails. Alternate density: fast visual flurry → deliberate 1.2–1.8s breathing hold (or 1–2 real audio silences) before the climax drop.

Law 6 — Deterministic Pure-Function Rendering & Mandatory Forensic QA

  • Every frame MUST be a pure function of time: window.renderAt(t) (or Remotion useCurrentFrame()). Zero Math.random() (use seeded hash), zero Date.now(), zero CSS transitions, zero carried frame state.
  • Never ship an uninspected render. Run slop_lint.py → render contact sheet (--stills) → visually inspect + Mute Test → render final with optical motion blur → run video_forensics.py → fix worst 3 defects → re-verify.

1. Engine-Agnostic Architecture (Remotion, Canvas, WebGL2, HyperFrames — All First-Class)

The quality gap is not "Remotion vs no Remotion" — top Opus 5.5 workflows (cinetic, product-film, remotion-director) ship flagship pieces in Remotion, while others use pure HTML5 Canvas/Three.js (PDoomVideo, lemo-opuscar, the-big-one) or HyperFrames/GSAP.

What actually matters is how you render inside whichever engine you choose:

EngineBest FitRequired Craft Discipline
Remotion (React + @remotion/three + Canvas2D + parallel/CI rendering)Full-length MVs/MADs/PVs, React UI product launches, multi-worker GitHub Actions renders, projects needing component reuse & deterministic useCurrentFrame()Treat Remotion as a deterministic frame host — draw heavy visuals on Canvas 2D / Three.js / clean SVG instead of stacking CSS drop-shadow/blur/ChromaticImage DOM overlays; centralize timing in one cues.json; use clean hard cuts / shared-element / medium-native transitions instead of smoothstep opacity crossfades; apply @remotion/motion-blur or shutter averaging on fast whip-pans.
Pure HTML5 Canvas 2D / Three.js / WebGL2 (window.renderAt(t) + scripts/render_deterministic.mjs)Single-folder lightweight shorts, tactile brush/shader/particle experiments, zero-dependency pipelines with custom FFmpeg tmix shutter blurExpose window.renderAt(t), window.DUR, window.CUTS; pipe to FFmpeg single-pass bt709.
HyperFrames / HTML + GSAPFast DOM/CSS typography & SaaS UI walkthroughs with GSAP timeline / FlipSeek paused timeline deterministically by t; initialize every element's t=0 state cleanly.

Pick whichever engine fits your workflow best — Remotion is 100% first-class as long as you obey the 6 Anti-Slop Laws above.


2. Six-Stage Production Workflow

Follow in order. Do not write scene code before Stages 1–3 exist on disk.

Stage 1 — Treatment & Story Device (TREATMENT.md)

Write a 1-page treatment first:

  1. Logline: One sentence — viewer's starting state → turn → ending state.
  2. Motif & Bookend: The single visual object that opens the film and returns changed at the end.
  3. Continuity Carrier: How Scene A physically becomes Scene B (object chain).
  4. Physical World & Medium: Surface material, light source, strict 3–4 hex palette, typography (max 2 faces).
  5. Shot List: Table of shots with time | framing (wide/med/close/insert) | camera move (max 1 monotonic move) | visual action | transition | sound. Ensure no two consecutive shots share identical framing/layout, and plan at least 1 breathing hold / silence.

Stage 2 — Single-Source Timeline (cues.json / timeline.js)

Never hardcode scattered frame numbers across scene files.

  • Put BPM, bar/beat grid, shot boundaries, lyric/VO timestamps, and visual impact events (CUES / EV) in one file.
  • Picture, camera keyframes, audio/foley synthesis, hard-cut list (window.CUTS), and QA scripts ALL read this same source.
  • For existing music tracks: extract real beat grid / vocal forced-alignment first (and verify downbeats on intro sections where drums are absent).

Stage 3 — Proof Frames (Look-Dev Before Full Build)

  • Build the material/surface generator, palette tokens, and 3 key style frames (opening, signature climax shot, ending lockup) using the real drawing code.
  • Render stills (node render_deterministic.mjs . --stills 1.0,15.0,28.0) and visually inspect them against references/critic-rubric.md. Fix ugly lighting, weak silhouettes, or text legibility BEFORE animating all scenes.

Stage 4 — Deterministic Scene Build & Motion Craft

Load references/motion-math.md and apply:

  • Camera: Keyed [t, zoom, x, y] with log-space zoom interpolation (Math.exp(lerp(Math.log(z0), Math.log(z1), u))) so 1×→4× feels identical in speed to 1×→2×. One toScreen(x, y) helper for any overlay tracking world space.
  • Curves: glide (cubic-bezier(0.45, 0, 0.15, 1), ~0.6–0.8s) for travel and morphs; closed-form springStep / track() for pops and landings; arrive (expo ease-out) for entrances; depart (cubic ease-in) for exits.
  • Characters / Rigs: Animate with anticipation, overlapping spine/limb delay, and follow-through — never uniform Math.sin bobbing, and never if-snapping poses.
  • Run static anti-slop gate:
    python3 scripts/slop_lint.py <project_dir>
    
    Resolve every FAIL before rendering.

Stage 5 — Sound Design & Optical Render

  • Three audio layers: Ambience bed (room tone/wind/vinyl) + Action Foley (material-matched, placed by measured waveform peak, not file start) + Music (ducked under VO/key foley, with 1–2 genuine silences before climax).
  • Master loudness: Two-pass FFmpeg loudnorm to -14 LUFS, true peak ≤ -1.5 dBTP.
  • Optical Motion Blur: Render fast-moving segments with sub-frame shutter averaging (--sub 4 or --sub 6 --shutter 0.5, using window.CUTS so motion blur NEVER smears across hard cuts!). Counters/typed text read frame time (not subframe time) so digits stay sharp.
  • Color Integrity: Encode yuv420p with explicit -colorspace bt709 -color_primaries bt709 -color_trc bt709 in a single pass from PNG/high-quality frames to prevent limited-range #0a0a0a → #171717 grey washout.

Stage 6 — Forensic QA & Design-Blind Review Loop

Run:

python3 scripts/video_forensics.py out/video.mp4 --sheet out/contact_sheet.png --fps 60

Then inspect out/contact_sheet.png (and 0.2s strips around fast transitions) using references/critic-rubric.md:

  1. Binary 16-Point Slop Check: Every "YES" is a mandatory P0 fix.
  2. Mute Test: Hide audio/subtitles and read the contact sheet alone — does every shot communicate its beat visually?
  3. Pixel & Audio Gates: 0 unintended black frames (blackdetect), 0 dead freezes (freezedetect), 0 unintended single-frame pops outside CUTS, loudness -14 ± 1 LUFS, text readable at 360px phone width.
  4. Fix the worst 3 issues in one focused pass, re-run slop_lint.py + video_forensics.py, and deliver only after a clean pass.

References & Tools

  • references/motion-math.md — Deterministic math kit: seeded RNG, log-space camPath, closed-form springs, track(), arrive/depart/glide, area-eased flood/iris, sparse physical impactRecoil, onTwos.
  • references/material-palettes.md — 8 tactile physical-medium recipes, strict 3–4 color palettes, paper/ink/gobo lighting code, and clean typography rules.
  • references/critic-rubric.md — Design-blind pixel critic protocol, 16-point binary Slop Check, reading-time thresholds, and mute-test scorecard.
  • scripts/slop_lint.py — Automated code-level anti-slop linter (catches gratuitous shake, beat-pumping, // HUD chrome, neon FX crutches, non-determinism).
  • scripts/video_forensics.py — Post-render FFmpeg forensic verifier (blackdetect, freezedetect, ebur128 loudness, bt709 check, timestamped contact sheet generator).
  • scripts/render_deterministic.mjs — Minimal Playwright/Puppeteer window.renderAt(t) frame renderer with --stills, --verify determinism gate, and cut-aware sub-frame motion blur.

Related Skills