Overlay

From theSamPadilla/montaj · View interactive version

Overlay is an AI agent skill from the GitHub repository theSamPadilla/montaj. Agent-authored workflow task: decide what overlays to write, author the JSX, and add them to the project's overlay track. Load this when you hit montaj/overlay in a workflow.

How to use this skill

Skill file

Overlay

montaj/overlay is an agent-authored task — no CLI step, no API call. You decide what overlays the video needs, write the JSX files, and add them to the project's visual tracks.

Before writing any JSX, load skill write-overlay — it contains the full JSX authoring reference (globals, interpolate/spring utilities, canvas rules, examples).

Sub-skills

| Name | When to load |

|------|--------------|

| write-overlay | Before writing any JSX overlay — globals, interpolate/spring utilities, canvas rules, examples. |

| image-search | When the prompt asks to source outside imagery (a photo of a person, a logo, an event/B-roll still) — find via search_images + download via fetch_image, then place as an image clip on tracks[1+]. |


Process

1. Read the editing prompt and transcripts

The prompt tells you the tone and intent. The transcript tells you the moments worth annotating. Read both before deciding what to write. Read the speech with the speech_text step (one line per phrase), not the transcribe words JSON.

2. Decide what overlays to write

Decide from the prompt and the transcript what the video needs that isn't already in the footage.

If the prompt asks you to source images ("add a photo of X", "find images of the IPO"), load skill image-search to find them via search_images and download via fetch_image, then add each as a type: "image" clip on tracks[1+]. A still photo is an image clip, not an overlay; overlays are animated graphics.

If the prompt says "no overlays" — write nothing.

Placement and timing constraints

3. Tie overlays to the transcript

Use word-level timings from the transcript JSON to sync overlays to speech (only here: speech_text carries no times).

4. Write the JSX files

One JSX file per overlay component. Save to overlays/<name>.jsx in the project directory.

There are no built-in templates. Every overlay is custom JSX.

See skill write-overlay for the full authoring reference.

5. Save overlays to the project

Overlays live in tracks[1+] — overlay tracks in the unified tracks array. Each track is an object ({id, items, ...}); its items array holds the track's clips/overlays. Items in the same track cannot overlap in time; items in different tracks stack by track: tracks holding video draw below all others, then higher indexes on top, and within a track its clips draw before its overlays (the editor, sample_frame and the export agree). So an image on a track above a 3D or full-screen overlay hides it. tracks[0] is always the primary footage track.

{
  "tracks": [
    { "id": "trk-0", "items": [] },
    {
      "id": "trk-1",
      "items": [
        {
          "id": "ov-0",
          "type": "overlay",
          "src": "/abs/path/to/project/overlays/hook.jsx",
          "props": { "text": "The source code got leaked" },
          "start": 0.0,
          "end": 3.0
        }
      ]
    }
  ]
}

For multiple non-overlapping overlays, images or clips, add them to the same existing track of that kind instead of one track each, so the person has nothing to merge by hand. Open a new track only when items overlap in time or must stack at a different z-level.

Follow save discipline: read the project, merge the updated tracks array into the fresh state, then save the project (delta).

Rules

Render Constraints

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.