/aip:aip-dynamic-captionfrom AI Producer by OpusClip
Writes AI Producer project captions as editable static-text moments timed to the cut. Runs caption_cues.py, mounts each row as a composition host, and keeps captions legible and user-editable.
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.
Captions are moments you write like any other motion graphic: one visual moment per stretch of speech, each a composition under the composition contract whose cues are static text elements shown and hidden on the moment's own paused timeline. The editor lets the user select, retype, recolor and refont static text, so every word a caption shows is written in the composition's HTML, never generated by its script. Never call build_captions, never use the narrator-captions id, and never write compositions/narrator_captions.html or compositions/transcript-src.json: those are the service's own caption layer, which this skill does not use.
Write the captions once the speaker cut is final. Run caption_cues.py on the render-engine directory:
python3 <loaded-aip-skill>/scripts/caption_cues.py <render-engine-root> --max-words 4
It synchronizes compositions/editing-script.json with the cut in index.html, as preflight's --sync-editing-script does, so that document goes in the same commit, and prints one JSON object, {ok, synced, moments}, whose moments list holds one row per caption moment: id, src, start on the cut, duration, src_anchor (the source second at start), on a project cut from several videos source_id (the video that second is in), and cues, each with in, out and its words as [text, in, out], in seconds from the moment's start. Take every time from it, never from arithmetic of your own on get_transcript. A moment never spans a speaker cut, a sentence end or a long pause, so when the user later cuts between two moments in the editor, each moves whole with its source anchor. A cut inside a moment leaves its later words early, and one that removes its first word hides the whole moment, because the editor hides a moment whose anchor is cut away; either way the moment is right again once you write it afresh for the new cut.
When a look shows one word at a time, the speech's transcript words are a character or two each (such as Chinese or Japanese), or you would merge, split or correct a cue, read writing captions before running the script or editing its cues; never change what was said.
Mount each row as a moment host, after every other moment inside the root and all on one track no other moment uses, so the captions draw above every moment:
<div class="visual-host clip" data-composition-id="captions-01" data-title="Captions 1"
data-composition-src="compositions/captions-01.html" data-start="<start>" data-duration="<duration>"
data-src-anchor="<src_anchor>" data-track-index="<n>" data-width="W" data-height="H"></div>
When the row has a source_id, the host also carries data-source-id="<source_id>" beside its anchor; preflight and the commit refuse a caption host on a several-video project without it (anchor_file_missing).
Publish the caption moments with their hosts in index.html, the synchronized EditingScript and the font files. One commit carries at most 200 files and at most 256 KiB of inline content in all, so a long video's captions go out over several commits in timeline order: each mounts only the caption hosts whose files it or an earlier commit carried, and only the last one closes authoring.
The sync refuses a cut it cannot carry the mounted captions through (editing_script_mounted_captions_require_rebake); its captions list names the moments to write again, and without that list every caption moment needs it. Take those hosts out of index.html and drop their files from the next commit, make the cut, run the script again and write those moments afresh. On a project cut from several videos, a recut keeps every mounted caption moment it does not land inside: the sync moves the moment's host to where its anchor plays on the new cut, and ends it at a cut that now trims the hold after its last word. Run the script with --missing after such a cut: its moments are only the speech no mounted caption moment covers, each under an id no mounted moment uses. Write the rows over the moments you took out and over speech the cut added; any other row is speech the edit already leaves uncaptioned, so leave it so. A project whose captions the service built earlier, a narrator-captions host, keeps them, as service-built captions says, until the user asks to change its captions or its cut; then replace that layer the same way.
<template>
<div data-composition-id="captions-01" data-width="1080" data-height="1920">
<style>
@font-face { font-family: "Inter"; font-weight: 700; src: url("public/fonts/Inter-700.woff2") format("woff2"); }
[data-composition-id="captions-01"] .cue {
position: absolute; left: 8%; right: 12%; top: 70%; transform: translateY(-50%);
text-align: center; font: 700 64px/1.15 "Inter"; color: #ffffff;
text-shadow: 0 3px 12px rgba(0, 0, 0, 0.6); visibility: hidden;
}
</style>
<div class="cue" data-in="0" data-out="0.82">What do you like</div>
<div class="cue" data-in="0.82" data-out="1.9">about using Opus</div>
<script>
(() => {
const root = document.querySelector('[data-composition-id="captions-01"]');
const tl = gsap.timeline({ paused: true });
root.querySelectorAll(".cue").forEach((cue) => {
tl.set(cue, { visibility: "visible" }, Number(cue.dataset.in));
tl.set(cue, { visibility: "hidden" }, Number(cue.dataset.out));
});
window.__timelines["captions-01"] = tl;
})();
</script>
</div>
</template>
data-in and data-out from the script's row. The timeline reads them, so retiming a cue never touches its text, and a cue's entrance tween starts at its data-in and its exit tween ends at its data-out. A look that treats words one by one wraps each word in its own span, with that word's times, inside the cue.@font-face and the cue rules in every caption file, so each moment renders on its own.Without a reference or the user's words about it, every caption is the same plain look: Inter Bold, white, with a soft dark shadow, centred, at about 6% of the canvas's short side (64 px on a 1080-wide canvas), at most two lines, with no emphasized word. Its band is centred at 70% of the frame height on a portrait canvas (75% on a 4:5 one) and at 78% on a landscape or square one while the speaker owns the frame; under a visual moment it sits where the framing skill puts the caption for that moment's layout, set on each cue that plays there.
Text already in the picture stays there: a caption moment cannot remove or replace it, and a strip, plate or gradient painted over it is the bar users ask to take out. When the footage shows its own captions of the speech, burned in, write no caption cue while they show, even when the user asked for captions, unless they asked for another language than those captions, so viewers never read the same words twice. Finish the rest of the edit as asked rather than stopping to ask, and tell the user in one sentence that the source already carries its own captions and that a clean upload gets editable ones. Other text in the caption zone, such as a lower third, a title or a slide's own lines, is not a caption of the speech: keep the captions, and place them in the nearest stretch of the frame clear of that text for every cue that plays over it, or just above it when no stretch is clear.
Download the font from Google Fonts or its Fontsource mirror and stage it under public/fonts/, in the same upload as the first caption file. Stage every file the captions' characters need, and for speech in a script Inter lacks, such as Chinese, Japanese, Korean, Arabic or Hindi, take the Noto Sans family for that script instead. Never name a font you have not staged: the export renders on a machine with its own fonts, so an unstaged name renders there as another face.
When the user's edit copies a reference, the reference style skill decides the caption look, which cues show together and their layout, replacing the default look wholesale. This skill's timing, mounting and legibility still apply.
These hold over the default, a reference and the user's words:
headline overlay or a statement full cover, which already draw the phrase, under any other graphic that shows the spoken words itself, such as a title set in the speaker's own words, under a logo with text or a quote card, which the aesthetic rules give their beat alone, or under a full cover whose detail must occupy the band; drop those cues, and the whole moment when every cue falls there.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ai-producer, caption-timing, caption-cues, static-text, video-editing
Other plugins' skills for the same job
npx claudepluginhub opus-pro/ai-producer-plugin --plugin aip6 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-compositionAI Producer-specific composition and editor contract. Read when using the AI Producer plugin to author its HTML workspace; not the general HyperFrames creation workflow./aip-framingFrame the speaker for an AI Producer project. Read once before authoring the root layout: pick the canvas first, then who owns the frame for each beat (the speaker, the footage, or the canvas), and for each of the three layouts (seat, overlay, and full cover) the forms it offers, where that canvas lets it sit, what it keeps, and how it is built, with the speaker measured, not guessed./aip-reference-styleCopy a reference video's captions, motion graphics and transitions onto the user's own AI Producer edit. Use when the user supplies a reference video file, a link to one on Instagram, TikTok or YouTube, images of a style, or picks or names one of the preset reference styles, here or on the AI Producer web page, and wants their footage edited in that style, in any language./aip-setupSet up AI Producer: connect the user's account, confirm the connection works, and start their first project from one video. Use only when the user chooses Set up for AI Producer, asks to get started with AI Producer or to continue AI Producer setup, or asks for help signing in to or connecting AI Producer. Do not use for an ordinary editing request once AI Producer is connected; that belongs to the aip skill.