Global-AI-Group-Inc/content-generation-skills / skills/mira-after-effects
mira-after-effects
VerifiedBuild motion pieces inside the user's own After Effects through the Mira MCP: read the project, mark the beat of the music, animate with the Mira Motion Kit (kinetic type, camera depth, velocity-matched transitions, expressions, grade) or ExtendScript, add plates, overlays, templates and sound, check contact sheets, render on the user's machine. Use it when the user says "build this in After Effects", "собери ролик в афтере", "промо в After Effects", "make a motion reel", "add grain and a LUT", or when adobe_status reports a connected After Effects. Requires the Mira for Adobe panel with the bridge switched on. NOT for generating clips (mira-generate) or Blender scenes (mira-blender-scene).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.5 KB |
| references/bank-schema.md | markdown | 2.9 KB |
| references/depth.md | markdown | 4.5 KB |
| references/doctrine.md | markdown | 5.2 KB |
| references/motion-kit.md | markdown | 16.5 KB |
| references/recipes.md | markdown | 7.1 KB |
| references/workflow.md | markdown | 5.3 KB |
references/recipes.md
View on GitHub# ExtendScript recipes for the bridge
Everything below runs through `adobe_execute_script`. For animation, the Motion Kit
(`references/motion-kit.md`) is already loaded as the global `MK`; the recipes here are for
what it does not cover: imports, templates, overlays, sound. Keep each call under 40 000 characters;
put libraries in files and load them with `$.evalFile(new File("/abs/path/lib.jsx"))`. The call
returns only what you assign to `result`; anything else goes to a log file you read afterwards.
## Bridge rules learned the hard way
- Never concatenate a string with an object: `"t=" + new Date()` and `"err " + e` throw
"Object of type X found where a Number, Array, or Property is needed". Always `String(x)`,
`e.message`, `d.getTime()`.
- Never `addProperty("ADBE Apply Color LUT")` from a script: it opens a file dialog that blocks
the host and the bridge until someone clicks Cancel. Apply LUTs with `applyPreset` on a
hand-saved `.ffx` (the LUT elements of the library are exactly that).
- No ternary inside the first branch of another ternary (`a ? (b ? 1 : 2) : 3`): the host's
parser stops After Effects with a modal "Expected: :" dialog that also blocks the bridge. Use
if/else.
- `app.effects` is 0-based. `comp.layer(i)` and `folder.item(i)` are 1-based.
- The host script is ES3: no `JSON`, no `Array.map`, no trailing commas, no regex literal with
`/` inside a character class (`/[\\/]/` not `/[\/]/`). Ship indexes as object literals.
- Long scripts keep running after the bridge times out (180 s). Batch work with a time budget,
write progress to a file, resume by skipping what exists.
- Wrap `beginSuppressDialogs()` / `endSuppressDialogs(false)` around imports of foreign
projects; dialogs the host raises anyway (LUT chooser, font manager) still need a human.
- Source Text: `var td = prop.value; td.text = String(v); prop.setValue(td)`; a text layer whose
Source Text has an expression is driven by a controller, edit the controller.
- `KeyframeEase` influence must be at least 0.1. Set `parent` after keying the children.
Opacity is not inherited through `parent`; fade every layer.
- Short footage under a long layer: `timeRemapEnabled = true` and
`loopOut('cycle')` on Time Remap, then set `outPoint`.
- Globals from every `$.evalFile` share one scope: prefix library internals, never reuse a
helper name for a variable.
- Write logs and frames inside the project folder; `/tmp` works on macOS but is not portable.
- A timed-out call is an unknown state, not a failure: the script may have finished. Read the
project (`adobe_get_project`, `list_layers`) before retrying, or the change lands twice.
- Address effects by match name (`ADBE Gaussian Blur 2`), not by index or display name: indices
shift and display names are localised.
- Masks cut the layer's source before its effects run, so a glow or blur on a masked layer spills
past the rounded corner. Precompose the layer, put the effect on the precomp and the mask in the
parent.
- Before its first key a property holds the first key's value. A reveal that starts at opacity 0
needs that 0 key at (or before) the layer's in-point, or the layer pops in fully visible. Check the
frame before a reveal, the last frame before a cut and the first frame after it.
- Blurs on a layer smaller than the frame fade at its edges unless Repeat Edge Pixels is on. Drop
Shadow's opacity property runs 0-255 in scripts, not 0-100.
- Heavy scenes: more than about ten layers animating at once, Source Text or mask paths keyed,
`wiggle` or `sampleImage` on many layers. Precompose finished clusters, animate transforms
rather than text or mask shapes, key one parameter per effect, and keep sampling expressions
inside precomps.
## Import footage once
```js
function imp(path) {
var f = new File(path), it = findItem(f.name, FootageItem);
if (it) return it;
it = app.project.importFile(new ImportOptions(f));
it.parentFolder = folder("assets"); return it;
}
```
## Import a template project
```js
var io = new ImportOptions(new File(aep)); io.importAs = ImportAsType.PROJECT;
app.beginSuppressDialogs();
var fld = app.project.importFile(io); // a FolderItem with the whole project inside
app.endSuppressDialogs(false);
var main = findCompIn(fld, "Render"); // recursive search by name
main.layer("Title").property("ADBE Text Properties").property("ADBE Text Document") ...
var l = targetComp.layers.add(main); l.startTime = t0; // nest it
```
Controls live on a controller layer as expression controls: read `effect.matchName`
(`ADBE Slider Control`, `ADBE Color Control`, `ADBE Checkbox Control`), set `effect.property(1)`.
Placeholders are footage items; `layer.replaceSource(newItem, false)` on every layer that uses
one.
## Overlay with a blend mode
```js
var l = comp.layers.add(imp(clip)); cover(l); // scale to fill W x H
l.blendingMode = BlendingMode.SCREEN; // grain: OVERLAY, paper: MULTIPLY
l.inPoint = tIn; l.outPoint = tIn + dur; l.startTime = tIn;
```
## Transition on a cut
Light leak or film burn: an overlay whose full-cover frame (`hit`) sits on the cut, so
`startTime = tCut - hit`. Luma wipe: place the wipe clip directly above the incoming layer and
`incoming.setTrackMatte(wipe, TrackMatteType.LUMA)`; the wipe starts at `tCut - hit`.
## Sound
`layer.startTime = t - hit` where `hit` is the element's transient (`adobe_place_element` does
this for sound effects). Levels: `layer.property("ADBE Audio Group").property("ADBE Audio Levels")`
takes decibels.
## Stock-effect grade
An adjustment layer on top: `VISINF Grain Implant` (Add Grain) or a grain clip on Overlay,
`CS Vignette` (CC Vignette), three additive copies with `ADBE Shift Channels` offset by a few
pixels for chromatic aberration. Names differ from the menu: check `app.effects[i].matchName`.
## Beat grid
`function beatGrid(offset, beatSeconds) { return { beat: beatSeconds, b: function (k) { return offset + beatSeconds * k; } }; }`
Take `grid_offset` and `beat_seconds` from `adobe_beat_markers` on the music layer (they are in
composition time already), not from a timestamp someone wrote down. Its `mira:bar N` / `mira:drop`
markers can also be read back with `adobe_command read_markers`.
## Verify
Look at the key times with `adobe_contact_sheet` (up to 12 frames on one image; some compositions
with heavy effects skip a frame, reported in `missing`), run a bounding-box lint over text layers
every half second (out of frame, overlapping), render with `adobe_render`, then look at a contact
sheet of the rendered range before calling it done.
## Typed commands
`adobe_command set_keyframes {layer, property, keys:[{time, value, ease}]}` sets several keys in one
undo step; `property` is a name, a match name or a path (`Transform/Position`); `ease` is `linear`,
`hold`, `ease`, `in` (arrive slowly at this key — what CSS calls ease-out on the move before it),
`out` (leave this key slowly) or `{in, out}` influence in percent. `precompose {layers, name}`,
`set_parent {layer, parent}` (null clears), `add_marker {time, comment, duration}`, `set_time`,
`set_work_area`, `open_comp` round it out; every mutating command is one undo step.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |