after-effects
Automate Adobe After Effects via ExtendScript. Use when the user asks to create, modify, or query anything in an After Effects project — layers, keyframes, expressions, effects, compositions, assets, rendering, batch operations. Generates and executes JSX ExtendScript via osascript on macOS.
What this skill does
## Overview
This skill automates After Effects by generating ExtendScript (.jsx) and executing it via osascript. It reads project state through query scripts, uses rule files for domain knowledge, and wraps all mutations in undo groups.
## First-Time Setup
1. Run `scripts/runner.sh` with any query script to detect the AE version
2. If multiple AE versions are installed, the user must choose one — runner.sh will prompt
3. Ensure AE Preferences > Scripting & Expressions > "Allow Scripts to Write Files and Access Network" is enabled
## Workflow
For every user request:
### Step 1: Gather context (auto-run, no confirmation needed)
Use `--background` for all query scripts — this skips `ae.activate()` so AE doesn't steal focus:
```bash
bash scripts/runner.sh --background scripts/active-state.jsx
```
Then read `/tmp/ae-assistant-result.json` for active comp, selected layers, CTI.
If this is the first interaction or the project context is unknown, also run:
```bash
bash scripts/runner.sh --background scripts/project-overview.jsx
```
This returns a **summary** by default: folder tree with counts, all comps listed, footage grouped by file type. NOT every individual file.
To drill into a specific folder:
```bash
bash scripts/runner.sh --background scripts/project-overview.jsx '{"mode": "folder", "folderName": "Images"}'
```
Only use full mode when you actually need every item listed:
```bash
bash scripts/runner.sh --background scripts/project-overview.jsx '{"mode": "full"}'
```
### Step 2: Drill down if needed (auto-run)
If the task targets a specific comp:
```bash
bash scripts/runner.sh --background scripts/comp-detail.jsx '{"compName": "Comp Name"}'
```
If the task targets specific layers:
```bash
bash scripts/runner.sh --background scripts/layer-detail.jsx '{"layerNames": ["Layer 1", "Layer 2"]}'
```
Omit `compName` to use the active comp. Omit `layerNames` to use selected layers.
#### Additional query scripts
**Expression errors** — scan for broken expressions:
```bash
bash scripts/runner.sh --background scripts/expression-errors.jsx
bash scripts/runner.sh --background scripts/expression-errors.jsx '{"compName": "Main Comp"}'
```
**Font inventory** — list all fonts used across the project:
```bash
bash scripts/runner.sh --background scripts/font-inventory.jsx
```
**Project audit** — comprehensive health check (unused footage, missing files, expression errors, duplicate solids, font issues, empty folders):
```bash
bash scripts/runner.sh --background scripts/project-audit.jsx
bash scripts/runner.sh --background scripts/project-audit.jsx '{"checks": ["unused", "missing", "expressions"]}'
```
### Step 3: Load domain knowledge
Read the relevant rule file from `rules/`. Always read `rules/extendscript-fundamentals.md` — it contains ES3 constraints that apply to every generated script.
| Task involves | Load rule file |
|---|---|
| Layers (create, move, parent, duplicate) | [rules/layer-manipulation.md](rules/layer-manipulation.md) |
| Keyframes, animation, easing | [rules/keyframes-animation.md](rules/keyframes-animation.md) |
| Expressions | [rules/expressions.md](rules/expressions.md) |
| Compositions (create, precompose, nest) | [rules/composition-management.md](rules/composition-management.md) |
| Effects and parameters | [rules/effects.md](rules/effects.md) |
| Import, footage, assets | [rules/assets-footage.md](rules/assets-footage.md) |
| Render queue, export | [rules/rendering.md](rules/rendering.md) |
| Bulk/batch operations | [rules/batch-operations.md](rules/batch-operations.md) |
| Version-specific features | [references/ae-api-versions.md](references/ae-api-versions.md) |
### Step 4: Generate the action script
**CRITICAL: Resolve the skill's real path first**
Before writing or executing any action script, resolve the skill's real (non-symlinked) path. ExtendScript `#include` cannot follow symlinks, so you MUST use the real filesystem path.
Run this once at the start of each session:
```bash
SKILL_SCRIPTS="$(readlink -f ~/.claude/skills/after-effects-assistant/scripts 2>/dev/null || readlink ~/.claude/skills/after-effects-assistant/scripts)"
echo "$SKILL_SCRIPTS"
```
Use the resolved path (`$SKILL_SCRIPTS`) for all subsequent Write and Bash commands in this session.
**Why this matters:**
- `~/.claude/skills/` is typically a symlink — ExtendScript `#include` fails through symlinks
- Writing to the real `scripts/` directory lets `#include "lib/json2.jsx"` resolve correctly
- The resolved path changes per machine, so never hardcode it
Every generated script MUST follow this template:
```jsx
#include "lib/json2.jsx"
#include "lib/utils.jsx"
(function() {
app.beginUndoGroup("AE Assistant: <action description>");
try {
var args = readArgs();
var comp = getActiveComp();
if (!comp) return;
// ... action code ...
writeResult({ success: true, message: "<what was done>" });
} catch (e) {
try { writeResult({ error: e.toString(), line: e.line, fileName: e.fileName }); }
catch(e2) { writeError(e.toString(), "line:" + e.line); }
} finally {
app.endUndoGroup();
}
})();
```
#### utils.jsx helpers available for generated scripts
| Function | Purpose |
|----------|---------|
| `writeResult(obj)` | Write JSON result to `/tmp/ae-assistant-result.json` |
| `writeError(msg, detail)` | Last-resort error capture when JSON.stringify fails |
| `readArgs()` | Read args from `/tmp/ae-assistant-args.json` |
| `getLayerType(layer)` | Returns type string: "shape", "text", "null", "precomp", etc. |
| `getBlendModeName(mode)` | BlendingMode enum → string name |
| `getActiveComp()` | Returns active comp or writes error and returns null |
| `getSelectedOrAllLayers(comp)` | Selected layers array, or all layers if none selected |
| `hexToRGB(hex)` | `"#ff0000"` → `[1, 0, 0]` |
| `getCompByName(name)` | Find comp in project items by name |
| `walkProperties(group, leafFn, path)` | Recursive property tree walker — calls `leafFn(prop, path)` on leaves |
| `bubbleSort(arr, compareFn)` | ES3-compatible in-place sort |
| `framesToSeconds(frames, comp)` | Frame count → seconds via `comp.frameDuration` |
| `appendLog(message)` | Append to `~/.ae-assistant-extendscript.log` |
**Write the script using the Write tool, then execute with a short bash command:**
1. Use the **Write** tool to write the script to `$SKILL_SCRIPTS/ae-action.jsx` (the resolved real path)
2. Execute it with bash:
```bash
bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/ae-action.jsx"
```
**IMPORTANT:** Do NOT use `cat > file << 'SCRIPT'` heredocs — they put the entire script in the bash command, cluttering the permission prompt. Always use the Write tool for the script content, then a short bash command to run it.
### Step 5: Execute or confirm
**Auto-run** (no confirmation needed):
- All read-only queries (active-state, project-overview, comp-detail, layer-detail, expression-errors, font-inventory, project-audit)
- Non-destructive additions: adding a keyframe, adding an effect, creating a layer, creating a comp
**Confirm before running** (show the script and ask the user):
- Deleting layers or comps
- Removing keyframes
- Replacing footage
- Clearing expressions
- Render queue operations
- Project cleanup (removing unused items, consolidating solids)
- Any operation the user might not expect
### Built-in action scripts
Before generating a custom `ae-action.jsx`, check if a built-in script already handles the task. These are permanent, tested scripts with args-based behavior:
**True Comp Duplicator** — deep-clone a comp with independent sub-comps (confirm before running):
```bash
bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/true-comp-duplicator.jsx" '{"compName": "Main Comp", "suffix": " COPY"}'
```
**Font Replace** — find and replace fonts across the project. Always dryRun first:
```bash
bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/font-replace.jsx" '{"find": "Helvetica", "replace": "Inter-RRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.