Instrument x Seth Akkerman
Projects Claude AI Assistant for After Effects

Claude AI Assistant for After Effects

An After Effects extension that lets you prompt Claude directly inside the app — using the AE expression and script API to animate layers, add keyframes, and manipulate compositions through natural language

I’d seen a few After Effects scripts floating around that wired up AI assistants inside the app, and I wanted to see how far the expression and script API could actually be pushed. The result is a CEP extension that puts Claude directly inside After Effects — accessible via Window > Extensions > Claude AI Assistant — and lets you describe what you want the timeline to do in plain English.

What it can do

The clearest wins are the things the AE scripting API handles reliably: animating layers, adding keyframes, adjusting opacity, staggering animations across a sequence. Ask it to fade in all text layers from 0% to 100% opacity in a staggered manner and it does exactly that — scans the comp for text layers, adds the keyframes, spaces them out. You can see the result in the timeline immediately.

It understands the layer structure of your composition, which matters. If a text layer is nested inside a group, it knows that. If you want to target only the top-level text layers, it figures that out without you having to specify it manually.

Where it gets interesting (and experimental)

The more ambitious requests — like creating a new 16:9 composition using an existing 1:1 comp as a layout reference and repositioning elements accordingly — start to push against the edges of what the scripting API can cleanly express. Some of those operations are less script and more editorial judgment, and that’s where you hit partial results or errors. It’s genuinely exploratory territory.

But the partial results are still interesting. The composition gets partially built. Elements move. The direction is right even when the execution isn’t complete. That tells you something about where the ceiling is and what the right prompt structure might look like to get past it. The foundation is solid — the question is how much of After Effects’ behavior can be reliably described and executed through the scripting layer alone. Still figuring that out.

Applying this to your project

  1. What to clone vs. discard. Copy the whole ClaudeAE 3.7/ folder — that’s the actual extension (index.html, css/styles.css, js/main.js, js/CSInterface.js, jsx/host.jsx, CSXS/manifest.xml, system-prompt.txt). Also keep build-zxp.sh / build-zxp.bat and README-BUILD.md if you want to package it as a distributable .zxp. You can discard ClaudeAE 3.7.zip, build/, and certificates/ — those are generated build artifacts, not source; running build-zxp.sh recreates them.

  2. API key setup. There’s no .env file anywhere in this project — the Anthropic API key is entered by the end user directly in the extension’s Settings modal (the gear icon) and stored in localStorage under the key claude_api_key (see CONFIG.STORAGE_KEYS.API_KEY in js/main.js). If you adapt this for a different API or want to ship a default key, do not hardcode it into main.js — anything in the CEP panel’s JS is trivially readable by anyone who unzips the .zxp.

  3. What to rebrand. Change ExtensionBundleId, ExtensionBundleName, and the <Menu> label in CSXS/manifest.xml — this is what shows up in the host app’s Window > Extensions menu. Swap icons/icon-dark.png and icons/icon-light.png (these are the panel icons After Effects displays). Rewrite system-prompt.txt entirely — this file defines the assistant’s persona and instructions and is loaded fresh on every session, so it’s the single highest-leverage file to edit for a different use case. Update APP_VERSION in js/main.js and the version strings in manifest.xml together (the build script reads the version from manifest.xml, not from main.js).

  4. Integration points — where your own logic plugs in. The two places that are specific to After Effects are: (a) getCompositionContext() in js/main.js, which builds the JSON blob describing the active comp, selected layers, and effects that gets sent to Claude as context — to adapt this for a different host app (Premiere, Photoshop, InDesign) you’d rewrite this function’s ExtendScript to walk that app’s object model instead; and (b) jsx/host.jsx, which is the ExtendScript file actually executed inside the host app via CSInterface.evalScript() — any AE-specific automation helpers belong here, not in main.js. The <Host Name="AEFT" .../> line in CSXS/manifest.xml is what restricts the panel to After Effects; change it to target a different Adobe app.

  5. Gotchas found in the code.

    • The fetch call to api.anthropic.com sets the header anthropic-dangerous-direct-browser-access: true — this is required because CEP panels are effectively browser contexts making a direct client-side API call with no backend proxy. If you don’t want end users’ API keys and prompts going straight from their machine to Anthropic with no intermediary, you’ll need to add a proxy server and remove this header.
    • Conversation history is capped at the last 20 messages (see the slice in callClaude()) and prompt caching is toggled via the anthropic-beta: prompt-caching-2024-07-31 header — if you upgrade to a newer Anthropic SDK/API version, check whether this beta header is still needed or has been promoted to stable.
    • The model returned code is stripped of markdown fences with a regex (cleanedCode in handleSend()) before being run — if your prompt format changes, that regex needs to keep matching whatever fence style the model actually returns, or raw markdown will get eval’d as ExtendScript.
    • build-zxp.sh generates a self-signed certificate by default (certificates/ClaudeAE.p12), which means users installing the .zxp will see an “unknown publisher” warning; for public distribution you’d swap in a purchased code-signing cert per the instructions in README-BUILD.md.
    • There is no lockfile, no bundler, and no node_modules — everything in js/ is loaded directly as a <script> tag in index.html, so if you add a dependency you must vendor it as a plain file and add a <script> tag rather than npm installing it.

Other ways to repurpose this

Product Design

Web Design

Marketing

Branding

Dependencies

Anthropic Messages API 2023-06-01 The core of the extension — every user prompt is sent to api.anthropic.com/v1/messages, along with live After Effects composition/layer data, and the returned ExtendScript is executed inside AE.
Claude Sonnet 4.6 claude-sonnet-4-6 Default model used for code generation; user-selectable in Settings and swappable via CONFIG.DEFAULT_MODEL in js/main.js.
CSInterface.js vendored (no version pin) Adobe's CEP-to-host bridge, vendored directly in js/CSInterface.js; used to call evalScript() to run ExtendScript in After Effects, read system paths, and open external URLs.
CSXS Runtime 9.0 The Adobe CEP runtime version declared in CSXS/manifest.xml that determines which After Effects builds (17.0–99.9) can load this panel.
ZXPSignCmd 4.1.2 Adobe's official packaging/signing tool, auto-downloaded by build-zxp.sh into ./tools/, used to sign the extension into a distributable .zxp file.
Role
Creative Technologist
Tools
After Effects Scripting API After Effects Expressions Claude JavaScript CEP Extensions
Metrics
Natural language control over keyframes, layer animation, and composition structure without writing a single expression
Video thumbnail for Claude AI Assistant for After Effects