Skill instructions
aip23 KB
View saved version →
---
name: aip
description: "Create 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."
---
# AI Producer preview
Create one editable AI Producer preview from the user's footage and creative brief.
## Working folder
Every project, a new one or a change to an existing one, keeps the files you make on this computer in a working folder of its own. At its start, before you download or write anything for it, read [this computer's reference](references/environment.md) once and make that folder as it says; never write to a fixed path or reuse a folder you did not create for this project unless the user hands it to you. Check a page on this computer only as its [local checks](references/environment.md#checks-on-this-computer) say.
**Which project.** Act only on the project this request is about. `list_projects` is for finding that project, as when the user asks to continue their last one or a start ended with no answer; never read an unrelated project to borrow a file from it.
## Targeted changes to an existing project
When the request targets an existing AI Producer project, begin from its current saved edit and make only the requested change. Do not upload the source again, restart project preparation, or change its settings unless the user asks. A change that touches captions, sound effects or music, or moves the cut, follows [their rules](references/new-project.md#captions-sound-effects-and-music): read them once first.
A natural request to use or adapt a Motion Library template, together with its `Project` and `Template` context line, is an existing-project change. Read the [Motion Library handoff](references/handoff.md) once and follow it before the new-project flow below. A line that starts with `@aip` in place of that context line follows [legacy `@aip` lines](references/legacy-aip-line.md) instead.
## Settings for a new project
A new project is cut with fixed settings, and you never ask about them: do not put the rough cut, captions, music or sound effects to the user, draw a card or widget for them, or call `present_choices` or `record_choices`, even when those tools are offered. The user's own words outrank these settings, in the opening message or any later one; the saved default fills what they leave unsaid; the table fills the rest.
| Setting | Default |
| --- | --- |
| Rough cut | `balanced` |
| Captions | on, in the plain look the [dynamic caption skill](../aip-dynamic-caption/SKILL.md) gives them |
| Sound effects | on, from the library |
| Background music | off |
At the start of every new project, read `get_editing_preset`. A preset it returns replaces the default of every setting it stores, and a stored `editing_preference` is the user's own words about the fine cut. Read it fresh on every project rather than remembering it, because the user changes it on the web settings page and only this read shows that; the default is theirs to set there, never through you: the server has a `save_editing_preset` tool, but it is not yours to call.
In the message that says the run has started, name the settings you are cutting with in one plain sentence, so the user knows they can change any of them.
Preparing the project waits for nothing. In the turn the footage arrives, mint the upload target with `sign_upload` and start the PUT so that it runs on without holding you, as [the footage upload](references/environment.md#the-footage-upload) says. While the bytes move, read the saved default and the price. The moment the PUT finishes, call `start_transcribe_project`: ingesti
Preview of the first 4,000 characters. Read full instructions →
Referenced files: 21 — file references are metadata, not package contents.
aip-composition15.6 KB
View saved version →
---
name: aip-composition
description: "AI Producer-specific composition and editor contract. Read when using the AI Producer plugin to author its HTML workspace; not the general HyperFrames creation workflow."
---
# HyperFrames for an AI Producer project
<!-- SPDX-License-Identifier: Apache-2.0 -->
Copyright 2026 HeyGen, Inc. Modifications Copyright 2026 OpusClip. Modified by OpusClip for AIP; see [source attribution, license, and changes](../../THIRD_PARTY_NOTICES.md).
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.
## What AI Producer accepts
- The project lives under `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.
- The accepted files and upload limits are described in the [AI Producer workspace format](../aip/references/workspace.md). A composition's logic is inline.
- Split each moment by what it draws. Text, labels, cards, counters, and anything the user may want to retype or restyle are DOM elements animated by GSAP, given real depth with CSS 3D (`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](references/code-drawn.md), 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.
- A user's image is staged at `public/images/<name>` and a user's 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. 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.
## What the editor recognises in index.html
- The root: `<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:
```html
<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>
```
- The speaker: `<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 saPreview of the first 4,000 characters. Read full instructions →
Referenced files: 4 — file references are metadata, not package contents.
aip-dynamic-caption9.08 KB
View saved version →
---
name: aip-dynamic-caption
description: "Write 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."
---
# Captions for an AI Producer project
Captions are moments you write like any other motion graphic: one visual moment per stretch of speech, each a composition under the [composition contract](../aip-composition/SKILL.md) 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.
## Timing
Write the captions once the speaker cut is final. Run [caption_cues.py](../aip/scripts/caption_cues.py) on the render-engine directory:
```sh
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](references/writing-captions.md) 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:
```html
<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 EditingScript sync refuses a cut change while caption moments are mounted (`editing_script_mounted_captions_require_rebake`), because their timing belongs to the old cut. To recut a captioned project, take the caption hosts out of `index.html` and drop their files from the next commiPreview of the first 4,000 characters. Read full instructions →
Referenced files: 3 — file references are metadata, not package contents.
aip-framing20.6 KB
View saved version →
---
name: aip-framing
description: "Frame 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."
---
# Framing for an AI Producer project
Framing decides, per beat, who owns the frame (the speaker, the footage, or the canvas), from the canvas, the transcript, and the footage. How anything looks (color, corners, shadows, type) is the visual style's; this page owns each layout's forms and the geometry it must keep.
Apply the user's brief and the [AI Producer text rules](../aip/SKILL.md#on-screen-text) before choosing a form that contains text: the forms below describe geometry, and their label, headline, and statement examples do not authorize extra copy.
## What you decide
1. **The canvas, first.** A project whose canvas is 4:5 (a 4:5 source) is 1080x1350 whatever platform the brief names. Otherwise read it from the brief's platform: 1080x1920 for Reels, TikTok, and Shorts; 1080x1080 for square feed posts; otherwise the source aspect, usually 1920x1080. The canvas decides which forms and positions each layout has (tables below); a layout drawn for one canvas is not reused on another.
2. **The register, per beat.** One of the four in the table below.
3. **The form, per moment.** Seat, overlay, and full cover each offer a short menu of forms in their chapters below. Name the register and the form in the plan.
4. **The measurement, before you place.** Call `frame_speaker` with every window you will seat, overlay, cut out, or reframe, in as few calls as the limit allows: each window's `start` and `end` on the cut, a `slug`, `matte` (true only for a cutout), and the `slot` the speaker will occupy (the seat's rect, a circle's side twice, an aperture's hole, or the canvas for an overlay, a full-frame reframe, and a cutout). Read the task with `get_task`. Each window in its `result.windows` carries `presence` (skip a seat or an overlay where `seat_ok` is false and a cutout where `matte_ok` is false), `face` and `head` as source fractions, and for the slot `object_position` (paste its `css` onto the seat's `data-pip-src` view, or onto the root clip for a full-frame reframe), `head_in_slot`, and `fits`. `fits.height` false means the slot is too wide for the source's aspect at that height, so `object-fit: cover` draws the head at the slot's width: narrow the slot at the same height (the head shrinks with it) or give it at least `fits.min_slot_height`, and measure the revised slot before placing it. If `min_slot_height` did not fall, the slot is height-bound and only deepening helps; a slot narrowed until `fits.width` turns false has gone too far. Never deepen the crop instead. For a canvas slot, `head_in_slot` is the head's box on the canvas, the area an overlay keeps clear. A cutout window takes and returns more, as the [cutout reference](references/cutout.md) says. The call is free; spread more windows than one call takes across calls, every `slug` unique across them, and read each call's task.
5. **The windows.** A register that shows the speaker is legal only over a window where the speaker is on camera. When the source cuts away to something the creator chose to show, let it play raw rather than covering it.
6. **The caption band, per moment.** Captions stay on during a visual moment: the moment gives way to the band, not the reverse. Place the cues that play during each moment where its layout chapter's `Where the caption sits` puts the band, as the [dynamic caption skill](../aip-dynamic-caption/SKILL.md) says, in a dark type only over a ground the composition painted light; that skill names the moments no cue plays under. Each cue takes its own position, so one video holds a PIP and a full cover at once.
Preview of the first 4,000 characters. Read full instructions →
Referenced files: 2 — file references are metadata, not package contents.
aip-reference-style22.9 KB
View saved version →
---
name: aip-reference-style
description: "Copy 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."
---
# Edit in a reference video's style
A reference sets three things in the user's edit: the captions, the motion graphics (titles, text overlays, stickers, cards, animated graphics, and camera treatments such as punch-ins, shakes and flashes), and the transitions between beats. Everything else follows the [AI Producer skill](../aip/SKILL.md). Its [aesthetic rules](../aip/references/aesthetic-rules.md) hold here as over every fine cut: the reference decides how things look, move and cut, and the rules decide what the edit shows, how much of it and whether it reads. With a reference, its measured style outranks the rules' floors that only add variety (the punch-in minimum, a framing change at every jump cut, nothing arriving after its word, [layout variety](../aip/references/aesthetic-rules.md#35-layout-variety)); readability, the safe area, the contracts and the showcase floor (showcase shots never below 50% of the runtime) still come first. You copy the reference's style, never its content or its schedule: the reference decides how each graphic looks, moves and cuts, and what the user says at each beat decides what that graphic shows and how it is laid out.
## Get the reference
What getting, reading and matching a reference need on this computer, from downloads to the tools that read it, is in [tools.md](references/tools.md): read it before you get the reference.
- A video file the user gave you is the reference as it is. Images the user gave you are a reference of stills: copy them into one new directory in the project's working folder, in the order given.
- A link to a post on Instagram, TikTok or YouTube: get it as soon as you have it, while the user's footage is still being prepared, with `start_link_download` and the link, download what it answers, and from then on it is a video file the user gave you. Never download the post any other way, such as with a downloader you find installed.
- A preset: read it with `get_reference_preset` and its `preset_id`. A preset the user names or describes is matched by its name and look in `list_reference_presets`, which is also what you show, by name and look, a user who asks which presets there are. Its unpacked `folder` is what [reference_frames.py](scripts/reference_frames.py) writes for the preset's video, with its `caption-kit/` already made when the preset shows captions and its style pack when it was built with one, so you do not run the script for it, and a preset has no video to download or open. When the call answers that no presets are published, or that the preset is unknown or withdrawn, tell the user in one sentence and ask for a reference video, a link or images instead.
- A directory that holds `reference-index.json` is a reference already read, such as a preset's unpacked folder or the folder of one an earlier edit read: use it as it is, without running the script on it.
- A request sent from the AI Producer web page carries its reference in `get_web_assignment`'s answer: a `preset` with its `preset_id` and `catalogue_version`, both passed to `get_reference_preset`; a `link`, fetched as above; or a `video` or `images`, each file with a `download_url`, reading the assignment again for fresh links, used as a video file or a reference of stills. Start on the reference as soon as the assignment says it is ready, without waiting for the footage.
- When `start_link_download` cannot get the post, tell the user in one sentence what its refusal's `error` says and what to send instead. `link_unsupported`: only Instagram, TikTok and YouTube links work, so ask f
Preview of the first 4,000 characters. Read full instructions →
Referenced files: 8 — file references are metadata, not package contents.
aip-setup11.5 KB
View saved version →
---
name: aip-setup
description: "Set 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."
---
# Set up AI Producer
This skill gets the user from a fresh install to one real AI Producer project. Its first success is a project AI Producer has accepted and started preparing, never an edited video. Everything after that, the cut, captions, and motion graphics, belongs to the [aip skill](../aip/SKILL.md): with a computer, setup hands over to it after step 3 and it goes on to edit; without one, setup stops at step 6.
It is safe to run again. Each time, start at step 1 and skip what is already done. In a new chat, "continue AI Producer setup" picks up where the user left off: a connection that already works skips steps 1 and 2, and a project this conversation already started skips straight to step 6 with it.
Talk to the user as the aip skill's Talk to the user section says: in their language, about their account and their video, never about tools, servers, codes, or this skill. The one exception is the connect step below, which names the server entry and, when the user has to add it, its URL, because the user selects or types them.
## Which conversation you are in
Decide this once, before step 1. A conversation has a computer behind it when you can run a command or write a file there: ChatGPT Work, Codex, and Claude Code always do. Cursor does when its command or file tools are available. A ChatGPT Chat conversation does not: a video the user attaches there is something the host holds, not a file you have.
- **With a computer**, steps 1 to 3 run as written. Then hand over: carry the user's video and goal straight into the aip skill's new-project flow, which uploads the video, starts the project, and goes on to edit it. Steps 4 to 6 below do not apply; do not use the attachment tool there.
- **Cursor without command or file access:** tell the user this chat needs access to their video files and editing workspace. Ask them to switch to Agent mode with command and file access enabled, then resume setup. Stop here until that access is available; do not use the ChatGPT attachment-only flow or `start_project_from_attachment` in Cursor.
- **ChatGPT Chat without a computer**, all six steps apply. The video reaches AI Producer only as an attachment the server downloads, through `start_project_from_attachment`. Never ask the user to run a command, open a terminal, or upload from a computer of yours, and do not sign an upload.
## 1. Is AI Producer already connected?
Call `get_pricing` with no arguments. It is free, reads nothing from any project, and needs a signed-in connection, so it is the check. Keep its answer: step 4 reads it.
- **It answers with a price table:** the connection works. Say so in one line and go to step 3.
- **The AI Producer tools are not in your tool list, or the call is refused for sign-in** (the answer or the host says the connection needs to sign in, carries no credential, or its credential expired, was revoked, or is not recognized): the account is not connected. Go to the connect step below.
- **The call fails for any other reason** (the service is unreachable, a network error, a timeout, or a server fault): this is not a sign-in problem, and signing in again will not fix it. Tell the user AI Producer could not be reached just now, and that their account and video are not the problem. Check once more at most; if it still fails, ask them to try setup again in a few minutes. Do not send them to sign in.
### Connect the account
Connecting this client to AI Producer is its own step. Being signed in on the AI Producer website does not connect ChatGPT, Codex,
Preview of the first 4,000 characters. Read full instructions →
Referenced files: 1 — file references are metadata, not package contents.