/aip:aip-compositionfrom AI Producer by OpusClip
Defines the HTML composition contract for AI Producer projects, including DOM/Canvas split, GSAP timelines, file staging, and editor-recognized structure.
Ships in AI Producer by OpusClip. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Copyright 2026 HeyGen, Inc. Modifications Copyright 2026 OpusClip. Modified by OpusClip for AIP; see source attribution, license, and changes.
HTML is the video: a composition is an HTML element with data-* timing attributes and one paused GSAP timeline the player drives. Two programs read it, AI Producer's editor with its own player and the export with AI Producer's own pinned HyperFrames, each with its own playback and editing contract; this page is the interface they read, nothing more.
render-engine/: index.html, compositions/*.html, and assets under public/. AI Producer stages public/source.mp4 (the recording) and public/source.mp3 (its audio) and puts GSAP at public/vendor/gsap.min.js; load GSAP from that path.perspective, 3D rotation, translateZ stacking) rather than laid flat. A 3D object or space, a shader-driven surface, or data too dense for DOM is drawn on a <canvas> from script (Three.js for 3D) under code-drawn layers, with DOM labels over it as one moment needs. The editor treats a canvas as one leaf the user cannot select or restyle, so anything they may want to edit stays DOM.public/images/<name> and a clip at public/videos/<stem>.mp4, <name> being the filename reduced to ASCII letters, digits, -, _ and . (a space becomes -, anything else is dropped), because other characters change the URL the browser asks for. When add_source_video is among your tools, footage the user gives for an existing project becomes one of the project's videos instead, never a workspace clip, as a video the user adds says. The hand-back check does not follow data-pip-src, so stage a file referenced that way in the same upload batch as the composition and confirm it in the listing after the commit.<div id="stage" data-composition-id="finecut-root" data-start="0" data-duration="<total s>" data-width="W" data-height="H">. Place this root directly in the document body, not inside a <template>. The id is fixed: the editor seeks the root timeline as window.__timelines["finecut-root"], so a root transition lives on that timeline, and the root creates the registry before any composition registers:<script>
window.__timelines = window.__timelines || {};
const rootTl = gsap.timeline({ paused: true });
...root tweens (never a speaker zoom or filter; see below)...
window.__timelines["finecut-root"] = rootTl;
</script>
<video id="speaker" class="clip" src="public/source.mp4" muted playsinline data-volume="0"> and <audio id="speaker-audio" class="clip" src="public/source.mp3" data-volume="1">. Keep unique media IDs. Speaker video is silent; the source audio is the audible leader. Generic extra <audio class="clip"> tags are not AI Producer sound-effect tracks: AI Producer audio tracks require its editing document and derived track-audio elements. After a cut, use N video/audio pairs over the same two files. Each element has class="clip speaker-clip", preload="none", a unique id, and data-start, data-duration, data-media-start, and data-track-index. A pair shares its data-hf-id and timing; give each pair a distinct data-hf-id. DOM order is output order on each speaker track, so write the spans in playback order with consecutive output starts. The EditingScript AV track must carry the same clip IDs and source/output times; the workspace helper synchronizes it and caption timing before publication.<div class="visual-host clip" data-composition-id="<id>" data-title="<short name>" data-composition-src="compositions/<file>.html" data-start data-duration data-track-index data-width data-height> per moment. The host div is the moment the editor shows and lets the user move; content written straight into the root is not a moment. A moment is its own layer over the footage: what its composition draws sees none of the footage beneath it, so an effect that combines with what is under the moment, such as mix-blend-mode, goes on the host div in index.html, where it applies to the whole moment in the editor and the export. data-title is a few words naming the effect (for example Commute title card), the editor timeline's label for the moment, which shows the composition id when it is absent.captions-<n>, one per stretch of speech, each cue static text in its composition; the dynamic caption skill owns their timing, look and mounting. The id narrator-captions, compositions/narrator_captions.html and compositions/transcript-src.json are the service's caption layer: the editor and the export find it by that id, and only the service writes them. Never write that layer or reuse its id. When a project already has that layer, read service-built captions before you edit its moments: it says how the layer stays mounted and which caption policy attributes a moment's host carries for it. Caption moments you write ignore them: each cue is placed and coloured in its own composition. An edit without captions needs none of these files.<div class="speaker-pip-frame" data-aip-editable="speaker-pip-frame"><video id="<unique>" data-pip-src="public/source.mp4" data-start="<the host's data-start>" data-duration="<the host's data-duration>" data-media-start="<source seconds at that start>" muted playsinline data-volume="0"></video></div>, with no src. The one exception to the timing table is that this video's data-start is the host's global start, not 0, because the export re-anchors it on a cut project by setting its media offset to that value; the editor maps it through the cut itself. A speaker cutout that frame_speaker staged is wired as the cutout reference says.index.html for both PIP and split, <video id="<unique>" class="clip" data-track-index="<n>" src="<its path>" data-start data-duration data-media-start muted playsinline data-volume="0">, its path being a project video's public/sources/<id>.mp4 or a workspace clip's public/videos/<stem>.mp4, with the moment that frames it (a mask, a frame, a title) drawing over it; the user can move this clip on the timeline. Nested inside the moment's composition instead, the same tag has no data-track-index and takes data-start="<the host's data-start>", timed on the host's clock like a PIP, and moves with its moment. Every timed element directly under #stage (footage, an image, a timed element of your own) carries a unique id. Style it by its class or id, never by [data-track-index]: the editor does not move a clip onto a row whose own style rules would change its look, and the commit warns style_selects_track_index. Place each clip that shares the stage with others (a grid tile, a split half, a PIP) with its own #stage > #<id> rule or an inline style that sets inset: auto and the clip's own left, top, width and height: the scaffold's #stage > video outranks a bare #<id> rule, and a #stage > video.<class> rule outranks every #<id> rule, so clips placed either way all draw in one box, which preflight and the commit warn as root_clips_share_box. Every track follows a cut of the speech; list a track that keeps its timing when speech is cut, such as a background loop, in #stage's data-sync-off-tracks (track numbers separated by spaces, data-sync-off-tracks="9 12").id, positioned over the frame, or a card as a visual moment. It follows on, so the export runs on to its end, and on through each closing clip placed right after it; it needs no mark and no change to #stage. A clip that starts after a pause, or one that began during the speech and should play on, carries data-extends-end. A video of the speaker's own recording (public/source.mp4, or a file the speaker clips play) never runs on by following on, and while an unmarked one plays after the last word nothing else runs on either, since the speaker would be seen talking with no sound: to hold an end card over the recording, back the card with a stretch where the speaker is not talking, or make the card cover the full frame, and only then put data-extends-end on that video. A closing video stops where its file ends. Captions, effects, transitions and sound never run the video on. The clip plays muted, so size the music to the new end (add_music sections reaching it) for a bed under it; sound effects stay within the speech.<div class="visual-host clip" data-composition-id="<id>" data-aip-effect="zoom" data-no-timeline data-start data-duration data-src-anchor data-track-index="20" data-hide-captions="false" data-effect-scale="<above 1, at most 3>" data-effect-origin="<x% y%>" data-effect-in="<s>" data-effect-out="<s>"></div> for a zoom, or data-aip-effect="filter" on data-track-index="21" with data-effect-filter="<grayscale, sepia, saturate, contrast, brightness, invert, hue-rotate, or blur functions>" in place of the scale and origin. The effect ramps in over data-effect-in seconds, holds, and ramps out over data-effect-out inside the host's window, and the speaker is at identity outside it. data-src-anchor is the source second at data-start (the covering speaker clip's data-media-start plus the offset into that clip), so a cut moves the effect with the words it covers. On a project cut from several videos (the editing script's sources list names two or more), the host also carries data-source-id="<id>", the id of the sources entry whose path the covering clip's src plays, because a second names no video on its own; preflight and the commit refuse an anchor without it (anchor_file_missing). Two zooms or two filters never overlap; a zoom may overlap a filter or a moment. Load the engine after the root script, <script src="public/vendor/speaker-effects.js"></script>; the service writes that file in the commit that first loads it, so do not upload it.<div class="visual-host clip" data-composition-id="<id>" data-aip-effect="motion" data-no-timeline data-start data-duration data-src-anchor data-track-index="<900 to 907>" data-hide-captions="false" data-effect-motion="<name>" data-effect-params='{"<param>":<number>}'></div>, its data-src-anchor and, on several videos, its data-source-id written as for a zoom, and one inline <script data-aip-motion="<name>"> in index.html that assigns window.__aipMotions["<name>"] = { label, params: { <param>: { min, max, default, label, unit } }, frame(t, d, p, rand) }. frame returns any of x and y (pixels), scale (1 to 3), rotate (degrees) and overlay: { color: "#rrggbb", opacity } (a full-frame color over everything, captions included), computed from its arguments alone: t is seconds into the host, d its duration, p the parameter values, and rand(i) a fixed phase per host. Never read Math.random, Date, performance, crypto, Intl or a timer anywhere in the script, and never set another name's entry: the service refuses either, because the preview, the export and each render window would draw different frames. Motions that overlap in time sit on different tracks and add up; offsets stay within 160 px and rotation within 8 degrees in total, and the service scales the picture just enough to keep its edges covered, or weakens a motion that 2x cannot cover. Declare every value a user should tune as a parameter (at most 8, each named in lower camel case of at most 16 characters, with values within +/-1,000,000); the editor shows each one as a field. Worked definitions: motion recipes.data-aip-editable="<token>" where the token is one of that element's own classes; the editor also treats .list-item, .glass-card, .media-card, .speaker-pip-frame and .item-bar as such objects. Anything else inside a moment is reachable only as text or image leaves.Never implement a seat or PIP owned by a visual moment as absolute-time geometry tweens on the root speaker: moving or deleting the host does not rewrite root-timeline tweens, so the shape would stay at its old time. Root speaker geometry is only for a camera treatment no independently editable visual moment owns, and never for its scale, its filter or a per-frame camera move: a speaker zoom or color filter is an effect host, and a shake, flash, whip or push is a motion host. The optional PIP example shows the effect-owned full-frame/PIP transition.
<template>
<div data-composition-id="<id>" data-width="W" data-height="H">
...content, with its <style> and <script> inside the template...
<script>
(() => {
const root = document.querySelector('[data-composition-id="<id>"]');
const tl = gsap.timeline({ paused: true });
...tweens on root.querySelector(...) targets...
window.__timelines["<id>"] = tl;
})();
</script>
</div>
</template>
Keep every composition's inline script inside an IIFE as above, so its declarations stay local when several moments share a document. Share state between scripts only through explicit window properties, including the window.__timelines registry.
The inner div's data-composition-id equals the host's. Bind the root exactly as the snippet does, with [data-composition-id="<id>"] and nothing else in that selector, and reach every element through descendant queries on that root. The export mount strips data-composition-id and the other data-* attributes from the inner div, so at export the host is the only element carrying the id: a selector that also requires a class, an id, an attribute, or :not(.visual-host) on the same element, or a :scope > child selector, matches nothing at export, the script throws before it registers, and the export refuses the moment. At export that host is the root the snippet binds, and the root rule [data-composition-id="<id>"] { ... } styles only the template's own root inside it, so read no style off root and no attribute written on the template root: a custom property declared in the root rule reads as "" from root (NaN after parseFloat, dropping whatever is computed from it), and those attributes are not on the host. Read such a value from an element inside the root, where custom properties inherit, or keep it as a script constant. Scope styles and element queries to the composition's content so moments can coexist in one document. Keep the composition root visible at its base pose; animate an inner wrapper or its children, not the composition root or host. The editor mounts only what is inside <template> and the export mounts the template itself, so write nothing after </template> (a <script> there is part of the moment in neither); the file needs no mount script of its own.
Timeline time 0 is the host's data-start, and the player seeks the timeline rather than playing it. Create and register the paused timeline synchronously after its DOM exists, and put render-critical changes on it, never in timers, requestAnimationFrame loops, playback callbacks, or CSS animations. Never call tl.play() or start media playback yourself; the player owns the clock. Keep animation repeats finite and randomness seeded so a seek reaches a deterministic state. A continuous move is a tween across its span, never a run of tl.set steps, which holds each pose for several frames and then jumps; a jitter over it goes on a channel of its own, such as xPercent and yPercent over a tweened x and y. A tween of filter replaces the element's whole filter, so an element whose look comes from filter: url(#...) keeps it on an inner element and takes the tween on its wrapper. The host attributes own the duration and active window: add no empty tweens to set duration, and never nest the child timeline into the root timeline yourself.
| attribute | on | value |
|---|---|---|
data-start | every clip | seconds, relative to the parent composition (a PIP or footage clip inside a composition: the host's global start, see above) |
data-duration | every clip | seconds, the clip's own length |
data-track-index | every clip | integer; clips on one track cannot overlap |
data-media-start | video and audio | offset into the source file, seconds |
data-volume | registered media | playback gain, 0 to 1; does not enroll arbitrary audio in AI Producer mixing |
data-width, data-height | compositions | the canvas, px |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
6 skills in this plugin
/aipCreate or update an editable AI Producer video. Use when someone provides footage or an existing project and asks AI Producer to cut or edit it, add captions or subtitles, motion graphics or animated effects, background music, or inserted images or video clips, export the finished video, or adapt a named Motion Library template, in any language. Cut a new project with fixed settings instead of asking about them, and copy the captions, motion graphics and transitions of a reference video the user supplies./aip-dynamic-captionWrite an AI Producer project's captions as caption moments: static text the user can select, retype and restyle in the editor, timed to the cut by a script. How to time and mount them, the default look, and what keeps them legible. Listed, it makes captions the default./Other plugins' skills for the same job
npx claudepluginhub opus-pro/ai-producer-plugin --plugin aip